Section 3.3: Expected value of Discrete RandomVariables1Section 3.3 introduces the following concepts andformulae:• Suppose the PMF of X is given by p(a) =P (X = a).• Expected value (expectation or mean): de-fined byµ = E(X) =Xap(a).• Expected value of a function of random vari-able:E[h(X)] =Xh(a)p(a)for any function h.• Rules of expected value: for two constants kand b, there isE(kX + b) = kE(X) + b = kµ + b.• Variance.V (X) = E[(X − µ)2].• Rules of variance: for any two constants k andb, there isV (kX + b) = k2V (X).2First example of Section 3.3:• The PMF of X isa 1 2 3 4 5 6 7p(a) 0.01 0.03 0.13 0.25 0.39 0.17 0.02Count 150 450 1950 3750 5850 2550 300Total count is 15000.• Expected value of X is the weighted average,it can beµ = 1(0.01) + 2(0.03) + ··· + 7(0.02) = 4.57orµ = 1(15015000)+2(45015000)+···+7(30015000) = 4.57.3Second example of Section 3.3: example 3.17.• The PMF of X is given bya 0 1 2 3 4 5p(a) 0.002 0.001 0.002 0.005 0.02 0.04a 6 7 8 9 10p(a) 0.18 0.37 0.25 0.12 0.01• The expected value isE(X) = µ=0(0.002) + 1(0.001) + 2(0.002) + ···+ 8(0.25) + 9(0.12) + 10(0.01)=7.15.•E(X2)=02(0.002) + 12(0.001) + 22(0.002) + ···+ 82(0.25) + 92(0.12) + 102(0.01)=52.704.• The variance isV (X) = σ2= 52.704 − 7.152= 1.5815• The standard deviation isσ =√1.5815 = 1.2576.4Third example of Section 3.3: example 3.18.• The PMF of X isp(x) =1 − p, x=0p x=10 otherwise• Then,E(X) = 0(1 − p) + 1(p) = pandE(X2) = 02(1 − p) + 12(p) = p.Thus,V (X) = p − p2= p(1 − p).5Fourth example of Section 3.3: example 3.20.• The PMF of X isp(x) =(k/x2x = 1, 2, 3, ···0, otherwise• Then, we have∞Xx=1p(x) = 1⇒k = [∞Xx=11x2]−1=6π2.• Since∞Xx=1xp(x) =6π2∞Xx=11x= ∞the expected value E(X) does not exist.6Fifth example of Section 3.3: example 3.22.• The PMF of X isx 4 6 8p(x) 0.5 0.3 0.2• Then,E(X) = 4(0.5) + 6(0.3) + 8(0.2) = 5.4.• Suppose Y = h(X) = 20 + 3X + 0.5X2. Then,the PMF of Y isy 40 56 76p(y) 0.5 0.3 0.2• Thus,E(Y ) = E[h(Y )]=(40)(0.5) + (56)(0.3) + (76)(0.2)=h(4)0.5 + h(6)0.3 + h(8)0.2=52.7Sixth example of Section 3.3: example 3.10 again.• The PMF of X isx 1 2 3 4p(x) 0.1 0.2 0.3 0.4• Then, E(X) = 3 and V (X) = 1.• Let Y = h(X) = 800X − 900. Then,E(Y ) = 800E(X) − 900 = 1500andV (Y ) = 8002V (X) = 8002.8Seventh example of Section 3.3: Flip a dice twiceand let X be the sum of the two outcomes. Then,X is a discrete random variable.• Compute the probability mass function (PMF)of X.Answer:x 2 3 4 5 6 7p(x) 1/36 2/36 3/36 4/36 5/36 6/36x 8 9 10 11 12p(x) 5/36 4/36 3/36 2/36 1/36• Use PMF to compute P (2 ≤ X ≤ 4), P (2 ≤X < 4), P (X ≥ 4). Answer:P (2 ≤ X ≤ 4) = p(2) + p(3) + p(4) =636P (2 ≤ X < 4) = P (2) + P (3) =336andP (X ≥ 4) = p(4) + p(5) + ··· + p(12) =3336.9• Compute the cumulative distribution function(CDF) of X.AnswerF (x) =0 x < 21/36 2 ≤ x < 33/36 3 ≤ x < 46/36 4 ≤ x < 510/36 5 ≤ x < 615/36 6 ≤ x < 721/36 7 ≤ x < 826/36 8 ≤ x < 930/36 9 ≤ x < 1033/36 10 ≤ x < 1135/36 11 ≤ x < 121 x ≥ 12• Use CDF to compute P (2 ≤ X ≤ 4), P (2 ≤X < 4), P (X ≥ 4).Answer:P (2 ≤ X ≤ 4) = F (4) − F (1) =636P (2 ≤ X < 4) = F (3) − F (1) =336andP (X ≥ 4) = 1 − F (3) =3336.10• Compute E(X).E(X) = 2(136) + 3(236) + ··· + 12(136) = 7.• Compute V (X).E(X2) = 22(136)+32(236)+···+122(136) = 54.83.ThenV (X) = 54.83 − 72= 5.83.• Compute the standard deviation of X.qV (X) =√5.83 = 2.415.11Eighth example of Section 3.3: Suppose the CDFof a random variable X is given byF (x) =0, when x < 00.2, when 0 ≤ x < 10.35, when 1 ≤ x < 2,0.65, when 2 ≤ x < 30.85 when 3 ≤ x < 41, when x ≥ 4.• Compute the PMF of X. Answer:p(0) = F (0) − F (−1) = 0.2 − 0 = 0.2p(1) = F (1) − F (0) = 0.35 − 0.2 = 0.15p(2) = F (2) − F (1) = 0.65 − 0.35 = 0.3p(3) = F (3) − F (2) = 0.85 − 0.65 = 0.2andp(4) = F (4) − F (3) = 1 − 0.85 = 0.15.12• Compute P (1 ≤ X ≤ 3), P (1 < X < 3), P (1 <X ≤ 3), P (1 ≤ X < 3).Answer:P (1 ≤ X ≤ 3) = F (3)−F (0) = 0.85−0.2 = 0.65P (1 < X < 3) = F (2)−F (1) = 0.65−0.35 = 0.3P (1 < X ≤ 3) = F (3)−F (1) = 0.85−0.35 = 0.5.P (1 ≤ X < 3) = F (2)−F (0) = 0.65−0.2 = 0.45.• Compute E(X).Answer: E(X) = 1.95• Compute V (X).Answer: E(X2) = 5.55, V (X) = 1.7475• Compute the standard deviation of X.Answer:√1.7475 =
View Full Document