20 Conditional Distributions
- The conditional distribution of
given is the distribution of values over only those outcomes for which . It is a distribution on values of only; treat as a fixed constant when conditioning on the event . - Conditional distributions can be obtained from a joint distribution by slicing and renormalizing.
- Conditioning on the value of a random variable involves treating that random variable as a constant.
- It is sometimes possible to identify one-way conditional distributions (
given , or given ) simply by inspecting the joint distribution, without doing any calculations. - Be sure to distinguish between joint, conditional, and marginal distributions.
- The joint distribution is a distribution on
pairs. A mathematical expression of a joint distribution is a function of both values of and values of . Pay special attention to the possible values; the possible values of one variable might be restricted by the value of the other. - The conditional distribution of
given is a distribution on values (among pairs with a fixed value of ). A mathematical expression of a conditional distribution will involve both and , but is treated like a fixed constant and is treated as the variable. Note: the possible values of might depend on the value of , but is treated like a constant. - The marginal distribution of
is a distribution on values only, regardless of the value of . A mathematical expression of a marginal distribution will have only values of the single variable in it; for example, an expression for the marginal distribution of will only have in it (no , not even in the possible values).
- The joint distribution is a distribution on
20.1 Discrete random variables: Conditional probability mass functions
Example 20.1
Roll a fair four-sided die once and let
- Identify the possible values of
.
- Identify the possible values of
.
- Find the conditional distribution of
given .
- Find the conditional distribution of
given .
- Find the probability that
and .
- Find the probability that
and for .
- Find the joint distribution of
and .
- Find the marginal distribution of
.
- Find the conditional distribution of
given .
- Let
and be two discrete random variables defined on a probability space with probability measure . For any fixed with , the conditional probability mass function (pmf) of given is a function defined by . - To emphasize, the notation
represents the distribution of the random variable given a fixed value of the random variable . In the expression , is treated as the variable and is treated like a fixed constant. - Notice that the pmfs satisfy
- Conditional distributions can be obtained from a joint distribution by slicing and renormalizing. The conditional pmf of
given can be thought of as:- the slice of the joint pmf
of corresponding to , a function of alone, - renormalized — by dividing by
— so that the probabilitiess, corresponding to different values, for the slice sum to 1.
- the slice of the joint pmf
- For a fixed
, the shape of the conditional pmf of given is determined by the shape of the -slice of the joint pmf, . That is,
- For each fixed
, the conditional pmf is a different distribution on values of the random variable . There is not one “conditional distribution of given ”, but rather a family of conditional distributions of given different values of . - Rearranging the definition of a conditional pmf yields the multiplication rule for pmfs of discrete random variables
- Marginal distributions can be obtained from the joint distribution by collapsing/stacking using the law of total probability. The law of total probability for pmfs is
Example 20.2
- Donny Dont says: “Wait, the joint pmf is supposed to be a function of both
and but is only a function of .” Explain to Donny how here is, in fact, a function of both and .
- In which direction will it be easier to find the conditional distributions by inspection -
given or given ?
- Without doing any calculations, find the conditional distribution of
given .
- Without summing over the joint pmf, find the marginal probability that
.
- Without doing any calculations, find a general expression for the conditional distribution of
given .
- Without summing over the joint pmf, find the marginal pmf of
.
- Describe a dice rolling scenario in which (
, ) pairs would follow this joint distribution. (Hint: you might need multiple kinds of dice.)
- Construct a two-way table representing the joint pmf, and use it to verify your answers to the previous parts.
- Find the marginal pmf of
. Be sure to identify the possible values.
- Find the conditional pmf of
given . Be sure to identify the possible values.
20.2 Continuous random variables: Conditional probability density functions
- Let
and be two continuous random variables with joint pdf and marginal pdfs . For any fixed with , the conditional probability density function (pdf) of given is a function defined by - To emphasize, the notation
represents a conditional distribution of the random variable for a fixed value of the random variable . In the expression , is treated like a constant and is treated as the variable. - Notice that the pdfs satisfy
- Conditional distributions can be obtained from a joint distribution by slicing and renormalizing. The conditional pdf of
given can be thought of as:- the slice of the joint pdf
of corresponding to , a function of alone, - renormalized — by dividing by
— so that the density heights, corresponding to different values, for the slice are such that the total area under the density slice is 1.
- the slice of the joint pdf
- For a fixed
, the shape of the conditional pdf of given is determined by the shape of the -slice of the joint pdf, . That is,
- For each fixed
, the conditional pdf is a different distribution on values of the random variable . There is not one “conditional distribution of given ”, but rather a family of conditional distributions of given different values of . - Rearranging the definition of a conditional pdf yields the multiplication rule for pdfs of continuous random variables
- Marginal distributions can be obtained from the joint distribution by collapsing/stacking using the law of total probability. The law of total probability for pmfs is
- Remember that the probability that a continuous random variable is equal to a particular value is 0; that is, for continuous
, . When we condition on we are really conditioning on and seeing what happens in the idealized limit when . - When simulating, never condition on
; rather, condition on where represents some suitable degree of precision (e.g. if rounding to two decimal places). - Remember pdfs do not return probabilities directly;
is not a probability of anything. But is related to the probability that is “close to” given that is “close to” :
Example 20.3
Spin the Uniform(1, 4) spinner twice and let
the marginal pdf of
and the marginal pdf of
- Find
, the conditional pdf of given .
- Find
.
- Find
, the conditional pdf of given .
- Find
.
- Find
, the conditional pdf of given , for .
- Find
, the conditional pdf of given .
- Find
, the conditional pdf of given .
- Find
, the conditional pdf of given .
Example 20.4
Suppose
- Donny Dont says: “Wait, the joint pdf is supposed to be a function of both
and but is only a function of .” Explain to Donny how here is, in fact, a function of both and .
- Identify by name the one-way conditional distributions that you can obtain from the joint pdf (without doing any calculus or computation).
- Identify by name the marginal distribution you can obtain without doing any calculus or computation.
- Describe how could you use the Exponential(1) spinner and the Uniform(0, 1) spinner to generate an
pair.
- Sketch a plot of the joint pdf.
- Sketch a plot of the marginal pdf of
.
- Set up the calculation you would perform to find the marginal pdf of
.
20.3 Independence of random variables
Example 20.5 Suppose
1 | 2 | 3 | |||
0 | 0.20 | 0.50 | 0.10 | 0.80 | |
1 | 0.05 | 0.10 | 0.05 | 0.20 | |
0.25 | 0.60 | 0.15 |
- Are the events
and independent?
- Are the random variables
and are independent? Why?
- What would the joint pmf need to be in order for random variables with these marginal pmfs to be independent?
- Two random variables
and defined on a probability space with probability measure are independent if for all . That is, two random variables are independent if their joint cdf is the product of their marginal cdfs. - Random variables
and are independent if and only if the joint distribution factors into the product of the marginal distributions. The definition is in terms of cdfs, but analogous statements are true for pmfs and pdfs. Intuitively, random variables and are independent if and only if the conditional distribution of one variable is equal to its marginal distribution regardless of the value of the other. - If
and are independent, then the (renormalized) distributions of values along each -slice have the same shape as each other, and the same shape as the marginal distribution of .
Example 20.6
Recall Example 19.2. Let
The marginal pmf of
The marginal pmf of
- Find the probability that the home teams hits 2 home runs.
- Are
and independent? (Note: we’re asking about independence in terms of the assumed probability model, not for your opinion based on your knowledge of baseball.)
- Find the probability that the home teams hits 2 home runs and the away team hits 1 home run.
- Find the probability that the home teams hits 2 home runs given the away team hits 1 home run.
- Find the probability that the home teams hits 2 home runs given the away team hits at least 1 home run.
Example 20.7
Let
- Without doing any calculations, find the conditional distributions and marginal distributions.
- Are
and independent?
- Sketch a plot of the joint pdf of
and .
- Find
.
- Find
.
- Continuous random variables
and are independent if and only if their joint pdf can be factored into the product of a function of values of alone and a function of values of alone. - That is,
and are independent if and only if there exist functions and for which
and are independent if and only if the joint pdf factors into a product of the marginal pdfs.- The above result says that you can determine if that’s true without first finding their marginal distributions.