Explore

The continuous uniform distribution

Any value between a and b is equally likely, so the density is flat at 1/(b − a) and a probability is a length divided by the width. Move the ends a and b, then ask a question: the area it counts is shaded.

Parameters

a = 0

a (lower end)

b = 1

b (upper end)

Ask a question

x = 0.25

x (threshold)

Compare with

P(X ≤ 0.25) = 0.2500

P(X ≤ 0.25) = F(0.25) = 0.2500

X is a measurement, so a single value has probability 0 and the boundary makes no difference: P(X < x) = P(X ≤ x) = F(x).

Summary

Measure U(0, 1)
mean 0.5000
variance 0.0833
standard deviation 0.2887
skewness 0.0000

The same in code

Python (scipy.stats)
uniform.cdf(0.25, loc=0, scale=1)
Excel
=(0.25-0)/(1-0)
Excel has no uniform distribution function, so the formula is the arithmetic itself. In scipy, uniform takes the lower end as loc and the width b − a as scale.

Formulas

Try this

0 of 4 done
  1. Less than is at most

    Switch the question between P(X < 3) and P(X ≤ 3) for the bug fix.

    Look for: Both are 0.5000. A single point has no width, so P(X = 3) = 0 and the boundary makes no difference for a measurement.

  2. A density above 1

    Set a = 1 and b = 1.5.

    Look for: The density is 2, higher than 1. A density is probability per unit of x, not a probability; the area under it is still 1.

  3. Flat against bell-shaped

    Turn on the comparison with the normal that has the same mean and standard deviation.

    Look for: The normal puts more probability near the middle, and some beyond a and b, where the uniform puts none.

  4. Percentiles in equal steps

    Ask for the percentile and move q from 0.1 to 0.9.

    Look for: The answer moves in equal steps, because F⁻¹(q) = a + q(b − a): with a = 1 and b = 5, every 0.1 of probability adds 0.4 hours.

An unhandled error has occurred. Reload ๐Ÿ—™

Reconnecting…

Your connection to Introduction to Probability Lab dropped, probably a Wi-Fi blip. Hold on while it reconnects.

The connection could not be restored. The page will reload in a few seconds.