Chapters 23 C and D Powerpoint

Download Report

Transcript Chapters 23 C and D Powerpoint

Chapter 23C:
Expected Values of Discrete
Random Variables

The mean, or expected value, of
a discrete random variable is
  E( x)   xp( x).
1
Probability
Center
.40
.35
.30
.25
.20
.15
Lousy
Good
OK
Great
.10
.05
-4
-2
0
2
4
6
8
10
12
Profit
The mean of the probability distribution is
the expected value of X, denoted E(X)
E(X) is also denoted by the Greek letter
µ (mu)
Interpretation

E(x) is a “long run” average;
if you perform the experiment many times
and observe the random variable x each
time, then the average x of these observed
x-values will get closer to E(x) as you
observe more and more values of the random
variable x.
Interpretation

E(x) is not the value of the random
variable x that you “expect” to observe
if you perform the experiment once
Expected Value
I flip a coin. If it lands on heads you win $5. If it lands on
tails, you win nothing. What is the expected value?
1
1
($5  )  ($0  )  $2.50
2
2
Expected Value
I flip the same coin. This time if it lands on heads you
win $5, but if it lands on tails, you win $3. What is the
expected value?
1
1
($5  )  ($3  )  $4.00
2
2
Expected Value
This time, you win $5 if the coin lands on heads, but if it lands
on tails, you owe me $6. Calculate the expected value.
1
1
($5  )  ($6  )  $0.50
2
2
If you play ten times, you
Can expect to lose $5.
Example: coin tossing


Suppose a fair coin is tossed 3 times and
we let x = the number of heads.
Find m = E(x).
First we must find the probability
distribution of x.
Example (cont.)

Possible values of x: 0, 1, 2, 3.

p(1)?

An outcome where x = 1: THT

P(THT)? (½)(½)(½)=1/8

How many ways can we get 1 head in 3
tosses? 3C1=3
Example (cont.)
p(0)  3 C0 
 
3
1 1 1 2
p(1)  3 C1  2   2   8
3
1 2 1 1
p(2)  3 C2  2   2   8
1 3 1 0
1
p(3)  3 C3  2   2   8
1 0
2
1 3
2
 81
Example (cont.)

So the probability distribution of x is:
x 0
p(x) 1/8
1
3/8
2
3/8
3
1/8
 So the probability distribution of x is:
Example
x
p(x)
0
1/8
1
3/8
E(x) (or μ ) is
E(x)
4
  x  p(x )
i
i
i 1
 (0  1 )  ( 1 3 )  (2  3 )  (3  1 )
8
8
8
8
 12  1.5
8
2
3/8
3
1/8
Roulette

The roulette wheel has
alternating black and red
slots numbered
1 through 36.

There are also 2 green slots
numbered 0 and 00.

A bet on any one of the 38
numbers (1-36, 0, or 00)
pays odds of 35:1; that is . . .

If you bet $1 on the winning
number, you receive $36, so
your winnings are $35
American Roulette 0 - 00
(The European version has only one 0.)
Roulette Wheel: Expected Value of a
$1 bet on a single number

Let x be your winnings resulting from a $1 bet
on a single number; x has 2 possible values
x
p(x)



-1
37/38
35
1/38
E(x)= -1(37/38) + 35(1/38) = -.05
So on average the house wins 5 cents on every
such bet. A “fair” game would have E(x)=0.
The roulette wheels are spinning 24/7, winning
big $$ for the house, resulting in …
Expected Values of Discrete
Random Variables

Given: E(x)= -1(37/38) + 35(1/38) = -.05

How can you make this a “fair” game?
 37 
 1 
0  1   D  
 38 
 38 
37  D
0
38
0  37  D
D  $37
16
Homework

Page 616 (1 – 14)
17
Chapter 23D
The Binomial Distribution
18
Binomial example
Take 5 coins and toss them once.
What’s the probability that you flip
exactly 3 heads and 2 tails?
Binomial example
Solution: One way to get exactly 3 heads: HHHTT
What’s the probability of this exact arrangement?
P(heads) x P(heads) x P(heads) x P(tails) x P(tails)
= (½)3 x ( ½)2
Another way to get exactly 3 heads: THHHT
Probability of this exact outcome =
= (½)1 x ( ½)3 x (½)1 = (½)3 x ( ½)2
Binomial example
Solution: Another way to get exactly 3 heads:
THHHT
Probability of this exact outcome =
= (½)1 x ( ½)3 x (½)1 = (½)3 x ( ½)2
Binomial distribution
In fact, (½)3 x ( ½)2 is the probability of each
unique outcome that has exactly 3 heads and 2
tails.
The overall probability of 3 heads and 2 tails is:
[(½)3 x ( ½)2 ]+ [(½)3 x ( ½)2 ] + [(½)3 x ( ½)2 ] +…..
for as many unique arrangements as there are—
but how many are there?
ways to
  arrange
 
 3  3 heads
5
5C3
= 5!/(3!2!)
= 10
Outcome
Probability
THHHT
(1/2)3 x (1/2)2
HHHTT
(1/2)3 x (1/2)2
TTHHH
(1/2)3 x (1/2)2 Probability of
HTTHH
(1/2)3 x (1/2)2 each unique
HHTTH
(1/2)3 x (1/2)2 outcome
THTHH
(1/2)3 x (1/2)2 (note: they are
HTHTH
(1/2)3 x (1/2)2 all equal)
HHTHT
(1/2)3 x (1/2)2
THHTH
(1/2)3 x (1/2)2
HTHHT
(1/2)3 x (1/2)2
10 arrangements x (1/2)3 x (1/2)2
5
P(3 heads and 2 tails) = x P(heads)3 x P(tails)2
 3
= 10 x (½)5 = 31.25%
Binomial distribution function:
X= the number of heads tossed
p(x)
0
10 ways
31.25%
1
2
3
4
number of heads
5
x
Example 2
As voters exit the polls, you ask a representative
random sample of 6 voters if they voted for
proposition 100.
If the true percentage of voters who vote for the
proposition is 55.1%, what is the probability that,
in your sample, exactly 2 voted for the
proposition and 4 did not?
Solution:





2 
6
ways to
arrange 2 Yes
votes among 6
voters
Outcome
YYNNNN
NYYNNN
NNYYNN
NNNYYN
NNNNYY
Probability
= (.551)2 x (.449)4
= (.551)2 x (.449)4
= (.551)2 x (.449)4
= (.551)2 x (.449)4
= (.551)2 x (.449)4
15 arrangements .x (.551)2 x (.449)4
P(2 yes votes exactly) =
6
 
 2
x (.551)2 x (.449)4 = 18.5%
Binomial distribution, generally
Note the general pattern emerging  if you have only two possible
outcomes (call them 1/0 or yes/no or success/failure) in n independent
trials, then the probability of exactly X “successes”=
n = number of trials
n X
n X
  p (1  p)
X
X=#
successes
out of n
trials
p = probability of
success
1-p = probability
of failure
Binomial distribution: example

If I toss a coin 20 times, what’s the
probability of getting exactly 10 heads?
 20  10 10
 (.5) (.5)  .176
 10 
Homework


Page 620 (3-5)
Page 622 (Odds)
30