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 p_{X|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 p_{x}(x) and p_{y}(y) can be calculated as follows:

= p

_{x,y}(x,0) + p_{x,y}(x,1) + p_{x,y}(x,2)

p_{x}(0) = p_{X,Y}(0,0) + p_{X},Y(0,1) + pX,Y(0,2)

= 2/9 + 1/3 + 1/15

= 28/45

px(1) = p_{X,Y}(1,0) + p_{X,Y}(1,1) + ~~p~~_{X,Y}~~(1,2)~~

= 2/9 + 2/15

= 16/45

p_{x}(2) = p_{X,Y}(2,0) + ~~p~~_{X,Y}~~(2,1)~~ +~~ p~~_{X,Y}~~(2,2)~~

= 1/45Â

Â

p_{y}(0) = p_{X,Y}(0,0) + p_{X,Y}(1,0) + p_{X,Y}(2,0)

= 2/9 + 2/9 + 1/45

= 7/15

p_{y}(1) = p_{X,Y}(0,1) + p_{X,Y}(1,1) + ~~p~~_{X,Y}~~(2,1)~~

= 1/3 + 2/15

= 7/15

p_{y}(2) = p_{X,Y}(0,2) + ~~p~~_{X,Y}~~(1,2)~~ + ~~p~~_{X,Y}~~(2,2)~~

= 1/15

The conditional probability of X given Y is calculated as follows:

p_{x}(0|0) = (15/7) p_{X,Y}(0,0) = (15/7) (2/9) = 10/21

p_{x}(1|0) = (15/7) p_{X,Y}(1,0) = (15/7) (2/9) = 10/21

p_{x}(2|0) = (15/7) p_{X,Y}(2,0) = (15/7) (1/45) = 1/21

p_{x}(0|1)= (15/7) p_{X,Y}(0,1) = (15/7) (1/3) = 5/7

p_{x}(1|1)= (15/7) p_{X,Y}(1,1) = (15/7) (2/15) = 2/7

p_{x}(2|1)= (15/7) p_{X,Y}(2,1) = (15/7) (0) = 0

p_{x}(0|2) = 15 p_{X,Y}(0,2) = 15 (1/15) = 1

p_{x}(1|2) = 15 p_{X,Y}(1,2) = 15 (0) = 0

p_{x}(2|2) = 15 p_{X,Y}(2,2) = 15 (0) = 0

The conditional probability of Y given X is calculated as follows:

p_{y}(0|0) = (45/28) p_{X,Y}(0,0) = (45/28)(2/9) = 5/14

p_{y}(1|0) = (45/28) p_{X,Y}(0,1) = (45/28)(1/3) = 15/28

p_{y}(2|0) = (45/28) p_{X,Y}(0,2) = (45/28)(1/15) = 3/28

p_{y}(0|1) = (45/16) p_{X,Y}(1,0) = (45/16)(2/9) = 5/8

p_{y}(1|1) = (45/16) p_{X,Y}(1,1) = (45/16)(2/15) = 3/8

p_{y}(2|1) = (45/16) p_{X,Y}(1,2) = (45/16)(0) = 0

p_{y}(0|2) = 45 p_{X,Y}(2,0) = 45 (1/45) = 1

p_{y}(1|2) = 45 p_{X,Y}(2,1) = 45 (0) = 0

p_{y}(2|2) = 45 p_{X,Y}(2,2) = 45 (0) = 0