Visual Tools
Calculators
Tables
Mathematical Keyboard
Converters
Other Tools


Continuous Uniform Distribution Explorer


Modify Parameters and See Results

Equal probability density over an interval

Parameters

Lower Bound (a)
0.00

The minimum value of the distribution

Upper Bound (b)
10.00

The maximum value of the distribution

Range (b - a)
10.00

The width of the interval

Density (1/(b-a))
0.1000

Constant probability density over the interval

Statistics

Expected Value
5.0000
Variance
8.3333
Std Deviation
2.8868
Mode
All values in [0, 10]

Probability Calculator

Key Properties

Real-World Applications

  • Random number generation between two values
  • Arrival time within a time window when all times are equally likely
  • Random point selection along a line segment
  • Quantization error in analog-to-digital conversion
  • Round-off errors in numerical computations







Setting Interval Bounds

Adjust a (lower bound) using the top slider to set the minimum value of your interval. The range spans from -20 to 20, accommodating scenarios from symmetric intervals around zero to positive-only ranges.

Set b (upper bound) with the bottom slider to define the maximum value. The calculator automatically ensures b > a, maintaining a valid interval with positive width.

The interval width (b - a) determines both the PDF height 1/(b-a) and the variance. Wider intervals have lower constant density and higher variance.

Understanding the Flat PDF

The PDF displays as a perfectly flat rectangular function with constant height 1/(b-a) across the interval [a, b] and zero outside. This uniform density is the defining feature of continuous uniform distributions.

The rectangular shape represents maximum entropy - complete uncertainty about where within [a, b] values will fall. No subinterval is favored over any other of equal width.

The PDF height adjusts automatically to ensure the total area (probability) equals 1. For interval [0, 10], height is 0.1. For [-5, 5], height is also 0.1 since both have width 10.

Reading the Linear CDF

The CDF rises linearly from 0 to 1 across the interval [a, b]. At any point x in [a, b], F(x) = (x-a)/(b-a) gives the proportion of the interval from a to x.

The perfectly linear rise reflects equal probability density - each unit of width contributes the same probability. For x < a, CDF = 0. For x > b, CDF = 1.

The CDF's slope equals 1/(b-a), matching the PDF height. Steeper slopes (narrower intervals) indicate more concentrated probability, while gentler slopes (wider intervals) show more spread.

The Explorer at Its Opening Bounds

With a=0a = 0 and b=10b = 10 the density is the constant 1ba=0.1\frac{1}{b-a} = 0.1 between the bounds and zero outside, which the tool draws by padding twenty points either side of the interval. The red line marks E[X]=a+b2=5E[X] = \frac{a+b}{2} = 5.

The CDF tab turns that plateau into a straight line of slope 0.10.1 rising from 00 to 11.
0.0000.0200.0400.0600.0800.100-10.523.556.589.511Value (k)Density f(x)E[X]=5.000.0000.2000.4000.6000.8001.00-10.523.556.589.511Value (k)Cumulative Probability P(X ≤ x)E[X]=5.00
Continuous uniform, a = 0, b = 10: PDF above, CDF below

A flat density of 0.1 and a straight-line CDF of slope 0.1. The CDF's slope IS the PDF's height, and its two kinks are where the density jumps from 0 to 0.1 and back.

Comparing the two tabs makes the relationship concrete: the CDF's slope is the PDF's height. A constant density gives a straight-line CDF, and the two kinks in that line sit exactly where the density jumps from 00 to 0.10.1 and back.

Those kinks are the only places the CDF is not differentiable. A continuous random variable must have a continuous CDF, but it need not have a smooth one.

The variance is (ba)212=8.33\frac{(b-a)^2}{12} = 8.33, so σ2.89\sigma \approx 2.89. Widening the interval lowers the density and raises the variance together, since the area under the density is pinned at 11 — the two effects are the same fact seen from two directions.

Computing Interval Probabilities

For continuous distributions, point probabilities are always zero. Instead, use the range calculator to find P(c ≤ X ≤ d) for any interval [c, d] within [a, b].

The formula is beautifully simple: P(c ≤ X ≤ d) = (d - c)/(b - a). Probability is proportional to interval length - a 2-unit interval has twice the probability of a 1-unit interval.

For boundary options, all four give identical results since individual points have zero probability. The distinction between [c, d], (c, d), [c, d), and (c, d] is meaningless for continuous distributions.

Using Cumulative Calculators

P(X ≤ x) returns (x-a)/(b-a) for a ≤ x ≤ b, giving the fraction of the interval from a to x. For x < a, returns 0. For x ≥ b, returns 1.

P(X ≥ x) computes (b-x)/(b-a), the fraction from x to b. This equals 1 - P(X ≤ x) by the complement rule.

Since P(X = x) = 0, the strict inequalities P(X < x) and P(X > x) give identical results to P(X ≤ x) and P(X ≥ x). This differs fundamentally from discrete distributions.

Range Probability Examples

Example 1: For Uniform[0, 10], what's P(3 ≤ X ≤ 7)? Answer: (7-3)/10 = 0.4 or 40%.

Example 2: For Uniform[-5, 5], what's P(X > 2)? Answer: (5-2)/10 = 0.3 or 30%.

Example 3: For Uniform[2, 8], what's P(X ≤ 5)? Answer: (5-2)/(8-2) = 3/6 = 0.5 or 50%.

The simplicity of these calculations - just ratios of lengths - makes continuous uniform the easiest continuous distribution to work with analytically.

What is the Continuous Uniform Distribution?

The continuous uniform distribution assigns equal probability density to all values in a continuous interval [a, b]. It models complete randomness over a range when no value is more likely than any other.

Two parameters define it: lower bound a and upper bound b. The PDF equals 1/(b-a) on [a, b] and zero elsewhere, ensuring total probability equals 1.

Applications include random number generation, modeling arrival times within known windows, rounding errors, and baseline probability models for continuous variables. For theoretical foundations, see continuous uniform distribution theory page.

Maximum Entropy Principle

Among all continuous distributions on interval [a, b], the uniform distribution has maximum entropy - it contains minimal information and represents maximum uncertainty about where values fall within the interval.

This principle explains why uniform distribution is the default assumption when you know only the support [a, b] and nothing else. It's the "most random" continuous distribution possible for a bounded interval.

When you have no reason to favor any subregion over another, maximum entropy reasoning leads to the uniform distribution. Any deviation from uniformity would imply additional information or structure.

Distribution Statistics

The mean equals (a+b)/2, the midpoint of the interval. For Uniform[0, 10], mean = 5. For Uniform[-3, 7], mean = 2.

The variance equals (b-a)²/12. Wider intervals have proportionally larger variance. For Uniform[0, 10], variance = 100/12 ≈ 8.33.

The standard deviation is (b-a)/√12 ≈ (b-a)/3.46. Perfect symmetry around the midpoint means zero skewness. The distribution has kurtosis of -6/5 = -1.2, indicating lighter tails than normal.