After exploring distributions for discrete outcomes, we now turn our attention to continuous random variables. The simplest continuous distribution is the Uniform distribution. It describes a situation where all possible outcomes within a given range are equally likely. Think of generating a random number between 0 and 1; any value in that interval has the same chance of occurring.
The continuous Uniform distribution is defined over a specific interval [a,b], where a is the minimum possible value and b is the maximum possible value. A random variable X following this distribution is denoted as X∼U(a,b).
Unlike discrete distributions which use a Probability Mass Function (PMF), continuous distributions use a Probability Density Function (PDF), denoted f(x). The PDF doesn't give the probability of a specific value (which is technically zero for any continuous variable), but rather the density of probability around that value. The probability of X falling within a certain range is found by calculating the area under the PDF curve over that range.
For the Uniform distribution U(a,b), the PDF is constant within the interval [a,b] and zero elsewhere. This constant value ensures that the total area under the curve equals 1, a requirement for any valid PDF.
The formula for the PDF is:
f(x;a,b)={b−a10for a≤x≤bfor x<a or x>bThe height of the PDF is 1/(b−a), which is the reciprocal of the interval's length. This constant height reflects the "uniform" nature of the distribution, where probability is spread evenly across the interval.
The Probability Density Function (PDF) for a U(2,8) distribution. The density is constant at 1/(8−2)=1/6≈0.167 between x=2 and x=8, and zero elsewhere. The total area under the curve is (8−2)×(1/6)=1.
The Cumulative Distribution Function (CDF), F(x), gives the probability that the random variable X takes on a value less than or equal to x, i.e., P(X≤x).
For the Uniform distribution U(a,b), the CDF increases linearly from 0 to 1 over the interval [a,b].
The formula for the CDF is:
F(x;a,b)=⎩⎨⎧0b−ax−a1for x<afor a≤x≤bfor x>bAt x=a, the CDF is F(a)=(a−a)/(b−a)=0. At x=b, the CDF is F(b)=(b−a)/(b−a)=1. Between a and b, the probability accumulates linearly.
The Cumulative Distribution Function (CDF) for a U(2,8) distribution. It shows the probability P(X≤x) increasing linearly from 0 at x=2 to 1 at x=8.
The expected value (mean) and variance are important summary statistics for any distribution.
Mean (Expected Value): The mean of a U(a,b) distribution is the midpoint of the interval: E[X]=2a+b This makes intuitive sense, as the probability is distributed symmetrically around the center of the interval.
Variance: The variance measures the spread of the distribution. For U(a,b), it is: Var(X)=12(b−a)2 The variance depends only on the width of the interval (b−a). A wider interval leads to a larger variance, indicating greater dispersion of possible values.
The Uniform distribution's primary characteristic is that it represents complete uncertainty about the value of a variable within a known range [a,b], assuming all values in that range are equally plausible.
It's also worth noting the existence of the Discrete Uniform Distribution, where there are a finite number n of outcomes, each having the same probability 1/n. A classic example is rolling a fair six-sided die, where each outcome {1,2,3,4,5,6} has a probability of 1/6. Our focus here, however, is on the continuous version, which is more frequently encountered when modeling continuous quantities in machine learning contexts.
The continuous Uniform distribution, while simple, serves as a fundamental building block in probability theory and its applications, particularly in simulation and as a basis for understanding random processes where outcomes over a range are equally likely. In the upcoming sections, we will explore distributions like the Normal and Exponential, which model phenomena where outcomes are not equally likely.
© 2025 ApX Machine Learning