Conditional Probability Distribution
The conditional probability distribution of a discrete random variable X, given a second discrete random variable Y, is the probability distribution of X conditioned on the fact that Y assumes a value y. The conditional probability distribution of X given Y is denoted by pX|Y(x|y) and is defined as
Conditional probabilities, like simple probabilities, also sum up to 1, i.e.,
If X and Y are independent random variables, then
i.e., the probability distribution of X is not affected by the value of Y, and vice-versa.
EX. The random variables X and Y have the following joint probability distribution:
(x, y) | pX,Y(x, y) |
 |  |
(0,0) | 2/9 |
(0, 1) | 1/3 |
(0, 2) | 1/15 |
(1, 0) | 2/9 |
(1, 1) | 2/15 |
(2, 0) | 1/45 |
The marginal distributions px(x) and py(y) can be calculated as follows:
= px,y(x,0) + px,y(x,1) + px,y(x,2)
px(0) = pX,Y(0,0) + pX,Y(0,1) + pX,Y(0,2)
= 2/9 + 1/3 + 1/15
= 28/45
px(1) = pX,Y(1,0) + pX,Y(1,1) + pX,Y(1,2)
= 2/9 + 2/15
= 16/45
px(2) = pX,Y(2,0) + pX,Y(2,1) + pX,Y(2,2)
= 1/45Â
Â
py(0) = pX,Y(0,0) + pX,Y(1,0) + pX,Y(2,0)
= 2/9 + 2/9 + 1/45
= 7/15
py(1) = pX,Y(0,1) + pX,Y(1,1) + pX,Y(2,1)
= 1/3 + 2/15
= 7/15
py(2) = pX,Y(0,2) + pX,Y(1,2) + pX,Y(2,2)
= 1/15
The conditional probability of X given Y is calculated as follows:
px(0|0) = (15/7) pX,Y(0,0) = (15/7) (2/9) = 10/21
px(1|0) = (15/7) pX,Y(1,0) = (15/7) (2/9) = 10/21
px(2|0) = (15/7) pX,Y(2,0) = (15/7) (1/45) = 1/21
px(0|1)= (15/7) pX,Y(0,1) = (15/7) (1/3) = 5/7
px(1|1)= (15/7) pX,Y(1,1) = (15/7) (2/15) = 2/7
px(2|1)= (15/7) pX,Y(2,1) = (15/7) (0) = 0
px(0|2) = 15 pX,Y(0,2) = 15 (1/15) = 1
px(1|2) = 15 pX,Y(1,2) = 15 (0) = 0
px(2|2) = 15 pX,Y(2,2) = 15 (0) = 0
The conditional probability of Y given X is calculated as follows:
py(0|0) = (45/28) pX,Y(0,0) = (45/28)(2/9) = 5/14
py(1|0) = (45/28) pX,Y(0,1) = (45/28)(1/3) = 15/28
py(2|0) = (45/28) pX,Y(0,2) = (45/28)(1/15) = 3/28
py(0|1) = (45/16) pX,Y(1,0) = (45/16)(2/9) = 5/8
py(1|1) = (45/16) pX,Y(1,1) = (45/16)(2/15) = 3/8
py(2|1) = (45/16) pX,Y(1,2) = (45/16)(0) = 0
py(0|2) = 45 pX,Y(2,0) = 45 (1/45) = 1
py(1|2) = 45 pX,Y(2,1) = 45 (0) = 0
py(2|2) = 45 pX,Y(2,2) = 45 (0) = 0