130 likes | 356 Views
Chapter 7 Expectation. 7.1 Mathematical expectation. 7.1 Mathematical Expectation. Mathematical expectation =expected long run average Simulation 1: toss a fair coin H 1, T 0. n=10 times: 1 0 1 1 1 0 1 1 0 1 Average=0.7. More flips. n=100:
E N D
Chapter 7 Expectation • 7.1 Mathematical expectation
7.1 Mathematical Expectation • Mathematical expectation =expected long run average • Simulation 1: toss a fair coin H1, T0. n=10 times: 1 0 1 1 1 0 1 1 0 1 Average=0.7
More flips • n=100: 0 0 0 1 0 0 1 0 1 1 1 1 1 1 1 0 0 1 0 0 0 0 1 1 1 0 0 1 1 1 1 0 1 0 0 1 0 0 1 1 1 0 1 0 1 0 1 0 1 1 0 1 0 0 1 1 1 0 1 1 0 0 1 0 0 0 1 0 1 0 0 1 1 0 1 1 1 0 1 0 1 1 1 0 0 0 1 1 0 0 0 1 1 0 0 0 1 0 1 0 average=0.51 • n=10,000, we would expect to get 5000 heads and 5000 tails. average=0.508
What is the value for expected long run average? • Conjecture: ½ ½ probability to get 0, ½ probability to get 1 (½) (0)+ (½) (1)=1/2
Roll a die With equal probabilities 1/6 x 1 2 3 4 5 6 p(x) 1/6 1/6 1/6 1/6 1/6 1/6 Toss 6000 times about 1,000 of each x-value.
Roll some more Some simulations: Roll n=10 times: 6 5 6 4 6 3 4 1 2 2 Average=3.9 x<-round(runif(10)*6+0.5) • n=100 1000 10,000 100,000 Average 3.56 3.527 3.5008 3.49386 Average 3.49949 3.5
For numerical outcomes • Get x with probability P(x) Values x1 x2 … xk Prob p1 p2 … pk P(X1) P(X2) … P(Xk) Mathematical expectation of X is given by E=E(x)= x1 p1+x2p2+…+ xkpk = x1 p(x1)+x2p(x2)+…+ xkp(xk)
Raffle ticket x $0 $100 p(x) 199/200 1/200 This is the population mean for the population of possible ticket prizes. 1 out of every 200 tickets 0 0 0 100
Example 7.1 • Toss a fair coin until a head or quit at 3 tosses Expected tosses needed? X P(x) • ½ H • ¼=(½) (½) TH • ¼ TTH, TTT • E(X)=(1)(½)+(2)(¼)+(3)(¼)=1.75 If we repeated this experiment over and over, we would average 1.75 tosses.
Example 7.3 • Gambling: A and B roll two dice. If A’s number is larger, A wins dollars for the amount he got on the top of the die, otherwise, A loses $3. Expected gain of A?
Solution x P(x) -3 21/36 2 1/36 3 2/36 4 3/36 5 4/36 6 5/36 E=7/36
Example • X=# of birds fledged from a nest xp(x) 0 0.2 1 0.2 2 0.4 3 0.2 1.0 What is the expected value of x? On average, how many birds are fledged per nest?
20% 0 20% 1 40% 2 20% 3 m=1.6 1 3 2 2 0