Chapter 5 Discrete Probability Distributions Random Variables is a random variable which is a numerical description of the outcome of an eperiment. Discrete: If the possible values change by steps or jumps. Eample: Suppose we flip a coin 5 times and count the number of tails. The number of tails could be 0, 1, 2, 3, 4 or 5. Therefore, it can be any integer value between (and including) 0 and 5. However, it could not be any number between 0 and 5. We could not, for eample, get 2.5 tails. Therefore, the number of tails must be discrete. Continuous: If the possible values can take any value within some range. Eample: The height of trees is an eample of continuous data. Is it possible for a tree to be 2.105m tall? Sure. How about 2.10567m? Yes. How about 2.105679821014m? Definitely! Discrete Random Variables Consider the sales of cars at a car dealership over the past 300 days. Frequency Distribution: Number of cars sold per day Number of days (frequency) 0 54 1 117 2 72 3 42 4 12 5 3 300 Define the random variable: Let = the number of cars sold during a day. Note: We make the assumption that no more than 5 cars are sold per day. Sample Space: S = {0, 1, 2, 3, 4, 5} Notation: P(X = 0) = f(0) = probability of 0 cars sold P(X = 1) = f(1) = probability of 1 car sold P(X = 2) = f(2) = probability of 2 cars sold P(X = 3) = f(3) = probability of 3 cars sold P(X = 4) = f(4) = probability of 4 cars sold P(X = 5) = f(5) = probability of 5 cars sold Copyright Reserved 1
Probability Note: f() = probability function The probability function provides the probability for each value of the random variable Probability distribution for the number of cars sold per day at a car dealership Number of days f() (frequency) 0 54 1 117 2 72 3 42 4 12 5 3 300 1 Question: Does the above mentioned probability function fulfill the required conditions for a discrete probability function? There are two requirements: (i) for all (ii) Yes, both requirements are fulfilled. 0.45 0.4 0.35 0.3 0.25 0.2 0.15 0.1 0.05 0 Graphical representation of the probability distribution for the number of cars sold per day 0.18 0.39 0.24 0.14 0.04 0 1 2 3 4 5 Number of cars sold per day 0.01 Copyright Reserved 2
Questions: a) The probability that 2 cars are sold per day? b) The probability that, at most, 2 cars are sold per day? c) The probability that more than 2 cars are sold per day? d) The probability that at least 2 cars are sold per day? e) The probability that more than 1 but less than 4 cars are sold per day? Copyright Reserved 3
Discrete Uniform probability function: where n = the number of values the random variable may assume Eample: Dice for = 1, 2, 3, 4, 5, 6 1 2 3 4 5 6 f() Does the above mentioned probability function fulfill the required conditions for a discrete probability function? There are two requirements: (i) for all (ii) Yes, both requirements are fulfilled. Another eample of a random variable with the following discrete probability distribution for = 1, 2, 3, 4 1 2 3 4 f() Does the above mentioned probability function fulfill the required conditions for a discrete probability function? There are two requirements: (i) for all (ii) Yes, both requirements are fulfilled. Copyright Reserved 4
Probability Epected value, variance, standard deviation and median: Graphical representation of the probability distribution for the number of cars sold per day 0.45 0.4 0.35 0.3 0.25 0.2 0.15 0.1 0.05 0 0.39 0.24 0.18 0.14 0.04 0.01 0 1 2 3 4 5 Number of cars sold per day Epected Value 1.5 Variance 1.25 Standard deviation Median 0 0.18 0 and 1 0.18 + 0.39 = 0.57 > 0.5 Therefore, the median = 1 Copyright Reserved 5
OR use a table to calculate the epected value, variance and standard deviation: f() f() 0 0.18 0-1.5 2.25 0.4050 1 0.39 0.39-0.5 0.25 0.0975 2 0.24 0.48 0.5 0.25 0.0600 3 0.14 0.42 1.5 2.25 0.3150 4 0.04 0.16 2.5 6.25 0.2500 5 0.01 0.05 3.5 12.25 0.1225 = 1.5 = 1.25 Eample: A psychologist has determined that the number of hours required to obtain the trust of a new patient is either 1, 2 or 3 hours. Let = be a random variable indicating the time in hours required to gain the patient s trust. The following probability function has been proposed: Questions: a) Set up the probability function of. b) Is this a valid probability function? Eplain. for = 1, 2, 3 c) Give a graphical representation of the probability function of. d) What is the probability that it takes eactly 2 hours to gain the patient s trust? e) What is the probability that it takes at least 2 hours to gain the patient s trust? f) Calculate the epected value, variance and standard deviation. Copyright Reserved 6
Probability Answers: a) f() 1 2 3 b) There are two requirements: (i) for all (ii) Yes, both requirements are fulfilled. 1 c) 0.6 0.5 Graphical representation of the probability distribution 0.4 0.3 0.2 0.1 0 1 2 3 d) e) f) f() f() 1 0.1667 0.1667-1.3333 1.7778 0.2963 2 0.3333 0.6667-0.3333 0.1111 0.0370 3 0.5 1.5000 0.6667 0.4444 0.2222 2.3333 0.5556 Copyright Reserved 7
Binomial distribution 1. The eperiment consists of a sequence of n identical trials. 2. Two outcomes are possible on each trial. We refer to a Success Failure 3. The probability of a success, denoted by p does not change from trial to trial. Consequently, the probability of a failure, denoted by 1 p, does not change from trial to trial. 4. The trials are independent In general: Let: = number of successes Then has a binomial distribution of n trials and the probability of a success of p. The Binomial probability function is: ( ) Martin clothing store problem: Let us consider the purchase decisions of the net 3 customers who enter the Martin clothing store. On the basis of past eperience, the store manager estimates the probability that any one customer will make a purchase is 0.3. Let: S = customer makes a purchase (success) F = customer does not make a purchase (failure) The above mentioned is a Binomial eperiment, because: 1. n = 3 identical trials 2. Two possible outcomes customer makes a purchase (success) customer does not make a purchase (failure) 3. Probability of a success p = 0.3 and a failure 1 p = 0.7 4. The trials are independent Let = number of customers that make a purchase OR = number of successes Copyright Reserved 8
Tree Diagram: 1st 2nd 3rd Outcomes Value of S (S, S, S) 3 S F (S, S, F) 2 S F S (S, F, S) 2 F (S, F, F) 1 S (F, S, S) 2 F S F (F, S, F) 1 S (F, F, S) 1 F F (F, F, F) 0 Total number of eperimental outcomes: Using the tree diagram we count 8 eperimental outcomes. Using the counting rule for multiple-step eperiments we get (n 1 )(n 2 )(n 3 ) = (2)(2)(2) = 8. Since the binomial distribution only as two possible outcomes on each step (success or failure), we can use the formula which in this case equals where n denotes the number of trials in the binomial eperiment. Copyright Reserved 9
Calculating binomial probabilities: ( ) Question 1: Calculate the probability that 2 out of the 3 customers make a purchase. Answer 1: ( ) Question 2: Calculate the probability that 1 out of the 3 customers make a purchase. Answer 2: ( ) Question 3: Calculate the probability that 3 out of the 3 customers make a purchase. Answer 3: ( ) Question 4: Calculate the probability that 0 out of the 3 customers make a purchase. Answer 4: ( ) Copyright Reserved 10
The probability distribution for the number of customers making a purchase: f() 0 0.343 1 0.441 2 0.189 3 0.027 Does it fulfill the basic requirements for a discrete probability function? There are two requirements: (iii) for all (iv) Yes, both requirements are fulfilled. 1 Calculate the epected value, variance and standard deviation of : f() f() 0 0.343 0-0.9 0.81 0.27783 1 0.441 0.441 0.1 0.01 0.00441 2 0.189 0.378 1.1 1.21 0.22869 3 0.027 0.081 2.1 4.41 0.11907 0.9 0.63 Formulas of and for the Binomial Probability Distribution: Test: Copyright Reserved 11
EXCEL: BINOMDIST(, n, p, false) normal probability BINOMDIST(, n, p, true) cumulative probability Formula Worksheet Value Worksheet Value Worksheet with eplanations Copyright Reserved 12
Eample: (Etension of the Martin-eperiment) Suppose 10 customers go into the store. The probability of purchasing something is 0.3 Let = number of customers that make a purchase Questions: 1. What is the distribution of. Binomial with n = 10 and p = 0.3 2. Calculate the epected value, variance and standard deviation of. 3. Calculate the probability distribution of. 0 f(0) = ( ) f() 1 f(1) = ( ) 2 f(2) = ( ) 3 f(3) = ( ) 4 f(4) = ( ) 5 f(5) = ( ) 6 f(6) = ( ) 7 f(7) = ( ) 8 f(8) = ( ) 9 f(9) = ( ) 10 f(10) = ( ) Copyright Reserved 13
f() 4. A graphical representation of the probability distribution of. Probability distribution of 10 customers 0.30 0.25 0.20 0.233 0.267 0.200 0.15 0.10 0.121 0.103 0.05 0.00 0.028 0.037 0.009 0.001 0.000 0.000 0 1 2 3 4 5 6 7 8 9 10 5. Calculate the cumulative distribution of. Formula worksheet Copyright Reserved 14
Value worksheet Value worksheet with eplanations Copyright Reserved 15
6. Calculate the probability that: (a) At most 3 clients purchase something: (b) Only 3 clients purchase something: or ( ) (c) More than 1 client purchase something: since (d) More than 2 but less than 5 clients purchase something: OR (e) Less than 5 clients purchase something: (f) At least 4 clients purchase something: (g) Eactly 6 clients do not purchase anything: If 6 clients do not purchase something, then 4 clients purchase something or (h) Difficult question: Calculate the probability that the first three clients make a purchase: Copyright Reserved 16
Probability Probability Probability Shape of the Binomial distribution: Binomial: n = 10 and p < 0.5 Skewed to the right 0.35 0.3 0.25 0.2 0.15 0.1 0.05 0 1 2 3 4 5 6 7 8 9 10 11 Binomial: n = 10 and p = 0.5 Symmetric 0.3 0.25 0.2 0.15 0.1 0.05 0 1 2 3 4 5 6 7 8 9 10 11 Binomial: n = 10 and p > 0.5 Skewed to the left 0.35 0.3 0.25 0.2 0.15 0.1 0.05 0 1 2 3 4 5 6 7 8 9 10 11 Copyright Reserved 17