Topics in Probability Theory and Stochastic Processes Steven R. Dunbar. Binomial Distribution

Similar documents
Topics in Probability Theory and Stochastic Processes Steven R. Dunbar. Binomial Distribution

Selected Topics in Probability and Stochastic Processes Steve Dunbar. Partial Converse of the Central Limit Theorem

Topics in Probability Theory and Stochastic Processes Steven R. Dunbar. Waiting Time to Absorption

Stochastic Processes and Advanced Mathematical Finance. Intuitive Introduction to Diffusions

Topics in Probability Theory and Stochastic Processes Steven R. Dunbar. Worst Case and Average Case Behavior of the Simplex Algorithm

Stochastic Processes and Advanced Mathematical Finance. Stochastic Processes

Topics in Probability Theory and Stochastic Processes Steven R. Dunbar. Notation and Problems of Hidden Markov Models

Stochastic Processes and Advanced Mathematical Finance

Stochastic Processes and Advanced Mathematical Finance. Path Properties of Brownian Motion

Topics in Probability Theory and Stochastic Processes Steven R. Dunbar. Stirling s Formula in Real and Complex Variables

Stochastic Processes and Advanced Mathematical Finance. Randomness

Stochastic Processes and Advanced Mathematical Finance. Duration of the Gambler s Ruin

Lecture 4: Probability and Discrete Random Variables

Expected Value 7/7/2006

With Question/Answer Animations. Chapter 7

Discrete Distributions

Discrete Random Variables

Topics in Probability Theory and Stochastic Processes Steven R. Dunbar. Stirling s Formula from the Sum of Average Differences

CSC Discrete Math I, Spring Discrete Probability

UNIT NUMBER PROBABILITY 6 (Statistics for the binomial distribution) A.J.Hobson

Discrete Random Variables

Lecture 2 Binomial and Poisson Probability Distributions

Exam III #1 Solutions

Math489/889 Stochastic Processes and Advanced Mathematical Finance Solutions for Homework 7

Math 564 Homework 1. Solutions.

Topic 3: The Expectation of a Random Variable

Chapter 8: An Introduction to Probability and Statistics

Notes on Discrete Probability

Example 1. The sample space of an experiment where we flip a pair of coins is denoted by:

IEOR 3106: Introduction to Operations Research: Stochastic Models. Professor Whitt. SOLUTIONS to Homework Assignment 1

Section 13.3 Probability

Chapter 2: Random Variables

Conditional Probability

Conditional Probability (cont...) 10/06/2005

Topics in Probability Theory and Stochastic Processes Steven R. Dunbar. Examples of Hidden Markov Models

What is Probability? Probability. Sample Spaces and Events. Simple Event

Statistical Experiment A statistical experiment is any process by which measurements are obtained.

To find the median, find the 40 th quartile and the 70 th quartile (which are easily found at y=1 and y=2, respectively). Then we interpolate:

Discrete Distributions

Chapter 4: An Introduction to Probability and Statistics

Chapter 2: The Random Variable

STA111 - Lecture 1 Welcome to STA111! 1 What is the difference between Probability and Statistics?

Chapter 14. From Randomness to Probability. Copyright 2012, 2008, 2005 Pearson Education, Inc.

Chapter 35 out of 37 from Discrete Mathematics for Neophytes: Number Theory, Probability, Algorithms, and Other Stuff by J. M. Cargal.

Probability, For the Enthusiastic Beginner (Exercises, Version 1, September 2016) David Morin,

Lecture 10: Probability distributions TUESDAY, FEBRUARY 19, 2019

Chapter 5. Means and Variances

Markov Chains. As part of Interdisciplinary Mathematical Modeling, By Warren Weckesser Copyright c 2006.

Monty Hall Puzzle. Draw a tree diagram of possible choices (a possibility tree ) One for each strategy switch or no-switch

Lecture 6. Probability events. Definition 1. The sample space, S, of a. probability experiment is the collection of all

4. The Negative Binomial Distribution

Essentials on the Analysis of Randomized Algorithms

Week 1 Quantitative Analysis of Financial Markets Distributions A

Lecture 3. Discrete Random Variables

Introduction to Probability 2017/18 Supplementary Problems

Exchangeable Bernoulli Random Variables And Bayes Postulate

2!3! (9)( 8x3 ) = 960x 3 ( 720x 3 ) = 1680x 3

1 Basic Combinatorics

Probabilistic models

Random variables. Lecture 5 - Discrete Distributions. Discrete Probability distributions. Example - Discrete probability model

Permutations and Combinations

INTRODUCTION TO MARKOV CHAINS AND MARKOV CHAIN MIXING

Probability Year 9. Terminology

1 Presessional Probability

