Visual Tools
Calculators
Tables
Mathematical Keyboard
Converters
Other Tools


Continuous Uniform Distribution Explorer

How to use
  1. Drag a and b under Parameters, each from −20 to 20 in steps of 0.1; b always stays above a. Curve, statistics and every calculator result update at once. Learn more about the interval bounds
  2. Statistics shows Expected Value, Variance, Std Deviation and Mode for the current parameters; Show Formulas prints the rule under each card. Learn more about the statistics panel
  3. PDF, the first tab above the chart, draws the density curve f(x)f(x); the red line marks E[X]E[X]. Learn more about the flat PDF
  4. CDF draws F(x)=P(X≤x)F(x) = P(X \le x), rising from 0 to 1. Learn more about the linear CDF
  5. Table lists sample points x with f(x)f(x) and F(x)F(x) to six decimals. Learn more about the Table tab
  6. In the Probability Calculator, tap P(X < x), P(X ≤ x), P(X > x) or P(X ≥ x) and type x; strict and non-strict tabs give the same number. Learn more about cumulative calculators
  7. The calculator opens on P(a ≤ X ≤ b): type a and b for the area between them; the other three range tabs give the same area. Learn more about interval probabilities
  8. Key Properties in the right column: tap a row's ▼ to open its explanation, one at a time; Real-World Applications below lists typical uses. Learn more about key properties and applications


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

DemoParameters and statistics
Step 0 of 4
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.

Reading the Statistics Panel

The Statistics panel sits in the left column, under Parameters. Its four cards show Expected Value, Variance and Std Deviation to four decimals, and Mode as the interval, All values in [a, b]. Every card recomputes on each slider move, so the panel always describes the curve in the middle column; the red E[X]E[X] line on the chart sits at the Expected Value number.

Show Formulas prints the rule under each card: E[X]=(a+b)/2E[X] = (a + b)/2, Var(X)=(b−a)2/12\text{Var}(X) = (b - a)^2/12, σ=(b−a)/12\sigma = (b - a)/\sqrt{12} and Mode=\text{Mode} = any x∈[a,b]x \in [a, b]. The button then reads Hide Formulas. The numbers are the same either way; the formulas only show where they come from.

At the opening values, a=0a = 0, b=10b = 10, the cards read 5.0000, 8.3333, 2.8868 and All values in [0, 10]. Mode reads All values in [0, 10]: the density is flat, so no point is more likely than another. At a=5a = 5, b=20b = 20 the cards read 12.5000, 18.7500, 4.3301 and All values in [5, 20].

The Parameters cards above the panel repeat each value with its symbol and a one-line meaning: Lower Bound (a), Upper Bound (b), Range (b - a) and Density (1/(b-a)). For where the formulas come from, see Distribution Statistics.

Understanding the Flat PDF

DemoPDF, CDF and Table tabs
Step 0 of 4
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.

Using the Table Tab

Table is the third tab above the chart, after PDF and CDF. It replaces the chart with three columns, x, f(x) and F(x), one row per point the chart plots, every value to six decimals. The rows follow the sliders: move one and the whole table recomputes.

Use it where the chart is too small to read. At the opening values, a=0a = 0, b=10b = 10, the table runs from x=−2x = -2 to x=12x = 12 in steps of 0.1, a little beyond [a,b][a, b] on both sides. Outside the interval f(x)=0f(x) = 0; F(x)F(x) is 0 below aa and 1.000000 above bb.

The F(x) column is the CDF as numbers, and f(x) is the height of the PDF curve at that x. The density is not a probability; for one, use an interval. For a value the table does not list, or a range of values, use the Probability Calculator below the chart.

The Explorer at Its Opening Bounds

With a=0a = 0 and b=10b = 10 the density is the constant 1b−a=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 (b−a)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

DemoInterval probabilities
Step 0 of 4
For continuous distributions, point probabilities are always zero. Instead, find P(c ≤ X ≤ d) for an interval [c, d] within [a, b] as the difference of two P(X ≤ x) readings from the Probability Calculator.

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.

The four boundary forms all 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

DemoCumulative probabilities
Step 0 of 4
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.

Key Properties and Real-World Applications

The right column holds two lists. Key Properties has 6 rows, each ending in ▼: Support: X ∈ [0, 10], Constant Probability Density, Maximum Entropy, Linear CDF, Memoryless-like Property, Transformation to Standard Uniform. Row titles here are those at the opening values. Tap a row to open its explanation; tap another and the first closes, so one explanation is open at a time; tap the open row to close it.

The support row, Constant Probability Density and Linear CDF quote the current aa, bb and 1/(b−a)1/(b-a). Open a row, move a slider, and the numbers in the open explanation follow.

Real-World Applications, below, lists 5 situations the continuous uniform distribution models, starting with Random number generation between two values and Arrival time within a time window when all times are equally likely. This list is fixed text and does not change with the sliders.

The rows are short summaries. The full treatment is in What is the Continuous Uniform Distribution?.

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.