Hello, dear friend, you can consult us at any time if you have any questions, add WeChat: daixieit

ECON30020 Mathematical Economics

Tutorial 10. Probability, Expectations and Integration.

Question 1.  Rolling three fair dice

Derive the probability mass function (pmf) p(x) for the sum of dots for rolling three fair dice. Derive the expected value of the sum.  Then illustrate the pmf for the sum and the average number per die on a graph; compare to the cases of two dice (derived in class) and a single die.

Solution.  Consider random variable X = sum for three dice, then SX  = {3, . . . , 18} and the number of different outcomes  IΩI is 63  = 216.  For each value of the sum x  e SX, we rst need to compute how many different outcomes ω  e  induce x.   Denoting this number of outcomes by h(x), the probability p(x) that random variable X is equal to x, is then calculated as p(x) = h(x)/216.

In order to derive h(x), it is useful to recall that there are 3! = 6 different permutations of (a, b, c) (if a, b and c are all different); they are (a, b, c), (a, c, b), (b, a, c), (b, c, a), (c, a, b) and (c, b, a);     3!/(2!1!) = 3 different permutations of (a, a, b) (if a and b are different), and 1 of (a, a, a).  In what follows, we abuse notation and write #(a, b, c) = 6, #(a, a, b) = 3 and #(a, a, a) = 1.

1. x = 3: there is only one outcome that leads to sum = 3; #(1, 1, 1) = 1.

❼ Hence: h(3) = 1,    p(3) = 1/216

2. x = 4:  one die lands on 2 and the other two on 1; three outcomes:  (1 , 1, 2), (1, 2, 1) and (2,1,1); i.e., #(1, 1, 2) = 3.

Hence h(4) = 3,    p(4) = 3/216

3. x = 5: #(1, 1, 3) + #(1, 2, 2) = 6.

❼ Hence h(5) = 6,    p(5) = 6/216

4. x = 6: #(1, 1, 4) + #(1, 2, 3) + #(2, 2, 2) = 10.

❼ Hence h(6) = 10,    p(6) = 10/216

5. x = 7: #(1, 1, 5) + #(1, 2, 4) + #(1, 3, 3) + #(2, 2, 3) = 15.

❼ Hence h(7) = 15,    p(7) = 15/216

6. x = 8: #(1, 1, 6) + #(1, 2, 5) + #(1, 3, 4) + #(2, 2, 4) + #(2, 3, 3) = 21.

❼ Hence h(8) = 21,    p(8) = 21/216

7. x = 9: #(1, 2, 6) + #(1, 3, 5) + #(1, 4, 4) + #(2, 2, 5) + #(2, 3, 4) + #(3, 3, 3) = 25.

❼ Hence h(9) = 25,    p(9) = 25/216

8. x = 10: #(1, 3, 6) + #(1, 4, 5) + #(2, 2, 6) + #(2, 3, 5) + #(2, 4, 4) + #(3, 3, 4) = 27. ❼ Hence h(10) = 27,    p(10) = 27/216

9.  ...  (will be symmetric) h(11) = 27,    p(11) = 11/216 and so on.

Note that      h(x) = 108 = 216/2 as it should be.

  

The graphs of pmfs of the sum are provided for the cases of n = 4, 3, 2 dice and a single die. For the single die, distribution is uniform; for two dice, it is triangular, but for the three dice it has the bell shape, it looks more like the normal distribution.  For the four dice, it looks even more like normal distribution. Convergence to the normal distribution is very quick in this case.

PMFs for the average number per die for the same four cases are given below. Again, you can see that with more dice, they have the bell shape, resembling the normal distribution more closely.

As for the expected value, noticing that that p(x) = p(21 - x) for any x e SX, we have

10                                                      10

E[X] =         xp(x) =      (x + 21 - x)p(x) = 21      p(x) = 21/2 =  10.5

Sx                            北=3                                                   北=3

as we should: the expected value of rolling three independent dice must be equal to three times the expected value of a single die, i.e., EX = 3 * 3.5 = 10.5.

 

Question 2.  Rolling three fair dice, continued

Assume that the dice are of three different colours:  red (die 1), yellow (die 2) and green (die 3).  Let i, j and k be the numbers on dice 1, 2 and 3 correspondingly.  If X1, X2  and X3  are the random variables representing numbers for dice 1, 2 and 3 correspondingly, then the sum of numbers on the red and yellow dice is X = X1 + X2  and the sum of numbers on the yellow and green dice is Y = X2 + X3 .

(a) What is P (X1  = 4IY = 10), the conditional probability that the red die lands on 4 given

that the sum of the other two dice is equal to 10)?

(b) What is P (X = 5IY = 6), the conditional probability that the sum of the red and yellow

dice is 5 given that the sum of the yellow and green dice is 6)?

(c) What is E(XIY = 4), the conditional expected value of the sum of the red and yellow dice given that the sum of yellow and green dice is equal to 4?

(d) What is E(XIY < 4), the conditional expected value of the sum of the red and yellow dice given that the sum of yellow and green dice is less than 4?

Solution.

(a) As all rolls of dice are independent, the conditional probability is equal to unconditional

probability; every number is equally likely, so P (X1 = 4IY = 10) = P (X1 = 4) = 1/6.

(b) If Y = 6, then the yellow and green dice should give us (1, 5), (2, 4), (3, 3), (4, 2) or (5, 1),

while the red die could have any number from 1 to 6. This gives us 5*6 = 30 equally likely outcomes.  How many of them satisfy X = 5?  Only four:  (4, 1, 5), (3, 2, 4), (2, 3, 3) and (1, 4, 2). Therefore, the required probability is P (X = 5IY = 6) = 4/30 = 2/15 s 0.13.