Great Theoretical Ideas in Computer Science

Department of Mathematics

Discrete Structures for Computer Science

P (A B) P ((B C) A) P (B A) = P (B A) + P (C A) P (A) = P (B A) + P (C A) = Q(A) + Q(B).

CISC 1100/1400 Structures of Comp. Sci./Discrete Structures Chapter 7 Probability. Outline. Terminology and background. Arthur G.

6.3 Bernoulli Trials Example Consider the following random experiments

Discrete Probability

BINOMIAL DISTRIBUTION

1. Sample spaces, events and conditional probabilities. A sample space is a finite or countable set S together with a function. P (x) = 1.

Probabilistic models

Discrete Random Variable

Sec$on Summary. Assigning Probabilities Probabilities of Complements and Unions of Events Conditional Probability

Discrete Random Variables

COMP 2804 Assignment 4

Methods of Mathematics

Discrete Distributions

Lecture Notes 7 Random Processes. Markov Processes Markov Chains. Random Processes

success and failure independent from one trial to the next?

COVENANT UNIVERSITY NIGERIA TUTORIAL KIT OMEGA SEMESTER PROGRAMME: ECONOMICS

STAT:5100 (22S:193) Statistical Inference I

Probability Year 10. Terminology

1 Normal Distribution.

Random variables (discrete)

Lecture 1. ABC of Probability

How are Geometric and Poisson probability distributions different from the binomial probability distribution? How are they the same?

27 Binary Arithmetic: An Application to Programming

A birthday in St. Petersburg

Expected Value - Revisited

Introductory Probability

Lecture 2. Binomial and Poisson Probability Distributions

UNIVERSITY OF CALIFORNIA, BERKELEY

STA Module 4 Probability Concepts. Rev.F08 1

Random Variables Example:

Introduction to Probability, Fall 2009

Sample Spaces, Random Variables

Lower bound for sorting/probability Distributions

Transcription:

Steven R. Dunbar Department of Mathematics 203 Avery Hall University of Nebrasa-Lincoln Lincoln, NE 68588-0130 http://www.math.unl.edu Voice: 402-472-3731 Fax: 402-472-8466 Topics in Probability Theory and Stochastic Processes Steven R. Dunbar Binomial Distribution Rating Mathematically Mature: proofs. may contain mathematics beyond calculus with 1

Section Starter Question Consider a family with 5 children. What is the probability of having all five children be boys? How many children must a couple have for at least a 0.95 probability of at least one girl? What is a proper and general mathematical framewor for setting up the answer to these questions and similar questions? Key Concepts 1. A binomial random variable S n counts the number of successes in a sequence of n trials of an experiment. 2. A binomial random variable S n taes only integer values between 0 and n inclusive and P [S n = ] = p (1 p) n for = 0, 1, 2,..., n. 3. The expectation of a binomial random variable with n trials and probability of success p on each trial is: E [S n ] = np 4. The variance of a binomial random variable with n trials and probability of success p on each trial is: Var [S n ] = npq = np(1 p) 2

Vocabulary 1. An elementary experiment is a physical experiment with two outcomes. An elementary experiment is also called a Bernoulli trial. 2. A composite experiment consists of repeating an elementary experiment n times. 3. The sample space, denoted Ω n is the set of all possible sequences of n 0s and 1s representing all possible outcomes of the composite experiment. 4. A random variable is a function from the sample space Ω n to the real numbers R. Mathematical Ideas Sample Space for a Sequence of Experiments An elementary experiment in this section consists of an experiment with two outcomes. An elementary experiment is also called a Bernoulli trial. Label the outcomes of the elementary experiment 1, occurring with probability p and 0, occurring with probability q, where p + q = 1. Often we name 1 as success and 0 as failure. For example, a coin toss would be a physical experiment with two outcomes, say with heads labeled as success, and tails as failure. A composite experiment consists of repeating an elementary experiment n times. The sample space, denoted Ω n is the set of all possible sequences of n 0 s and 1 s representing all possible outcomes of the composite experiment. We denote an element of Ω n as ω = (ω 1,..., ω n ), where each ω = 0 or 1. That is, Ω n = {0, 1} n. We assign a probability measure P n [ ] on Ω n by multiplying probabilities of each Bernoulli trial in the 3

