If and are both discrete, their joint probability mass function is
Quiz: What does the ‘,’ mean here? ‘and’.
As in the earlier chapters we will concentrate on discrete random variables taking integer values.
Properties of :
For all and : .
.
.
The joint pmf of X and Y is
for .
Write out the joint probability table.
Show this is a valid joint pmf.
Evaluate
,
,
,
.
Solution.
is
Validity: and
If and are discrete random variables their marginal pmfs are
,
.
Quiz: For which of the above questions did you calculate a marginal pmf? (c)(i).
Bivariate random variables and have joint pmf
0 | 1 | 2 | 3 | ||
---|---|---|---|---|---|
1 | 5/60 | 8/60 | 2/60 | 1/60 | |
2 | 12/60 | 7/60 | 3/60 | 2/60 | |
3 | 4/60 | 8/60 | 6/60 | 2/60 |
Find the marginal pmfs.
Solution.
0 | 1 | 2 | 3 | |||
---|---|---|---|---|---|---|
1 | 5/60 | 8/60 | 2/60 | 1/60 | 16/60 | |
2 | 12/60 | 7/60 | 3/60 | 2/60 | 24/60 | |
3 | 4/60 | 8/60 | 6/60 | 2/60 | 20/60 | |
21/60 | 23/60 | 11/60 | 5/60 | 1 |
If and are discrete random variables, the conditional pmfs are
,
.
For the joint pmf in Example 5.3.2 obtain the conditional pmf of given .
Solution.
0 | 1 | 2 | 3 | |||
---|---|---|---|---|---|---|
1 | 2/60 | 16/60 | ||||
2 | 3/60 | 24/60 | ||||
3 | 6/60 | 20/60 | ||||
11/60 |
So
Thus , and This conditional pmf is not the same as the marginal pmf. Knowing has changed the distribution for .
Independence is the simplest form for joint behaviour of two (or more) random variables. Informally, two random variables and are independent if knowing the value of one of them gives no information about the value of the other. The outcomes of, say, a roll of a dice and a toss of a coin are independent in exactly this sense: knowing that the coin came down tails does not give us any information about the score of the dice, and, conversely, knowing that the score of the dice was does not give any information about the coin.
Formally, we say that two random variables and are independent if the events and are independent for all sets and , i.e.
for all sets , .
Independence in terms of the pmfs. Two discrete random variables and are independent if and only if
for all , .
If and are independent, discrete random variables we get by letting and that
by independence, so .
Conversely, if the joint pmf factorises we get for arbitrary sets and
∎
When the discrete variables are independent then for all :
,
.
These results conform with intuition as when and are independent knowing the value of should tell us nothing about and vice versa. In Example 5.3.3 the conditional (given ) and marginal pmfs for differ, so and are not independent; they are dependent.
The converse intuition is also true: if the conditional distribution of given is independent of or, equivalently, the conditional distribution of given is independent of , then and are independent.
A fair coin is tossed. If it turns a fair die is thrown, if a biased die. The bias makes even numbers twice as probable as odd numbers. Find the joint pmf of , the toss of the coin, and , the score on the die. Find the distribution of the coin toss given that the die shows a .
Solution. Code and as and to make rvs. Marginal: for .
Conditional:
: for .
: for and for Hence
Using delivers
1 | 2 | 3 | 4 | 5 | 6 | |
---|---|---|---|---|---|---|
0 | 1/18 | 2/18 | 1/18 | 2/18 | 1/18 | 2/18 |
1 | 1/12 | 1/12 | 1/12 | 1/12 | 1/12 | 1/12 |
So and hence