(c) If Y = 4, then the yellow and green dice should give us (1 , 3), (2, 2) or (3, 1), while the red die could have any number from 1 to 6. Therefore, there are 3 * 6 = 18 equally likely outcomes.

Then for (j, k) = (1, 3) there is exactly one outcome for any value of the sum from 2 to 7; for (j, k) = (2, 2) there is exactly one outcome for any value of the sum from 3 to 8;        and for (j, k) = (3, 1) there is exactly one outcome for any value of the sum from 4 to 9.

Therefore, there is only one outcome  (1, 1, 3) with the sum of the red and yellow dice X = 2 (given that the sum of yellow and green dice Y = 4), so the probability of X = 2 is 1/18;

there are two outcomes with X = 3 (they are (2, 1, 3) and (1, 2, 2)), so probability that X = 3 is 2/18;

for X = 4, 5, 6, 7 there are three outcomes, so probability = 3/18;

for X = 8, probability = 2/18,

and for X = 9, probability = 1/18.

Thus, the conditional expected value is

E(XIY = 4) = 2 *  + 3 *  + (4 + 5 + 6 + 7) *  + 8 *  + 9 *  = 5.5.

(d) If Y < 4, then the yellow and green dice should give us (1, 1), (1, 2) or (2, 1), while the red die could have any number from 1 to 6. Therefore, there are 3 * 6 = 18 equally likely outcomes.

When (j, k) = (1, 1), for any value of the sum X from 2 to 7, there is one outcome; when (j, k) = (1, 2), for any value of X from 2 to 7, there is one outcome;

when (j, k) = (2, 1), for any value of X from 3 to 8, there is one outcome.

Therefore, the conditional expectation is

E(XIY < 4) = 2 *  + (3 + 4 + 5 + 6 + 7) *  + 8 *  =  s 4.83

Question 3.  Total probability and Bayes Rule

A reliable network consists of three links. This network fails only if at least two out of the three links fail. Assume that failures of different links are independent. Probabilities of links 1, 2 and 3 to fail are 0.2, 0.3 and 0.4 correspondingly.

(a) What is the probability of the network’s failure?

(b) If we know that network failed, what is the probability that it was links one and two that

failed, while link three was working perfectly?

Hint:  use Bayes’ Rule

P (BIAi)P (Ai)        P (BIAi)P (Ai)   

P (B)                 k P (BIAk)P (Ak) ,

where {A1, A2 , . . . } are disjoint and exhaustive events, for example, A1  = ”all links failed”, A2 = ”links 1 and 2 failed, link 3 is working”, and so on until A8 = ”all links are working perfectly” .

Solution.   Let B = ”the network failed” .

Probabilities of links 1, 2 and 3 to fail are 0.2, 0.3 and 0.4 correspondingly; therefore, probabil- ities of links to work are 0.8, 0.7 and 0.6 correspondingly.

Note that we only need to calculate P (Ai) for those events where P (BIAi)  0.

A1  = ”000: all links failed”, P (BIA1) = 1; P (A1) = 0.2 * 0.3 * 0.4 = 0.024.

A2 = ”001: links 1 and 2 failed, link 3 is working”, P (BIA2) = 1; P (A2) = 0.2 * 0.3 * 0.6 = 0.036. A3  = ”010: 1 failed, 2 is working, 3 failed”, P (BIA3) = 1; P (A3) = 0.2 * 0.7 * 0.4 = 0.056.

A4  = ”011: link 1 failed, links 2 and 3 are working”, P (BIA4) = 0.

A5  = ”100”: P (BIA5) = 1; P (A5) = 0.8 * 0.3 * 0.4 = 0.096.

A6  = ”101”: P (BIA6) = 0.

A7  = ”110”: P (BIA7) = 0.

A7  = ”111”: P (BIA8) = 0.

Therefore, the probability for the network to fail is

P (B) =       P (BIAk)P (Ak) = 1 * 0.024 + 1 * 0.036 + 1 * 0.056 + 1 * 0.096 =  0.212 .

k

Substituting into the Bayes’ formula, we obtain the conditional probability that only links one and two failed, given that the network failed.

P (BIA2)P (A2)        P (BIA2)P (A2)         1 * 0.036      9 

P (B)                 k P (BIAk)P (Ak)        0.212        53

Question 4.  CDF, PDF and the expected value

Consider a continuous random variable X with the cdf given by (with positive parameter a):

,

FX (x) =xa ,   0 5 x 5 1,

(a) Find the pdf fX (x).

(b) Calculate the expected value EX .

Solution.

(a) PDF is a derivative of CDF (almost everywhere):

fX (x) = FX (x) =

(b) The expected value

E[X] =    xfX (x)dx =   0 1 xaxa1dx = a  0 1 xa dx =  xa+10(1) =  .

Question 5.  CDF, PDF and the expected value

Consider a continuous random variable Y with the cdf given by (with positive parameter a):

,

GY(y) =1 - (1 - y)a ,   0 5 y 5 1,

(a) Find the pdf gY (y).

(b) Calculate the expected value EY .

Solution.

(a) PDF is a derivative of CDF (almost everywhere):

gY (y) = GY(y) =

(b) The expected value

←                                 1

E[Y] =         yfY (y)dy =       ya(1 - y)a1dy = (substituting x = 1 - y, dy = -dx) =

←←                              0

0                                                1                                                1                                1

= -a      (1 - x)xa1dy = a      (1 - x)xa1dy = a      xa1dy - a      xa dy =

1                                                0                                                0                                0

= xa I0(1) -  xa+10(1) = 1 -  =  .