Stanford STATS 210 - Expected value and variance; binomial distribution

Unformatted text preview:

Expected value and variance; binomial distribution June 24, 2004Recall: expected valueExpected ValueExample: the lotteryLotterySlide 6Slide 7Empirical Mean (each person, cell, etc. counts once)Variance/standard deviationEmpirical VarianceBinomial distributionSlide 12Slide 13PowerPoint PresentationSlide 15Binomial distribution function: X= the number of heads tossed in 5 coin tossesBinomial distribution, generallyBinomial distribution: definitionsSlide 19Binomial distribution: exampleSlide 21In-Class ExerciseSlide 23Slide 24Slide 25Slide 26Reading for this weekReading for next weekExpected value and variance;Expected value and variance;binomial distributionbinomial distributionJune 24, 2004June 24, 2004Recall: expected valueRecall: expected value xall )( )p(xxXEiiDiscrete case:Continuous case:dx)p(xxXEii xall)(Expected ValueExpected ValueExpected value is an extremely useful concept for good decision-making!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?LotteryLottery8-49610 x 7.2 816,983,131!6!43!4911x$ p(x)-1 .999999928+ 2 million 7.2 x 10--8Calculate 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.Expected ValueExpected Valuex$ p(x)-1 .999999928+ 2 million 7.2 x 10--8The probability functionExpected ValueE(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!Expected ValueExpected ValueIf you play the lottery every week for 10 years, what are your expected winnings or losses? 520 x (-.86) = -$447.20Empirical 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: = NxNi1nxXni1Variance/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”).Empirical VarianceEmpirical Variance The variance of a population: 2 = The variance of a sample: s2 = NxNii21)(1)(21nxxNiiBinomial distributionBinomial distributionIntroduction:Take the example of 5 coin tosses. What’s the probability that you flip exactly 3 heads in 5 coin tosses?Binomial distributionBinomial distributionSolution:One way to get exactly 3 heads: HHHTTWhat’s the probability of this exact arrangement?P(heads)xP(heads) xP(heads)xP(tails)xP(tails) =(1/2)3 x (1/2)2Another 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)2Binomial distributionBinomial distributionIn 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??ways to arrange 3 heads in 5 trialsThe 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)2TTHHH (1/2)3 x (1/2)2HTTHH (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 535C3 = 5!/3!2! = 10P(3 heads and 2 tails) = x P(heads)3 x P(tails)2 = 10 x (½)5=31.25% 53xp(x)0 34 512Binomial distribution function:Binomial distribution function:X= the number of heads tossed in 5 coin X= the number of heads tossed in 5 coin tossestossesnumber of headsBinomial distribution, Binomial distribution, generallygenerallyrnrnrpp)1(1-p = probability of failurep = probability of successr = # successes out of n trialsn = number of trialsNote 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”=Binomial distribution: Binomial distribution: definitionsdefinitionsBinomial: 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 pWe 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) = rnrnrpp)1(Binomial distributionBinomial distributionRECALL: 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 Binomial distribution: exampleBinomial distribution: exampleIf I toss a coin 20 times, what’s the probability of getting exactly 10 heads?176.)5(.)5(.10102010Binomial distribution: exampleBinomial distribution: exampleIf I toss a coin 20 times, what’s the probability of getting of getting 2 or less heads?447201822025720191201720200200108.1108.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(.xxxxxxxxIn-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


View Full Document

Stanford STATS 210 - Expected value and variance; binomial distribution

Documents in this Course
Load more
Download Expected value and variance; binomial distribution
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view Expected value and variance; binomial distribution and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Expected value and variance; binomial distribution 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?