Uniform Distribution Calculator

Calculate probabilities, percentiles, and statistics for continuous and discrete uniform distributions. Includes PDF/CDF visualization, quantile table, order statistics, and sampling distribution.

For sampling distribution
Mean
5.0000
Midpoint of [0, 10]
Variance
8.3333
(b−a)² / 12
Std Deviation
2.8868
√Variance
P(3.00 ≤ X ≤ 7.00)
40.0000%
(x₂−x₁) / (b−a)
PDF (height)
0.100000
1 / (b−a) = 1 / 10.00
P(X < 3.00)
30.0000%
CDF at x₁
P(X > 7.00)
30.0000%
1 − CDF at x₂
SE of Mean (n =
0.5270
σ/√n = 2.887 / √30

PDF Visualization

0
10
P = 40.00%

Quantile Table

PercentileValuePosition
5th0.5000
10th1.0000
25th2.5000
50th5.0000
75th7.5000
90th9.0000
95th9.5000

Expected Order Statistics (n = 30)

Order (k)E[X₍ₖ₎]Distance from a
1th smallest0.32260.3226
2th smallest0.64520.6452
3th smallest0.96770.9677
4th smallest1.29031.2903
5th smallest1.61291.6129

Properties

Skewness0 (perfectly symmetric)
Excess Kurtosis-1.2000 (platykurtic — lighter tails than normal)
Entropy2.3026 nats
MGF at t=12,202.5466
Median5.0000 (= mean for symmetric dist.)
Planning notes, formulas, and examples

About the Uniform Distribution Calculator

The uniform distribution calculator handles both continuous and discrete uniform distributions. In the continuous case, every value in an interval is equally likely in the sense of density; in the discrete case, every integer in the range has the same probability.

Enter bounds and query values to compute interval probabilities, review the PDF or PMF, and inspect the quantile and order-statistic tables. For continuous distributions, the page also shows how the sampling distribution of the mean tightens as sample size grows.

The result is a compact way to work with the simplest "flat" probability model and to see how it behaves in both theory and simulation.

When This Page Helps

Uniform models are a good baseline because the mathematics is simple and the assumptions are explicit. They are useful whenever you know the range but do not have a reason to prefer one value over another.

This page gives you the core calculations in one place so you can move from the interval assumption to probabilities, quantiles, and sample-size effects without rebuilding the formulas manually.

How to Use the Inputs

  1. Select continuous or discrete uniform distribution.
  2. Enter the lower bound (a) and upper bound (b).
  3. Enter query values x₁ and x₂ to find P(x₁ ≤ X ≤ x₂).
  4. For continuous distributions, set sample size to see the sampling distribution.
  5. Use presets for common scenarios like die rolls or bus wait times.
  6. Review the quantile table and order statistics for detailed analysis.
Formula used
Continuous: f(x) = 1/(b−a) for a ≤ x ≤ b. Mean = (a+b)/2. Variance = (b−a)²/12. Discrete: P(X=k) = 1/n where n = b−a+1. Variance = (n²−1)/12.

Example Calculation

Result: P(3 ≤ X ≤ 7) = 40%, mean = 5, σ = 2.887

For Uniform(0, 10), the PDF height is 1/10 = 0.1 everywhere. P(3 ≤ X ≤ 7) = (7−3)/(10−0) = 40%. The mean is the midpoint 5, and variance is 100/12 ≈ 8.33.

Tips & Best Practices

  • The uniform distribution has the highest entropy (maximum uncertainty) among distributions with a fixed range.
  • For continuous uniform, P(X = exact value) is always 0 — only intervals have nonzero probability.
  • The sum of uniform random variables approaches a normal distribution (central limit theorem) — even 3 uniforms summed look quite bell-shaped.
  • Discrete uniform is the model for fair dice — a d6 is Discrete Uniform(1, 6) with PMF = 1/6 each.
  • Order statistics from uniform distributions have elegant formulas: E[X₍ₖ₎] = a + k(b−a)/(n+1).
  • Random number generators produce Uniform(0, 1) values, then transform them to other distributions using inverse CDF methods.

Uniform Distribution as Maximum Entropy Prior

In Bayesian statistics, when you have no prior information about a parameter except its range, the uniform distribution is the maximum entropy prior — it encodes "I know nothing about which values are more likely." This makes it the default choice for uninformative priors in Bayesian analysis.

Inverse Transform Sampling

Every probability distribution can be generated from uniform random numbers. If U ~ Uniform(0,1), then F⁻¹(U) follows the distribution F. This inverse transform method is the basis of all Monte Carlo simulation. For example, −ln(U)/λ generates exponential random variables.

The Irwin-Hall Distribution

The sum of n independent Uniform(0,1) random variables follows the Irwin-Hall distribution. For n=2, the "triangular" distribution. For n=12, it closely approximates the standard normal — this was historically used to generate normal random numbers before more efficient algorithms existed.

Sources & Methodology

Last updated:

Frequently Asked Questions

  • Use it when the model really implies equal likelihood across the interval or set: fair dice, random number generation, simple timing assumptions, and other cases where you do not want to weight one value more than another.