+ All Categories
Home > Documents > Expected value and variance; binomial distribution June 24, 2004

Expected value and variance; binomial distribution June 24, 2004

Date post: 06-Jan-2016
Category:
Upload: cili
View: 44 times
Download: 0 times
Share this document with a friend
Description:
Expected value and variance; binomial distribution June 24, 2004. Recall: expected value. Discrete case:. Continuous case:. Expected Value. Expected value is an extremely useful concept for good decision-making!. Example: the lottery. - PowerPoint PPT Presentation
28
Expected value and Expected value and variance; variance; binomial distribution binomial distribution June 24, 2004 June 24, 2004
Transcript
Page 1: Expected value and variance; binomial distribution June 24, 2004

Expected value and variance;Expected value and variance;binomial distributionbinomial distribution

June 24, 2004June 24, 2004

Page 2: Expected value and variance; binomial distribution June 24, 2004

Recall: expected valueRecall: expected value

xall

)( )p(xxXE ii

Discrete case:

Continuous case:

dx)p(xxXE ii xall

)(

Page 3: Expected value and variance; binomial distribution June 24, 2004

Expected ValueExpected Value

Expected value is an extremely useful concept for good decision-making!

Page 4: Expected value and variance; binomial distribution June 24, 2004

Example: the lotteryExample: the lottery

The Lottery (also known as a tax on people who are bad at math…)

A certain lottery works by picking 6 numbers from 1 to 49. It costs $1.00 to play the lottery, and if you win, you win $2 million after taxes.

If you play the lottery once, what are your expected winnings or losses?

Page 5: Expected value and variance; binomial distribution June 24, 2004

LotteryLottery

8-

49

6

10 x 7.2 816,983,13

1

!6!43!49

11

x$ p(x)

-1 .999999928

+ 2 million 7.2 x 10--8

Calculate the probability of winning in 1 try:

The probability function (note, sums to 1.0):

“49 choose 6”

Out of 49 numbers, this is the number of distinct combinations of 6.

Page 6: Expected value and variance; binomial distribution June 24, 2004

Expected ValueExpected Value

x$ p(x)

-1 .999999928

+ 2 million 7.2 x 10--8

The probability function

Expected Value

E(X) = P(win)*$2,000,000 + P(lose)*-$1.00 = 2.0 x 106 * 7.2 x 10-8+ .999999928 (-1) = .144 - .999999928 = -$.86  

Negative expected value is never good! You shouldn’t play if you expect to lose money!

Page 7: Expected value and variance; binomial distribution June 24, 2004

Expected ValueExpected Value

If you play the lottery every week for 10 years, what are your expected winnings or losses?  520 x (-.86) = -$447.20

Page 8: Expected value and variance; binomial distribution June 24, 2004

Empirical MeanEmpirical Mean(each person, cell, etc. counts once)(each person, cell, etc. counts once)

True mean of a population: =   

Sample mean, for a sample of n subjects: =

N

xN

i1

n

x

X

n

i 1

Page 9: Expected value and variance; binomial distribution June 24, 2004

Variance/standard deviationVariance/standard deviation

Probability distributions not only have central tendency (means), but also have ranges (described by variance or standard deviation).

Var(x) =E(x-)2

“The expected (or average) squared distance (or deviation) from the mean”

**We square because squaring has better properties than absolute value. Take square root to get back linear average distance from the mean (=”standard deviation”).

Page 10: Expected value and variance; binomial distribution June 24, 2004

Empirical VarianceEmpirical Variance

The variance of a population: 2 =   

The variance of a sample: s2 =

N

xN

ii

2

1

)(

1

)( 2

1

n

xxN

ii

Page 11: Expected value and variance; binomial distribution June 24, 2004

Binomial distributionBinomial distribution

Introduction:

Take the example of 5 coin tosses. What’s the probability that you flip exactly 3 heads in 5 coin tosses?

Page 12: Expected value and variance; binomial distribution June 24, 2004

Binomial distributionBinomial distribution

Solution:One way to get exactly 3 heads: HHHTT

What’s the probability of this exact arrangement?P(heads)xP(heads) xP(heads)xP(tails)xP(tails) =(1/2)3 x

(1/2)2

Another way to get exactly 3 heads: THHHTProbability of this exact outcome = (1/2)1 x (1/2)3 x (1/2)1

= (1/2)3 x (1/2)2

Page 13: Expected value and variance; binomial distribution June 24, 2004

Binomial distributionBinomial distribution

In fact, (1/2)3 x (1/2)2 is the probability of each unique outcome that has exactly 3 heads and 2 tails.

So, the overall probability of 3 heads and 2 tails is:

(1/2)3 x (1/2)2 + (1/2)3 x (1/2)2 + (1/2)3 x (1/2)2 + ….. for as many unique arrangements as there are—but how many are there??

Page 14: Expected value and variance; binomial distribution June 24, 2004

ways to arrange 3 heads in 5 trials

The probability of each unique outcome (note: they are all equal)

 

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

HTTHH (1/2)3 x (1/2)2

HHTTH (1/2)3 x (1/2)2

HTHHT (1/2)3 x (1/2)2

THTHH (1/2)3 x (1/2)2

HTHTH (1/2)3 x (1/2)2

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

3

5C3 = 5!/3!2! = 10

Page 15: Expected value and variance; binomial distribution June 24, 2004

 P(3 heads and 2 tails) = x P(heads)3 x P(tails)2 =

10 x (½)5=31.25%

5

3

Page 16: Expected value and variance; binomial distribution June 24, 2004

x

p(x)

0 3 4 51 2

Binomial distribution function:Binomial distribution function:X= the number of heads tossed in 5 coin X= the number of heads tossed in 5 coin

tossestosses

number of heads

Page 17: Expected value and variance; binomial distribution June 24, 2004

Binomial distribution, Binomial distribution, generallygenerally

rnrn

rpp

)1(1-p = probability of failure

p = probability of success

r = # successes out of n trials

n = number of trials

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 r “successes”=

Page 18: Expected value and variance; binomial distribution June 24, 2004

Binomial distribution: Binomial distribution: definitionsdefinitions

Binomial: Suppose that n independent experiments, or trials, are performed, where n is a fixed number, and that each experiment results in a “success” with probability p and a “failure” with probability 1-p. The total number of successes, X, is a binomial random variable with parameters n and p

We write: X ~ Bin (n, p) {reads: “X is distributed binomially with parameters n and p}

 And the probability that X=r (i.e., that there are exactly r successes)

is: P(X=r) =

rnrn

rpp

)1(

Page 19: Expected value and variance; binomial distribution June 24, 2004

Binomial distributionBinomial distribution

RECALL: All probability distributions are characterized by an expected value and a variance: If X follows a binomial distribution with parameters n and p: X ~ Bin (n, p)

Then:  The expected value of a binomial = npThe variance of a binomial = np(1-p)The standard deviation of a binomial = )1( pnp

Page 20: Expected value and variance; binomial distribution June 24, 2004

Binomial distribution: exampleBinomial distribution: exampleIf I toss a coin 20 times, what’s the

probability of getting exactly 10 heads?

176.)5(.)5(. 101020

10

Page 21: Expected value and variance; binomial distribution June 24, 2004

Binomial distribution: exampleBinomial distribution: exampleIf I toss a coin 20 times, what’s the

probability of getting of getting 2 or less heads?

4

472018220

2

572019120

1

72020020

0

108.1

108.1105.9190)5(.!2!18

!20)5(.)5(.

109.1105.920)5(.!1!19

!20)5(.)5(.

105.9)5(.!0!20

!20)5(.)5(.

x

xxx

xxx

x

Page 22: Expected value and variance; binomial distribution June 24, 2004

In-Class ExerciseIn-Class ExerciseSuppose that exactly 55.1% of potential voters who currently favor Kerry (a priori knowledge that only we have!). NBC news conducts a poll which consists of randomly calling 1000 eligible voters and asking their voting preference,• If the NBC researcher samples 1000 random voters, what’s the

probability that exactly 551 of them say that they favor Kerry?• If the NBC researcher samples 1000 random voters, how many do

you expect to say they favor Kerry (if someone is going to pay you a million dollars if you guess this right, what’s your best guess?)

• Calculate the variance and standard deviation of the number of sampled voters (out of 1000) who vote “yes” on the recall.

• If the NBC researcher finds that 400 out of 1000 of his random sample reported that they would voted “yes” for Kerry, what might you think about his sampling methods? (defend your opinion with numbers!)

    

 

Page 23: Expected value and variance; binomial distribution June 24, 2004

In-Class ExerciseIn-Class Exercise

• If the NBC researcher samples 1000 random voters, what’s the probability that exactly 551 of them say that they favor Kerry?

   

4495511000

551)449(.)551(.)551(

)1()(

XP

pprXP rnrn

r

A very small number!

Page 24: Expected value and variance; binomial distribution June 24, 2004

In-Class ExerciseIn-Class Exercise

b. If the NBC researcher samples 1000 random voters, how many do you expect to say they favor Kerry (if someone is going to pay you a million dollars if you guess this right, what’s your best guess?)

   

Your best guess is 551. (1000x.551)

Page 25: Expected value and variance; binomial distribution June 24, 2004

In-Class ExerciseIn-Class Exercisec. Calculate the variance and standard deviation of the number of

sampled voters (out of 1000) who would vote “yes” for Kerry.  

  

Variance=np(1-p)=1000(.551)(.449)=247.4

Standard deviation= square root (247.4)=15.7

Page 26: Expected value and variance; binomial distribution June 24, 2004

In-Class ExerciseIn-Class Exercised. If the NBC researcher finds that 400 out of 1000 of his random

sample reported that they would vote “yes” for Kerry, what might you think about his sampling methods? (defend your opinion with numbers!)

EXPECTED DEVIATION = 15.7; unlikely to see deviation of 151 (which is so much greater than the expected deviation) from the expected value of 551…

Page 27: Expected value and variance; binomial distribution June 24, 2004

Reading for this weekReading for this week

Walker: 1.1-1.2, pages 1-9 

Page 28: Expected value and variance; binomial distribution June 24, 2004

Reading for next weekReading for next week

Walker: 1.3-1.6 (p. 10-22), Chapters 2 and 3 (p. 23-54) 


Recommended