Notes

Uniform Distribution

Imagine picking a random time between 2:00 and 3:00, or a random point along a ruler. If you truly have “no reason” to prefer one value over another within a range, you’re thinking in terms of a uniform distribution.

What it means

The (continuous) uniform distribution spreads probability evenly across an interval. If a random variable X is uniform on [a, b], written X ~ Uniform(a, b), then every sub-interval of the same length is equally likely. The probability density function (PDF) is constant:

f(x) = 1/(b - a)   for a ≤ x ≤ b
f(x) = 0           otherwise

Because it’s continuous, the probability of any exact single value is 0; probabilities come from areas under the density curve. The mean is (a+b)/2, and the variance is (b−a)²/12.

Intuition and examples

  • Arrival time: a bus arrives uniformly between 0 and 10 minutes; waiting more than 7 minutes has probability (10−7)/10 = 0.3.
  • Measurement rounding: rounding to the nearest millimeter creates an error often modeled as uniform on [−0.5, 0.5] mm.
  • Random sampling: choosing a random point along a 1-meter stick is Uniform(0, 1).

Why it matters in AI/ML

Uniform distributions show up whenever we need “fair” randomness. Common uses include:

  • Initialization of neural network weights (e.g., uniform ranges in Xavier/Glorot-style schemes).
  • Randomized algorithms like shuffling data, random feature subsampling, and Monte Carlo estimation.
  • Non-informative priors in Bayesian modeling when you want to encode “any value in this range is equally plausible” (with care: uniform priors can behave unexpectedly under re-parameterization).

Uniform Distribution is a probability distribution where all values in a specified interval are equally likely. For a continuous uniform distribution on [a, b], the density is constant (1/(b−a)) within the interval and zero outside, giving a mean (a+b)/2 and variance (b−a)2/12. It matters in AI/ML as a simple prior and as a baseline for random initialization or sampling, e.g., drawing random hyperparameters uniformly from a range.

Imagine a perfectly fair spinner that can land anywhere along a smooth circle, and every spot is just as likely as any other. That “everything is equally likely” idea is what a Uniform Distribution means.

In statistics, a uniform distribution describes a situation where values within a certain range all have the same chance of happening. For example, if a random number is chosen between 0 and 1 and every number in that interval is equally likely, that’s uniform.

In AI and machine learning, uniform distributions are often used to create random starting values or to model “no preference” when you don’t want to favor any outcome.