Visual Tools
Calculators
Tables
Mathematical Keyboard
Converters
Other Tools

How to Find a Continuous Uniform Probability

A continuous uniform variable is equally likely to fall anywhere in an interval [a,b][a, b]. Its density is a flat line of height 1b−a\frac{1}{b - a}, so the probability of a subinterval is its length divided by b−ab - a.

Recognize the task

A measurement is equally likely to be anywhere in a range: "the bus comes at a random time in the next 2020 minutes", "a point chosen at random on a 1010 cm stick", "a rounding error between −0.5-0.5 and 0.50.5". Test: the values form an interval and no part of it is favored. Then X∼U(a,b)X \sim U(a, b).
The model is defined in the continuous uniform lesson.

Steps

StepOn a bus arriving uniformly in the next 2020 minutes, P(X>15)P(X > 15)
1Name aa and bb. The density is 1b−a\frac{1}{b - a} on [a,b][a, b] and 00 outside it.X∼U(0,20)X \sim U(0, 20), density 120\frac{1}{20}
2Write the event as an interval and clip it. Keep only the part inside [a,b][a, b]. Strict and non-strict inequalities give the same answer, since P(X=c)=0P(X = c) = 0.X>15X > 15: the interval (15,20](15, 20]
3Divide its length by b−ab - a. This is the area of a rectangle under the density (uniform CDF).20−1520−0=520\frac{20 - 15}{20 - 0} = \frac{5}{20}
4Simplify. For a conditional question, divide two such lengths.P(X>15)=14P(X > 15) = \frac{1}{4}

Worked examples

Example 1 · an interval inside the support

length ratio
X∼U(2,10)X \sim U(2, 10), P(3<X<7)P(3 < X < 7)
b−a=8b - a = 8
7−38=48\frac{7 - 3}{8} = \frac{4}{8}
length of the interval
P(3<X<7)=12P(3 < X < 7) = \frac{1}{2}

Example 2 · an interval that sticks out

clip
X∼U(0,20)X \sim U(0, 20), P(12≤X≤25)P(12 \le X \le 25)
clip to [12,20][12, 20]: length 88
no probability beyond 2020
P=820=25P = \frac{8}{20} = \frac{2}{5}

Example 3 · a conditional question

given
X∼U(0,20)X \sim U(0, 20), P(X>15∣X>10)P(X > 15 \mid X > 10)
already waited 1010 min
P(X>15)P(X>10)=5/2010/20\frac{P(X > 15)}{P(X > 10)} = \frac{5/20}{10/20}
conditional probability
=510=12= \frac{5}{10} = \frac{1}{2}
still uniform on (10,20](10, 20]
Check any interval in the continuous distributions calculator.

See it happen

The density is a rectangle of width b−ab - a and height 1b−a\frac{1}{b - a}, so its total area is 11. The probability of an interval is the area of the slice above it, which is just its width times the fixed height. Drag the interval in the continuous uniform visualizer. For equally likely whole numbers, use discrete uniform probability instead.

Common mistakes

Reading the density as a probability

✗ X∼U(0,20)X \sim U(0, 20): P(X=15)=120P(X = 15) = \frac{1}{20}
✓ single points have probability 00; only intervals have area

Not clipping to the support

✗ P(12≤X≤25)=1320P(12 \le X \le 25) = \frac{13}{20}
✓ only [12,20][12, 20] lies in the support: 820\frac{8}{20}

Adding one as in the discrete case

✗ P(3<X<7)=7−3+110−2+1P(3 < X < 7) = \frac{7 - 3 + 1}{10 - 2 + 1}
✓ lengths, not counts: 48\frac{4}{8}