WLJS LogoWLJS Notebook

UniformDistribution

UniformDistribution[{min, max}] represents a continuous uniform distribution between min and max. UniformDistribution[] gives values between 0 and 1.

Examples

Random samples:

RandomVariate[UniformDistribution[{0, 10}], 5]
(* {3.2, 7.8, 1.5, 9.2, 4.6} *)

Mean and variance:

Mean[UniformDistribution[{0, 1}]]
(* 1/2 *)

Please visit the official Wolfram Language Reference for more details.

On this page