4.2 Continuous Uniform Distribution
4.2.1 From Discrete to Continuous Uniform
The uniform idea means that probability is spread evenly across the possible range.
For a discrete uniform random variable, individual values can have positive probability. If there are \(n\) equally likely values,
For a continuous uniform random variable, there are infinitely many possible values in an interval. An individual point therefore has probability zero:
Instead of assigning probability to individual points, a continuous model assigns probability through area under a probability density function. Equal-length subintervals have equal probability.
The figure shows the conceptual transition. The discrete model places equal probability masses at separate values, whereas the continuous model spreads density uniformly across an entire interval.
4.2.2 Probability Density Function
Let
Then \(X\) can take any real value between \(a\) and \(b\), and its probability density function is
Note
Continuous Uniform PDF
The graph is a rectangle over \([a,b]\). Its width is
and its height is
The height is determined by the requirement that the total probability be 1:
Therefore, if the interval becomes wider, the density must become lower. If the interval becomes narrower, the density becomes higher.
Important
Density height is not the probability of an exact value. For a continuous random variable,
4.2.3 Probability as Area and Interval Length
Suppose
Then
Thus,
Note
Probability = favorable interval length / total interval length
This is the continuous analogue of the equally likely counting rule. For a discrete uniform distribution we compare counts; for a continuous uniform distribution we compare lengths.
Because a single point has probability zero, including or excluding an endpoint does not change an interval probability. For example,
4.2.4 Example: Electric Current in a Copper Wire
Let \(X\) represent current, in milliamperes, measured in a thin copper wire. Suppose
The width of the interval is
so the density is
Find the probability that the current is between \(4.95\) and \(5.00\) mA.
Equivalently, using interval lengths,
The shaded portion is one quarter of the total rectangle, so its area—and therefore its probability—is \(0.25\). The triangular support indicates the balance point of the uniform density, which will also be its mean.
4.2.5 Cumulative Distribution Function
The cumulative distribution function is
For \(X\sim U(a,b)\), consider three regions.
If \(x<a\), no probability has accumulated:
If \(a\leq x<b\), integrate from the left endpoint to \(x\):
If \(x\geq b\), the entire probability has accumulated:
Therefore,
Note
Continuous Uniform CDF
Inside \([a,b]\), the CDF increases linearly because equal increases in \(x\) add equal amounts of probability.
4.2.6 Deriving the Mean
For any continuous random variable,
For \(X\sim U(a,b)\), the density is zero outside \([a,b]\), so
Since
we obtain
The mean is the midpoint of the interval. This also follows from symmetry: the probability mass is balanced equally on both sides of the midpoint.
For the electric-current example,
4.2.7 Deriving the Variance and Standard Deviation
The variance is the expected squared distance from the mean:
For the continuous uniform distribution,
Let
and set
When \(x=a\), \(u=-h\); when \(x=b\), \(u=h\). Also, \(b-a=2h\). Therefore,
Substituting \(h=(b-a)/2\),
The standard deviation is
A useful consequence is that the variance depends only on the width of the interval, not on its location.
For the electric-current example,
and
4.2.8 Percentiles and the Inverse CDF
A percentile is particularly simple for a continuous uniform distribution. Let \(k\) be the value below which a proportion \(r\) of the probability lies, where \(0<r<1\). Then
Inside \([a,b]\),
Solving for \(k\),
For example, if waiting time is uniformly distributed from 0 to 15 minutes, then the 90th percentile is
Thus, 90% of waiting times are at most 13.5 minutes.
The 50th percentile is
which is also the mean and median because the distribution is symmetric.
4.2.9 Conditional Probability on a Reduced Interval
Uniform distributions also make some conditional probabilities easy to interpret geometrically.
Suppose
If we already know that \(X>c\), the relevant interval has been reduced from \([a,b]\) to \((c,b]\). Therefore,
So after conditioning on \(X>c\), probability is again proportional to length within the reduced interval.
4.2.10 Discrete Uniform Versus Continuous Uniform
Feature |
Discrete Uniform |
Continuous Uniform |
|---|---|---|
Possible outcomes |
Finite or countable values |
All real values in an interval |
Probability model |
PMF \(p(x)\) |
PDF \(f(x)\) |
Probability at one value |
Can be positive |
\(P(X=x)=0\) |
Probability over a range |
Sum of probability masses |
Area under the density |
Graph |
Equal-height bars or spikes |
Rectangle |
Uniform idea |
Equal probability for each value |
Equal probability for equal-length intervals |
The phrase equally likely must therefore be interpreted differently in
the two settings. In a continuous interval, it means equal lengths have
equal probability; it does not mean that each exact real number has positive
probability.
4.2.11 When Is a Continuous Uniform Model Appropriate?
Use a continuous uniform model when:
the variable is continuous;
values are restricted to a finite interval \([a,b]\);
no part of the interval is more likely than another;
equal-length subintervals should have equal probability.
Examples can include randomized waiting times, measurement values known only to lie uniformly inside a tolerance interval, or a random location along a fixed line segment.
Do not use a uniform model if values near the center, near an endpoint, or in some other part of the interval are systematically more likely.
4.2.12 Quick Practice
Suppose a service time is uniformly distributed between 11 and 21 minutes. Let
Find:
\(P(X>19)\);
the 50th percentile;
\(E(X)\); and
\(\sigma\).
Answer
The full interval has width
For part (a),
For part (b),
The mean is
The standard deviation is
4.2.13 Common Mistakes
Do not interpret \(f(x)\) as \(P(X=x)\). A continuous point has zero probability.
Do not divide by \(b\). The total interval length is \(b-a\).
Do not forget to rescale the density if the interval changes. The total area must always remain 1.
Do not treat endpoints as extra probability masses. For continuous probabilities, including or excluding a finite number of endpoints does not change the probability.
Do not use the uniform model merely because the variable is bounded. The model also requires a constant density across the interval.
4.2.14 Summary
For
its PDF is
For \(a\leq c<d\leq b\),
The CDF is
The mean, variance, and standard deviation are
The central idea is:
probability is represented by area, and equal-length intervals have equal probability.