Chapter 3 Conditional Distributions

Nike and Adidas have opened up new neighboring sports stores which have found themselves in direct competition with each other. Let SNike be the total sales in the Nike store, and let SAdidas be the total sales in the Adidas store. Phil Knight, the co-founder of Nike, would like to know the sales of the Adidas store in order to make business decisions regarding his own store. However Phil is not privy to this information. Phil only knows the exact sales of the Nike store. Given the information about SNike, what can be said about SAdidas?

3.1 Conditional Probabilities and Discrete Conditional Distributions

The problem described above concerning sales in a Nike and Adidas store is in a continuous setting, that is, S1 and S2 are both continuous random variables. We have encountered this type of conditional problem in the context of probabilities. In this section, we recall this theory and extend it to discrete random variables.

Consider two events A and B such that P(B)>0. The probability of event A happening given that B has already happened is called the conditional probability of A given B, and is denoted P(AB). The conditional probability can be calculated by the formula P(AB)=P(AB)P(B).

Why does Definition 3.1.1 specify that P(B)>0? The reason for this has both a real-world interpretation and a mathematical one. The statement that P(B)=0 is equivalent to B being an impossible event. If B was an impossible event, then the assumption that B has already happened in Definition 3.1.1 would be a contradiction. Mathematically if P(B)=0, then we are unable to divide by P(B) in the formula P(AB)=P(AB)P(B). Therefore we must specify that P(B)>0.

Consider the cafe from Example 2.5.2, where the owner has collected data to determine the joint probabilities of the temperature X in degrees Celsius during winter and the number of customers Y in the cafe each day. The joint probability table is

The owner would like to make a decision about how many staff are on shift today. Given that it is going to be 20C, what is the probability that there are 75 customers?



In mathematical language, the question is asking us to calculate P(Y=75X=20). Using the formula of Definition 3.1.1, we know that P(Y=75X=20)=P(X=20Y=75)P(X=20). Calculate that

P(X=20)=P(X=20,Y=15)+P(X=20,Y=75)+P(X=20,Y=150)=0.04+0.05+0.01=0.1

Therefore

P(Y=75X=20)=P(X=20Y=75)P(X=20)=0.050.1=12

Can we extend this idea of conditional probability to the language of discrete random variables?

Recall that for a random variable X, the probability P(X=x) is given by the evaluation of the probability mass function pX(x) of X. Similarly for two random variables X and Y, the probability P(X=x,Y=y) is given by the evaluation of the joint probability mass function pX,Y(x,y). Converting Definition 3.1.1 into these terms leads us to the following.

Consider two discrete random variables X and Y. Let pX,Y(x,y) be the joint PMF of X and Y, and pY(y) be the marginal PMF of Y. The conditional probability mass function of X given that Y=y, denoted pX|Y(xy), is the function

pX|Y(x|y)={pX,Y(x,y)pY(y),if pY(y)>0,0,if pY(y)=0.

The conditional PMF pY|X(yx) is defined similarly.

The value pX|Y(x|y) is equal to the probability P(X=xY=y).

Calculate the conditional PMF of Y given X for the random variables given in Example 3.1.2.



By applying Definition 3.1.3, calculate that

pY|X(15|0)=pX,Y(15,0)pX(0)=0.070.07+0.11+0.01=0.368,pY|X(75|0)=pX,Y(75,0)pX(0)=0.110.19=0.579,pY|X(150|0)=pX,Y(150,0)pX(0)=0.010.19=0.053,pY|X(15|10)=pX,Y(15,10)pX(10)=0.230.23+0.43+0.05=0.323,pY|X(75|10)=pX,Y(75,10)pX(10)=0.430.71=0.606,pY|X(150|10)=pX,Y(150,10)pX(10)=0.050.71=0.071,pY|X(15|20)=pX,Y(15,20)pX(20)=0.040.04+0.05+0.01=0.4,pY|X(75|20)=pX,Y(75,20)pX(20)=0.050.1=0.5,pY|X(150|20)=pX,Y(150,20)pX(20)=0.010.1=0.1.
Note that the calculation of pY|X(75|20) is consistent with the solution of Example 3.1.2.

Let y be some fixed outcome for the random variable Y. The sum of conditional probabilities pX|Y(x|y) over all values of x will sum to 1 since this is a complete set of possible outcomes. This can be verified for the solution to Example 3.1.4, for example:

pY|X(15|0)+pY|X(75|0)+pY|X(150|0)=0.368+0.579+0.053=1.

Check that the sum, over all possible outcomes x, of values p(x10) and values p(x20) respectively, both equal 1.

Consider two discrete random variables X and Y. The conditional CDF of X given Y=y is FX|Y(x|y)=xxpX|Y(x|y).

It follows from Definition 3.1.5 that FX|Y(x|y)=P(Xx|Y=y).

3.2 Continuous Conditional Distributions

Consider the Nike versus Adidas example at the opening of the chapter. This is a conditional probability problem but now in the continuous setting. For two continuous random variables X and Y, the formula P(Y=yX=x)=P(X=xY=y)P(X=x) breaks down because P(X=x)=0 for a fixed value x since X is continuous.

The theory of discrete random variables in Section 3.1 motivates the definition of conditional random variables in the continuous setting.

Consider two continuous random variables X and Y. Let fX,Y be the joint PDF of X and Y, and fY(y) be the marginal PDF of Y. The conditional PDF of X given that Y=y is defined by

fX|Y(x|y)={fX,Y(x,y)fY(y),if fY(y)>0,0,if fY(y)=0.

This definition avoids the above problem that fY(y)P(Y=y).

Consider the two random variables X,Y from Example 2.1.6 governing scores in a game played between Abbie and Bertie. The joint PDF is

fX,Y(x,y)={24x(1xy),if x,y0 and x+y1,0,otherwise.

Find the conditional PDF of Abbie’s score given that Bertie scored 12.



In mathematical language, the question asks us to calculate fXY(x12). In Example 2.1.8, we found

fY(y)={4(1y)3,0y1,0,otherwise.
Therefore by Definition 3.1.4,
fX|Y(x|y)=fX,Y(x,y)fY(y)={24x(1xy)4(1y)3,if x,y0 and x+y1,0,otherwise.={6x(1xy)(1y)3,if x,y0 and x+y1,0,otherwise.
Setting y=12 obtain
fX|Y(x|12)=fX,Y(x,12)fY(12)={6x(12x)(12)3,if 0x12,0,otherwise,={48x(12x),if 0x12,0,otherwise.

Let y be some fixed outcome for the random variable Y. It can be shown that RfXY(xy)dx=1. This is the continuous analogous to the result for discrete random variable that xfXY(xy)=1 for a fixed value y.

Let S be a subset of R. What is the probability that the random variable X belongs to S given that Y=y? This can be calculated using the conditional PDF fX|Y(x|y):

P(XSY=y)=SfXY(xy)dx.

This leads us to the following definition.

Consider two continuous random variables X and Y. The conditional CDF of X given Y=y is

FX|Y(x|y)=xfX|Y(u|y)du.

It follows from Definition 3.2.3 that FX|Y(x|y)=P(Xx|Y=y).