Uniform Distribution Calculator
Test cases replayed : 2 of 2 match · Methodology · No outside source listed
Enter the lower and upper bounds of a continuous uniform distribution, a value x and an interval to get the density, P(X ≤ x), the probability of the interval and the mean and variance.
Result
P(X ≤ x)
Density f(x)
- P(interval start ≤ X ≤ interval end)
- Mean (a + b) ÷ 2
- Variance (b − a)² ÷ 12
- Standard deviation
Estimate for planning only, not tax, legal, financial or medical advice. This calculator uses the method explained on this page.
This browser did not allow copying. The sentence is in the box below, already selected: copy it with your keyboard or the menu.
How to use this calculator
Fill in the fields in this order; each step takes you to its field.
- Lower bound (a): enter a number.
- Upper bound (b): enter a number.
- Value x: enter a number.
- Interval start: enter a number.
- Interval end: enter a number.
- Read the result: P(X ≤ x); the panel also shows Density f(x), P(interval start ≤ X ≤ interval end), Mean (a + b) ÷ 2, Variance (b − a)² ÷ 12 and Standard deviation.
How this calculator works
Continuous uniform distribution U(a, b): density f(x) = 1 ÷ (b − a) for a ≤ x ≤ b and 0 elsewhere; cumulative distribution F(x) = (x − a) ÷ (b − a) between a and b, 0 below a and 1 above b.
P(c ≤ X ≤ d) = (length of the part of [c, d] that lies inside [a, b]) ÷ (b − a). Mean = (a + b) ÷ 2, variance = (b − a)² ÷ 12, standard deviation = (b − a) ÷ √12.
The formula
| Symbol | Meaning |
|---|---|
| Lower bound | |
| Upper bound | |
| Value x | |
| P(X ≤ x) |
Worked example
| Lower bound (a) | 0 |
|---|---|
| Upper bound (b) | 10 |
| Value x | 3 |
| Interval start | 2 |
| Interval end | 5 |
| Density f(x) | 0.1 |
|---|---|
| P(interval start ≤ X ≤ interval end) | 0.3 |
| Mean (a + b) ÷ 2 | 5 |
| Variance (b − a)² ÷ 12 | 8.3333 |
| Standard deviation | 2.8868 |
P(X ≤ x) 0.3
Each step uses the unrounded value of the step before it; figures on this page are rounded for display.
Frequently asked questions
For a uniform distribution from 0 to 10, what is P(X ≤ 3)?
(3 − 0) ÷ (10 − 0) = 0.3. The probability between 2 and 5 is 3 ÷ 10 = 0.3, the mean is 5 and the variance is 8.3333.
What is the variance of a uniform distribution?
(b − a)² ÷ 12; for a = 0 and b = 10 it is 100 ÷ 12 = 8.3333.