Ripetizioni di Analisi
EN

Theory

Random variables and continuous distributions

Calculating probabilities, quantiles, and moments from a density and using the main families of continuous distributions.

On this page
  1. Densities and interval probabilities
  2. Cumulative distribution functions, quantiles, and moments

In chapter 5 random variables took isolated values, such as the number of defective items in a batch, and each value had a probability. Many quantities, such as the waiting time at a service counter or the weight of a package, instead take every value in an interval. For them a single exact value has probability zero, and the probability of an interval is computed as an area under the graph of a function called a density. For example, if the lifetime of a light bulb has mean hours and follows the exponential distribution of this chapter, the probability that it lasts more than hours is .

From the density one obtains, with integrals in place of the sums of chapter 5, the cumulative distribution function, the quantiles (for example the threshold within which of the waiting times end), the expected value and the variance. Then come the continuous distributions used in the rest of the course: uniform, exponential, normal, gamma, chi-square, Student’s t and F.

The chapter belongs to the part of the course on probability (chapters 3 to 7), which is used to measure the error made in passing from a sample to the whole population. Chapter 7 extends the density to several variables. In chapter 8 the normal distribution is the approximate distribution of the mean of a large sample, and in chapters 10 and 11 the quantiles of these distributions give the endpoints of confidence intervals and the thresholds of tests.

Densities and interval probabilities

1. Density of a random variable

As in chapter 5, a random variable assigns a number to each outcome of an experiment; here the number is a measurement that can fall at any point of an interval, such as the duration of a test. The distribution of is the rule that gives, for every interval of numbers, the probability that falls in it.

A bus passes every minutes and a student arrives at the stop at a random time. The wait , in minutes, lies between and , and waiting intervals of the same length have the same probability. Hence , because the interval from to covers of the minutes. The same number is the area of the rectangle with base from to and height . Every probability about the wait is therefore an area under the function equal to between and and zero elsewhere; the total area is . Where values are more probable, the function is higher.

A density is an integrable function such that for every , , and

If has a density, its distribution is called absolutely continuous. The density is nonnegative because probabilities are not negative, and its total area is because this is the probability that takes some value.

The set of points where the density is positive is called the support of , as in the discrete case of chapter 5; for the bus it is . If is measured in seconds, is expressed in , because height times base must give a pure number. Changing a density at finitely many points leaves all areas unchanged, because a point has zero width; for this reason the value at the endpoints of the pieces, such as at and , is chosen for convenience.

Finding the normalizing constant

Let for and elsewhere. The constant must be chosen so that the total area is ; for this reason it is called the normalizing constant. We obtain

It follows that , and with this value the function is nonnegative throughout the support. To find , integrate only from to . The area from to is that of the triangle with base and height , so it equals . The two areas add to , so the area from to is .

x y 121 O
fX(x)=x2f_X(x)=\dfrac{x}{2}
The shaded area is the probability that X lies between 1 and 2

2. Probability at a single point

For the bus, a wait between and minutes has probability . A wait of exactly minutes has probability at most for every , so it is zero.

If has a density, then for every . Consequently, the probability of an interval is the same whichever endpoints are included:

For the discrete variables of chapter 5, by contrast, including the endpoints changes the result.

Proof

The event is contained in for every , so does not exceed the integral of over . Since is integrable, the integral over tends to zero as . The probability of the single point lies between zero and a quantity that tends to zero, so it is zero.

A density can be greater than one

The value is a height, whereas probabilities are areas. The constant density on has height , because its area must equal . Thus the normalization condition constrains the integral of the density and leaves its height free.

A positive probability at a single value, on the other hand, cannot come from any density, by the theorem on the probability at a single point. If a waiting time is zero with probability , because one customer in four finds the counter free, its distribution has no density.

Cumulative distribution functions, quantiles, and moments

1. Cumulative distribution function

As in chapter 5, the cumulative distribution function gives, for every threshold , the probability that does not exceed . For the bus wait, for example, , which is the area of the rectangle between and . For a variable with a density, the cumulative distribution function is the area accumulated to the left of the threshold:

The function has three properties.

  • is nondecreasing, because as increases the interval of integration grows and the integrand is nonnegative.
  • is continuous, because the area over intervals whose lengths approach zero tends to zero.
  • As the function tends to , because the area accumulated to the left of shrinks to zero. As it tends to , because all the area of the density is accumulated.

Once is known, the probability of an interval follows from two of its values, without computing integrals:

because the second term removes the area accumulated up to .

A cumulative distribution function on three intervals

Let for and zero elsewhere. If , the accumulated area is . To the left of the support no area has accumulated, while to the right all of it has. The cumulative distribution function therefore equals for , for , and for . The calculation gives the probability that falls between the midpoint of the interval and its right endpoint.

From the cumulative distribution function to the density

Probabilities and thresholds are read directly from the cumulative distribution function; the expected value and the variance of the next section require the density instead, which is obtained from the distribution function. At a point where is continuous, the fundamental theorem of calculus gives . For example, the distribution function on has derivative , which is the density we started from. If the distribution function is continuous and differentiable on a finite number of pieces, the density is obtained by differentiating piece by piece. A horizontal portion of the distribution function, such as for , has derivative zero and corresponds to an interval of zero probability.

If the distribution function has a jump at a point , the size of the jump is the probability of the point, as for discrete variables:

where is the left-hand limit of chapter 5. Since with a density every point has probability zero, a variable whose distribution function has a jump has no density. For the wait that is zero with probability , the distribution function jumps from to at , and differentiating the pieces without jumps gives a function with area .

2. Lower-tail quantile

To find within how many minutes the bus arrives in of cases, one looks for the threshold with , that is, minutes.

The probability to the left of a threshold, , is called the lower tail; the probability to the right, , is called the upper tail. Let . The quantile of order is the smallest threshold at which the lower tail reaches at least :

The symbol denotes the infimum of the set. If the distribution function is continuous and strictly increasing around the threshold, the quantile is the unique solution of , as for the bus.

The median is the quantile , which splits the probability into two halves; for the bus it is minutes. A threshold with probability to its right has lower tail , because the two tails sum to one, so it is the quantile .

Reading a quantile from the cumulative distribution function

For a distribution function equal to between and , the quantile of order satisfies . The root belongs to the interval, so it is the required threshold. The negative root lies outside the interval on which the distribution function equals .

x F_X 11 O 0.50.25
The cumulative distribution function reaches at the threshold

The infimum is needed when the distribution function stays constant at level over a whole interval. If the density equals on and on and zero elsewhere, the distribution function equals for every between and , so all these thresholds solve . The definition selects the smallest one, hence .

End of the free preview

The theory of this topic continues with 7 more sections

  1. Expected value and variance
  2. The uniform distribution
  3. The exponential distribution
  4. The normal distribution and standardization
  5. Gamma, chi-square, Student’s t, and F distributions
  6. Monotone transformations
  7. Keep studying

Full access also includes the other 7 worked examples of this topic and the solutions of the 14 practice exercises.

Unlock Statistics and probability · €49

Read the first 3 worked examples in this chapter for free.

Report a mistake

Where:

Ripetizioni di Analisi

Keep studying

With a free account, you can pick up where you left off and see your progress next time you visit.

Sign up for free

Already have an account? Sign in

Contents