How it’s calculated
A continuous uniform distribution says every value between a minimum a and a maximum b is equally likely, so the probability of landing in an interval is simply its length as a fraction of the whole range. It models things like a random wait that can be anywhere between two times, or a random number between a and b.
Worked example (OpenStax §5.2, baby smiling times): X is uniform from a = 0 to b = 23 seconds. The mean is 23 ÷ 2 = 11.5 seconds and the standard deviation is 23 ÷ √12 = 6.64 seconds. The probability that a smile lasts between 2 and 18 seconds is (18 − 2) ÷ 23 = 0.6957.
Values of x outside [a, b] are handled for you: below a the cumulative probability is 0, above b it is 1.
Frequently asked questions
Why is P(X = x) zero?
For a continuous distribution the probability is spread over an interval, so any single exact value has probability zero. That is why P(X < x) and P(X ≤ x) are equal.
Is this the same as a discrete uniform distribution?
No. This page handles any real value between a and b. For a fair die with whole-number outcomes, use the dice probability calculator.
How do I get a conditional probability, such as P(X > 18 given X > 12)?
Because the distribution is uniform, restrict to the new range: the answer is (b − 18) ÷ (b − 12). With b = 23 that is 5 ÷ 11 = 0.4545.
What if x is outside the range?
The calculator clips it. P(X < x) is 0 when x ≤ a and 1 when x ≥ b.
Embed this calculator
Add this free calculator to your own website. Copy the code below into your page’s HTML:
Need this calculator branded, changed or built around your own prices?See custom business solutions →
Sources
Formulas are taken from the free public references above. Results are provided “as is” for informational and educational purposes only. See our disclaimer.
Added · Last updated · How we check our calculators
Spotted a mistake or missing option? Report a problem· Suggest a calculator