composite experiment according to the principle of independence. Thus, for = 1,..., n, P [ω = 0] = q and P [ω = 1] = p and inductively for each (e 1, e 2,..., e n ) {1, 0} n P n+1 [ω n+1 = 1 and (ω 1,..., ω ) = (e 1,..., e n )] = P [ω n+1 = 1] P [(ω 1,..., ω n ) = (e 1,..., e n )] Additionally, let S n (ω) be the number of 1 s in ω Ω n. Note that S n (ω) = n =1 ω. We also say S n (ω) is the number of successes in the composite experiment. Then P n [ω] = p Sn(ω) q n Sn(ω). We can also define a unified sample space Ω that is the set of all infinite sequences of 0 s and 1 s. We sometimes write Ω = {0, 1}. Then Ω n is the projection of the first n entries in Ω. A random variable is a function from a set called the sample space to the real numbers R. For example as a frequently used special case, for ω Ω let X (ω) = ω, then X is an indicator random variable taing on the value 1 or 0. X (the dependence on the sequence ω is usually suppressed) indicates success or failure at trial. Then as above, S n = X i = =1 is a random variable indicating the number of successes in a composite experiment. Binomial Probabilities Proposition 1. The random variable S n taes only integer values between 0 and n inclusive and P n [S n = ] = p q n. Remar. The notation P n [ ] indicates that we are considering a family of probability measures indexed by n on the sample space Ω. 4 =1 ω i

Proof. From the inductive definition P [ω i = 0] = q and P [ω i = 1] = p and inductively for each (e 1, e 2,..., e n ) {1, 0} n P n+1 [ω n+1 = 1 and (ω 1,..., ω n ) = (e 1,..., e n )] = P [ω n+1 = 1] P n [(ω 1,..., ω n ) = (e 1,..., e n )] the probability assigned to an ω having 1 s and n 0 s is p (1 p) n = p Sn(ω) (1 p) n Sn(ω). The sample space Ω n has precisely ( n ) such points. By the additive property of disjoint probabilities, P n [S n = ] = p q n. and the proof is complete. Proposition 2. If X 1, X 2,... X n are independent, identically distributed random variables with distribution P [X i = 1] = p and P [X i = 0] = q, then the sum X 1 + +X n has the distribution of a binomial random variable S n with parameters n and p. Proposition 3. 1. 2. E [S n ] = np Var [S n ] = npq = np(1 p) Proof. First Proof: By the binomial expansion (p + q) n = p q n. Differentiate with respect to p and multiply both sides of the derivative by p: np(p + q) n 1 = p q n. Now choosing q = 1 p, np = p (1 p) n = E [S n ]. 5

For the variance, differentiate the binomial expansion with respect to p twice: n(n 1)(p + q) n 2 = ( 1) p 2 q n. Multiply by p 2, substitute q = 1 p,and expand: n(n 1)p 2 = Therefore, 2 p (1 p) n p (1 p) n = E [ S 2 n] E [Sn ] Var [S n ] = E [ S 2 n] (E [Sn ]) 2 = n(n 1)p 2 + np n 2 p 2 = np(1 p) Proof. Second proof: Use that the sum of expectations is the expectation of the sum, and apply it to the corollary with S n = X 1 + + X n with E [X i ] = p. Similarly, use that the sum of variances of independent random variables is the variance of the sum applied to S n = X 1 + + X n with E [X i ] = p(1 p). Examples Example. The following example appeared in the January 20, 2017 Riddler puzzler on the website fivethirtyeight.com. You and I find ourselves indoors one rainy afternoon, with nothing but some loose change in the couch cushions to entertain us. We decide that well tae turns flipping a coin, and that the winner will be whoever flips 10 heads first. The winner gets to eep all the change in the couch! Predictably, an enormous argument erupts: We both want to be the one to go first. What is the first flippers advantage? In other words, what percentage of the time does the first flipper win this game? First solve an easier version of the puzzle where the first person to flip a head will win. Let the person who flips first be A, and the probability that A wins by first obtaining a head is P A. Then adding the probabilities for the disjoint events that the sequence of flips is H, or TTH, or TTTTH and so forth. 6

