In a constructed model, a shuttle arrives at a time between and minutes from now, and no part of that range is favored over another. There are infinitely many possible times, so equally likely cannot mean that each time gets the same positive probability. It means that intervals of the same length inside the range get the same probability. This lesson builds the density, CDF, quantiles, mean and variance of such a model, and shows what changes when we learn something about the arrival or measure it in seconds.
Key terms
Continuous uniform distribution
Definition For real numbers , a random variable has the continuous uniform distribution on , written , if its density is
Changing at the two endpoints changes no probability, so the intervals and describe the same distribution. The CDF is for , for , and for
For ,
and the answer is the same with either endpoint included, since a uniform distribution has no atoms. An event that reaches outside is first cut down to its part inside. Because a constant density must have total area , the interval has to be bounded, and no uniform distribution exists on the whole real line or on .
In plain words Intervals of equal length inside the support get equal probability, so the probability of an interval inside it is its share of the total length. No single value gets positive probability. Uniformity is a modeling assumption. A quantity known to lie between two bounds can still bunch up somewhere, as one with the density on does.
Example For the shuttle, in minutes, so the support has width minutes and the density is per minute. Then , and as well, since that interval has the same length. For an arrival before minutes only lies in the support, so , not . An arrival after minutes has probability .
Quantile
Definition Let have CDF and let . The -quantile of is the smallest number with . When is continuous, at that number, and is the only solution of unless stays at the level over an interval. The th percentile is another name for the -quantile, so the th percentile is the -quantile. For , solving gives
In plain words A quantile runs the CDF backward. Start from a probability and find the smallest threshold with at least that much probability at or below it. A quantile is a threshold of the distribution, not a new parameter and not a guarantee about one observation.
Example For the shuttle, minutes and minutes. So , and in this model percent of the probability lies above minutes. The th percentile is not the latest possible time, which is .
Median
Definition A median of is a number with and . The -quantile is always a median. When is continuous, the condition becomes . A median need not be unique, since every point of an interval on which stays at is a median. For , the median is unique and equals the midpoint .
In plain words A median has at least half of the probability on each side, counting the median itself, so for a continuous CDF it splits the probability into two exact halves. For a uniform distribution the density is flat and symmetric about the midpoint, so the split falls there, where the mean also sits. For other shapes the median and the mean can differ.
Example For the shuttle, the median is minutes. Now let have density on and on and elsewhere, which is not a uniform distribution on a single interval. Its CDF equals for all , so every number in is a median, and the -quantile is .
Mean and variance of a uniform distribution
Definition If , then
and . The mean comes from
For the variance, let be the half-width. The centered variable has density on , so
In plain words The mean is the midpoint, because the flat density balances there. The variance depends only on the width of the interval, not on where it sits, and doubling the width multiplies the variance by and the standard deviation by . Variance is in squared units, and the standard deviation is in the units of .
Example For the shuttle, minutes and squared minutes, so minutes. Any other interval of width , such as , gives the same variance but the mean .
Conditional uniform distribution
Definition Let and . The event has probability , and given this event, is uniform on . For , the common factor cancels in the ratio of probabilities, so
More generally, conditioning a variable with density on an interval with gives the conditional density for in and elsewhere. The conditional law is uniform here only because is constant on the interval.
In plain words Learning that landed in a subinterval removes the rest of the support and rescales what is left to total probability . A flat density stays flat, and a density that is not flat on the subinterval keeps its shape there, only rescaled. The formula needs an event of positive probability, so it cannot condition on a single exact value.
Example Suppose the shuttle has not arrived by minute . Given , the arrival time is uniform on , and
which matches the length ratio . The density on behaves differently. Given , its conditional density is on , which is not flat, and rather than .
Change of units for a density
Definition Let have density , and let for constants and , as in a change from minutes to seconds or from degrees Celsius to degrees Fahrenheit. Then has density
The reason is the substitution with , which matches each integral of over an interval of values with an integral of over the corresponding interval of values. Probabilities of the same event are unchanged, and when the moments of are finite, , and . In particular, if , then .
In plain words A density is probability per unit, so its height changes when the size of the unit changes. Measuring in seconds stretches the axis by a factor of , and the height shrinks by the same factor so that areas stay the same. A density value needs its units to be read correctly.
Example In seconds the shuttle time is , with density per second instead of per minute. Arriving between and minutes is the event , with probability as before. The mean is seconds, the standard deviation is seconds, and the variance is squared seconds. Keeping the height on the new interval would give a total area of , not . Likewise, a temperature uniform on degrees Celsius is uniform on degrees Fahrenheit, with density per degree Fahrenheit.
Check yourself
- Let . Find , , and .
Show the answer
The support has width , so the density is . The part of the event inside the support is , of width , so . The mean is the midpoint , and
so .
- A sensor voltage is modeled as uniform on volts. A student says the model is impossible because its density is greater than . Is the student right? Find , then express the model in millivolts and give the density and the standard deviation in both units.
Show the answer
The student is wrong. The density is measured per volt and is not a probability. Only areas have to be at most , and the total area is . The interval has width , so .
In millivolts the reading is , with density per millivolt. The same event is , and its probability is again. The standard deviations are
in volts and in millivolts. The second number is times the first, because one volt is millivolts.
- For again, find the -quantile and . A classmate answers the second part with . Explain the mistake.
Show the answer
The quantile is , so . Given , an event of probability , the variable is uniform on , so the conditional probability is the length ratio . The original law gives the same answer,
The classmate found the probability of the joint event among all outcomes, , and did not divide by . Conditioning changes the reference group to the positive values, whose probability is rescaled to .