Uniform Distribution Calculator Formula

Understand the math behind the uniform distribution calculator. Each variable explained with a worked example.

Formulas Used

PDF f(x)

pdf = 1 / (b - a)

CDF P(X <= x)

cdf = (x - a) / (b - a)

Mean

mean_val = (a + b) / 2

Variance

variance_val = pow(b - a, 2) / 12

Standard Deviation

std_dev = (b - a) / sqrt(12)

Variables

VariableDescriptionDefault
aLower Bound (a)0
bUpper Bound (b)10
xValue (x)7

How It Works

How to Calculate Uniform Distribution Properties

Formulas

PDF: f(x) = 1 / (b - a) for a <= x <= b

CDF: P(X <= x) = (x - a) / (b - a)

The continuous uniform distribution assigns equal probability density to all values in the interval [a, b]. The probability of falling in any sub-interval depends only on the sub-interval's length relative to the total range. The mean is the midpoint (a+b)/2.

Worked Example

A bus arrives uniformly between 0 and 10 minutes. What is P(arrival <= 7 min)?

a = 0b = 10x = 7
  1. 01PDF = 1 / (10 - 0) = 0.1
  2. 02CDF = (7 - 0) / (10 - 0) = 0.7
  3. 03P(X <= 7) = 70%
  4. 04Mean = (0 + 10) / 2 = 5
  5. 05Variance = (10 - 0)^2 / 12 = 100/12 ≈ 8.3333

Ready to run the numbers?

Open Uniform Distribution Calculator