P A = 1 ( 1 2 + 2 ( = 1 2 = 1 2 ) 2 ( ) 1 + 2 ( 1 2 1 + 1 4 + ( 1 4) 2 +... 1 1 1/4 = 1 2 4 3 = 2 3. ) 4 ( ) 1 +... 2 ) Another way to do this problem would be to use first-step analysis from Marov Chain theory. Then the probability of the first player winning P A is the probability of winning on the first flip plus the probability of both players each losing their first flip at which point the game is essentially starting over, P A = 1 2 + 1 4 P A. Solving, 3P 4 A = 1 or 2 P A = 1 2 4 3 = 2 3. Now extend the same reasoning as in the first approach to the case of the first player to get 10 heads winning. The first case for A to win is to get 9 heads in flips 1, 3, 5,..., 17 and the 10th head on flip 19 and for player B to get anywhere from 0 to 9 heads on flips 2, 4, 6,..., 18. This is probability ( ( 9 1 ) 9 9) 2 1 and cumulative binomial probability 9 ( 9 ) ( 1 9 2 2) respectively. The next disjoint probability case is for A to win is to get 9 heads in flips 1, 3, 5,..., 19 and the 10th head on flip 21 and for player B to get anywhere from 0 to 9 heads on flips 2, 4, 6,..., 20. This is probability ) ( 1 ) 10 2 1 and cumulative binomial probability 9 ( 10 ) ( 1 10 2 2) respectively. ( 10 9 In general, the disjoint probability case is for A to win is to get 9 heads in flips 1, 3, 5,..., 2j 1 and the 10th head on flip 2j + 1 and for player B to get anywhere from 0 to 9 heads on flips 2, 4, 6,..., 2j. This is probability ( j ) ( 1 ) j 9 2 1 and cumulative binomial probability 9 ( j ) ( 1 ) j 2 2 respectively. Then multiplying the independent probabilities for A and B in each case 7

and adding all these disjoint probabilities P A = j=9 ( ) ( j 1 9 2 ) j+1 9 ( ) ( j 1 2 There does not seem to be an exact analytic or closed form expression for this probability as in the case of winning with a single head, so we need to approximate it. In the case of winning with 10 heads, P A 0.53278. Sources This section is adapted from: Heads or Tails, by Emmanuel Lesigne, Student Mathematical Library Volume 28, American Mathematical Society, Providence, 2005, Sections 1.2 and Chapter 4 [3]. The example is heavily adapted from the weely Riddler column of January 20, 2017 from the website fivethirtyeight.com. ) j Algorithms, Scripts, Simulations Algorithm The following Octave code in inefficient in the sense that it generates far more trials than it needs. However, writing the code that captures exactly the number of flips needed on each trial would probably tae more lines, so it is easy to be inefficient here. Scripts 1 p = 0. 5; 2 n = 500; 3 trials = 2000; 4 5 victory = 10; 8

6 7 headstails = ( rand ( n, trials ) <= p ); 8 headstailsa = headstails ( 1: 2: n, :); 9 headstailsb = headstails ( 2: 2: n, :); 10 totalheadsa = cumsum ( headstailsa ); 11 totalheadsb = cumsum ( headstailsb ); 12 13 winsa = zeros (1, trials ); 14 15 for j = 1: trials 16 winsa (1,j) = ( min ( find ( totalheadsa (:,j) == victory )) <= min ( find ( totalheadsb (:,j) == victory )) ); 17 endfor ; 18 empirical = sum ( winsa )/ trials ; 19 20 nrange = [ 9: 40]; 21 A = binopdf (9, nrange,1/2) * (1/2) ; 22 B = binocdf (9, nrange,1/2) ; 23 analytic = dot (A,B); 24 25 disp (" The empirical probability is:") 26 disp ( empirical ) 27 disp (" The approximation to the analytic probabily is:") 28 disp ( analytic ) Problems to Wor for Understanding 1. Solve the example problem for the cases of winning with 2, 3, 4,..., 9 heads. 2. Write a simulation to experimentally simulate the coin-flipping game of the example. Experimentally determine the probability of A winning in the cases of winning with 1, 2, 3,... 10 heads. 9

3. Draw a graph of the probability of A winning versus the number of heads required to win. Reading Suggestion: References [1] Leo Breiman. Probability. SIAM, 1992. [2] William Feller. An Introduction to Probability Theory and Its Applications, Volume I, volume I. John Wiley and Sons, third edition, 1973. QA 273 F3712. [3] Emmanuel Lesigne. Heads or Tails: An Introduction to Limit Theorems in Probability, volume 28 of Student Mathematical Library. American Mathematical Society, 2005. Outside Readings and Lins: 1. Virtual Laboratories in Probability and Statistics Binomial 2. Weisstein, Eric W. Binomial Distribution. From MathWorld A Wolfram Web Resource. BinomialDistribution I chec all the information on each page for correctness and typographical errors. Nevertheless, some errors may occur and I would be grateful if you would 10

alert me to such errors. I mae every reasonable effort to present current and accurate information for public use, however I do not guarantee the accuracy or timeliness of information on this website. Your use of the information from this website is strictly voluntary and at your ris. I have checed the lins to external sites for usefulness. Lins to external websites are provided as a convenience. I do not endorse, control, monitor, or guarantee the information contained in any external website. I don t guarantee that the lins are active at all times. Use the lins here with the same caution as you would all information on the Internet. This website reflects the thoughts, interests and opinions of its author. They do not explicitly represent official positions or policies of my employer. Information on this website is subject to change without notice. Steve Dunbar s Home Page, http://www.math.unl.edu/~sdunbar1 Email to Steve Dunbar, sdunbar1 at unl dot edu Last modified: Processed from L A TEX source on January 30, 2017 11