Chapter 5 Discrete Probability Distributions Random Variables x is a random variable which is a numerical description of the outcome of an experiment. Discrete: If the possible values change by steps or jumps. Example: uppose we flip a coin 5 times and count the number of tails. The number of tails could be 0, 1,,, 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 example, get.5 tails. Therefore, the number of tails must be discrete. Continuous: If the possible values can take any value within some range. Example: The height of trees is an example of continuous data. Is it possible for a tree to be.105m tall? ure. How about.10567m? Yes. How about.10567981014m? Definitely! Discrete Random Variables Consider the sales of cars at a car dealership over the past 00 days. requency Distribution: Number of cars sold per day Number of days (frequency) 0 54 1 117 7 4 4 1 5 00 Define the random variable: Let x = the number of cars sold during a day. Note: We make the assumption that no more than 5 cars are sold per day. ample pace: = {0, 1,,, 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 = ) = f() = probability of cars sold P(X = ) = f() = probability of 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
Note: f(x) = 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 x Number of days (frequency) f(x) 0 54 54 00 =0.18 1 117 117 00 =0.9 7 7 00 =0.4 4 4 00 =0.14 4 1 1 00 =0.04 5 00 =0.01 00 1 Question: Does the above mentioned probability function fulfill the required conditions for a discrete probability function? There are two requirements: (i) 0 ( ) 1 for all ( ) (ii) ( )=1 Yes, both requirements are fulfilled. Probability 0.45 0.4 0.5 0. 0.5 0. 0.15 0.1 0.05 0 Graphical representation of the probability distribution for the number of cars sold per day 0.18 0.9 0.4 0.14 0.04 0 1 4 5 Number of cars sold per day 0.01 Copyright Reserved
Questions: a) The probability that cars are sold per day? ( =)= ()=0.4 b) The probability that, at most, cars are sold per day? ( ) = ( =0)+ ( =1)+ ( =) = (0)+ (1)+ () =0.18+0.9+0.4=0.81 c) The probability that more than cars are sold per day? ( >) = ( =)+ ( =4)+ ( =5) = ()+ (4)+ (5) =0.14+0.04+0.01=0.19 d) The probability that at least cars are sold per day? ( ) = ( =)+ ( =)+ ( =4)+ ( =5) = ()+ ()+ (4)+ (5) =0.4+0.14+0.04+0.01 =0.4 e) The probability that more than 1 but less than 4 cars are sold per day? (1< <4) = ( =)+ ( =) = ()+ () =0.4+0.14 =0.8 Copyright Reserved
Discrete Uniform probability function: ( )= 1 where n = the number of values the random variable may assume Example: Dice ( )= for x = 1,,, 4, 5, 6 x 1 4 5 6 f(x) Does the above mentioned probability function fulfill the required conditions for a discrete probability function? There are two requirements: (i) 0 ( ) 1 for all ( ) (ii) ( )=1 Yes, both requirements are fulfilled. Another example of a random variable x with the following discrete probability distribution ( )= for x = 1,,, 4 x 1 4 f(x) Does the above mentioned probability function fulfill the required conditions for a discrete probability function? There are two requirements: (i) 0 ( ) 1 for all ( ) (ii) ( )=1 Yes, both requirements are fulfilled. Copyright Reserved 4
Expected value, variance, standard deviation and median: Graphical representation of the probability distribution for the number of cars sold per day Probability 0.45 0.4 0.5 0. 0.5 0. 0.15 0.1 0.05 0 0.9 0.4 0.18 0.14 0.04 0.01 0 1 4 5 Number of cars sold per day Expected Value ( )= = ( ) =(0)(0.18)+(1)(0.9)+()(0.4)+()(0.14)+(4)(0.04)+(5)(0.01) = 1.5 Variance ( )= = ( ) ( ) =(0 1.5) (0.18)+(1 1.5) (0.9)+( 1.5) (0.4)+( 1.5) (0.14)+(4 1.5) (0.04)+ (5 1.5) (0.01) = 1.5 tandard deviation = = 1.5=1.118 Median 0 0.18 0 and 1 0.18 + 0.9 = 0.57 > 0.5 Therefore, the median = 1 Copyright Reserved 5
OR use a table to calculate the expected value, variance and standard deviation: x f(x) x f(x) ( ) ( ) ( ) 0 0.18 0-1.5.5 0.4050 1 0.9 0.9-0.5 0.5 0.0975 0.4 0.48 0.5 0.5 0.0600 0.14 0.4 1.5.5 0.150 4 0.04 0.16.5 6.5 0.500 5 0.01 0.05.5 1.5 0.15 = 1.5 = 1.5 =. =. Example: A psychologist has determined that the number of hours required to obtain the trust of a new patient is either 1, or hours. Let x = be a random variable indicating the time in hours required to gain the patient s trust. The following probability function has been proposed: ( )= for x = 1,, Questions: a) et up the probability function of x. b) Is this a valid probability function? Explain. c) Give a graphical representation of the probability function of x. d) What is the probability that it takes exactly hours to gain the patient s trust? e) What is the probability that it takes at least hours to gain the patient s trust? f) Calculate the expected value, variance and standard deviation. Copyright Reserved 6
Answers: a) x f(x) 1 (1)= 1 6 =0.16 ()= 6 =0. ()= 6 =0.5 1 b) There are two requirements: (i) 0 ( ) 1 for all ( ) (ii) ( )=1 Yes, both requirements are fulfilled. c) Probability 0.6 0.5 0.4 0. 0. 0.1 0 Graphical representation of the probability distribution 1 x d) ()= 6 =0. e) ( )= ()+ ()= 6 + 6 =5 6 =0.8 f) = ( )=. = ( ) ( )=0.5 = = 0.5 =0.745 x f(x) x f(x) ( ) ( ) ( ) 1 0.1667 0.1667-1. 1.7778 0.96 0. 0.6667-0. 0.1111 0.070 0.5 1.5000 0.6667 0.4444 0.. 0.5556 Copyright Reserved 7
Binomial distribution 1. The experiment consists of a sequence of n identical trials.. Two outcomes are possible on each trial. We refer to a uccess ailure. 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: x = number of successes Then x has a binomial distribution of n trials and the probability of a success of p. The Binomial probability function is: ( )= (1 ) Martin clothing store problem: Let us consider the purchase decisions of the next customers who enter the Martin clothing store. On the basis of past experience, the store manager estimates the probability that any one customer will make a purchase is 0.. Let: = customer makes a purchase (success) = customer does not make a purchase (failure) The above mentioned is a Binomial experiment, because: 1. n = identical trials. Two possible outcomes customer makes a purchase (success) customer does not make a purchase (failure). Probability of a success p = 0. and a failure 1 p = 0.7 4. The trials are independent Let x = number of customers that make a purchase OR x = number of successes Copyright Reserved 8
Tree Diagram: 1st nd rd Outcomes Value of x (,, ) (,, ) (,, ) (,, ) 1 (,, ) (,, ) 1 (,, ) 1 (,, ) 0 Total number of experimental outcomes: Using the tree diagram we count 8 experimental outcomes. Using the counting rule for multiple-step experiments we get (n 1 )(n )(n ) = ()()() = 8. ince the binomial distribution only as two possible outcomes on each step (success or failure), we can use the formula which in this case equals =8 where n denotes the number of trials in the binomial experiment. Copyright Reserved 9
Calculating binomial probabilities: ( )= (1 ) Question 1: Calculate the probability that out of the customers make a purchase. Answer 1: ()= 0. 0.7 =()(0.09)(0.7)=0.189 Question : Calculate the probability that 1 out of the customers make a purchase. Answer : (1)= 1 0. 0.7 =()(0.)(0.49)=0.441 Question : Calculate the probability that out of the customers make a purchase. Answer : ()= 0. 0.7 =(1)(0.07)(1)=0.07 Question 4: Calculate the probability that 0 out of the customers make a purchase. Answer 4: (0)= 0 0. 0.7 =(1)(1)(0.4)=0.4 Copyright Reserved 10
The probability distribution for the number of customers making a purchase: x f(x) 0 0.4 1 0.441 0.189 0.07 Does it fulfill the basic requirements for a discrete probability function? There are two requirements: (iii) 0 ( ) 1 for all ( ) (iv) ( )=1 Yes, both requirements are fulfilled. 1 Calculate the expected value, variance and standard deviation of x: x f(x) x f(x) ( ) ( ) ( ) 0 0.4 0-0.9 0.81 0.778 1 0.441 0.441 0.1 0.01 0.00441 0.189 0.78 1.1 1.1 0.869 0.07 0.081.1 4.41 0.11907 0.9 0.6 = ( )=0.9 = ( ) ( )=0.6 = = 0.6=0.794 ormulas of and for the Binomial Probability Distribution: ( )= = ( )= = (1 ) Test: ( )= = =()(0.)=0.9 ( )= = (1 )=()(0.)(0.7)=0.6 ( )= 0.6=0.794 Copyright Reserved 11
EXCEL: BINOMDIT(x, n, p, false) normal probability BINOMDIT(x, n, p, true) cumulative probability ormula Worksheet Value Worksheet Value Worksheet with explanations Copyright Reserved 1
Example: (Extension of the Martin-experiment) uppose 10 customers go into the store. The probability of purchasing something is 0. Let x = number of customers that make a purchase Questions: 1. What is the distribution of x. Binomial with n = 10 and p = 0.. Calculate the expected value, variance and standard deviation of x. ( )= = =(10)(0.)= ( )= = (1 )=(10)(0.)(0.7)=.1 ( )= =.1=1.449. Calculate the probability distribution of x. x f(x) 0 f(0) = 10 0 (0.) (0.7) =(1)(1)(0.08)=0.08 1 f(1) = 10 1 (0.) (0.7) =(10)(0.)(0.040)=0.111 f() = 10 (0.) (0.7) =(45)(0.09)(0.058)=0.5 f() = 10 (0.) (0.7) =(10)(0.07)(0.08)=0.668 4 f(4) = 10 4 (0.) (0.7) =(10)(0.0081)(0.118)=0.001 5 f(5) = 10 5 (0.) (0.7) =(5)(0.004)(0.168)=0.109 6 f(6) = 10 6 (0.) (0.7) =(10)(0.0007)(0.401)=0.068 7 f(7) = 10 7 (0.) (0.7) =(10)(0.000)(0.4)=0.0090 8 f(8) = 10 8 (0.) (0.7) =(45)(0.000066)(0.49)=0.0014 9 f(9) = 10 9 (0.) (0.7) =(10)(0.0000197)(0.7)=0.0001 10 f(10) = 10 10 (0.) (0.7) =(1)(0.0000059)(1)=0.0000 Copyright Reserved 1
4. A graphical representation of the probability distribution of x. Probability distribution of 10 customers 0.0 0.67 0.5 0.0 0. 0.00 f(x) 0.15 0.10 0.11 0.10 0.05 0.00 0.08 0.07 0.009 0.001 0.000 0.000 0 1 4 5 6 7 8 9 10 x 5. Calculate the cumulative distribution of x. ormula worksheet Copyright Reserved 14
Value worksheet Value worksheet with explanations Copyright Reserved 15
6. Calculate the probability that: (a) At most clients purchase something: ( )=0.6496 (b) Only clients purchase something: ( =)=0.668 or ()= 10 (0.) (0.7) =(10)(0.07)(0.08)=0.668 (c) More than 1 client purchase something: ( >1)=1 ( 1)=1 0.149=0.8507 since ( 1)+ ( >1)=1 (d) More than but less than 5 clients purchase something: (< <5)= ( =)+ ( =4)=0.668+0.001=0.4669 OR (< <5)= ( =)+ ( =4)= ( 4) ( )=0.8497 0.88= 0.4669 (e) Less than 5 clients purchase something: ( <5)= ( 4)=0.8497 (f) At least 4 clients purchase something: ( 4)=1 ( )=1 0.6496=0.504 (g) Exactly 6 clients do not purchase anything: If 6 clients do not purchase something, then 4 clients purchase something ( =4)=0.001 or ( 4) ( )=0.8497 0.6496=0.001 (h) Difficult question: Calculate the probability that the first three clients make a purchase: (1 )(1 )(1 )(1 )(1 )(1 )(1 )= (1 ) =0. 0.7 =0.00 Copyright Reserved 16
Homework A university found that 0% of its students withdraw without completing the introductory statistics course. Assume: That 0 students have registered for the course this quarter. Let: x = number of students withdrawing from the course. Binomial Experiment: n = 0 and p = 0. x f(x) Cumulative prob 0 0.0115 0.0115 1 0.0576 0.069 0.169 0.061 0.054 0.4114 4 0.18 0.696 5 0.1746 0.804 6 0.1091 0.91 7 0.0545 0.9679 8 0.0 0.9900 9 0.0074 0.9974 10 0.000 0.9994 11 0.0005 0.9999 1 0.0001 1.0000 1 0.0000 1.0000 14 0.0000 1.0000 15 0.0000 1.0000 16 0.0000 1.0000 17 0.0000 1.0000 18 0.0000 1.0000 19 0.0000 1.0000 0 0.0000 1.0000 Copyright Reserved 17
Homework (work through this on your own): a) Calculate the probability that or less will withdraw. ( )=. b) Calculate the probability that exactly 4 will withdraw. ( = )=. or ( = )= ( ) ( )=.. =. c) Calculate the probability that more than will withdraw. d) What is the expected number of withdrawals? ( > )= ( )=. =. ( )= =( )(. )= e) What is the expected number of students that will not withdraw? uppose y = number of students not withdrawing from the course. Then ( )= ( )=( )(. )= We use the probability, since: = 0. is the probability that a student will withdraw = 1 0. = 0.8 is the probability that a student will not withdraw f) Calculate the probability that 15 will not withdraw. If 15 students from 0 students will not withdraw, then 5 students will withdraw. ( =5)= ( 5) ( 4)=0.804 0.696=0.1746 Copyright Reserved 18
hape of the Binomial distribution: Binomial: n= 10 and p< 0.5 kewed to the right Probability 0.5 0. 0.5 0. 0.15 0.1 0.05 0 1 4 5 6 7 8 9 10 11 x Binomial: n= 10 and p= 0.5 ymmetric Probability 0. 0.5 0. 0.15 0.1 0.05 0 1 4 5 6 7 8 9 10 11 x Binomial: n= 10 and p> 0.5 kewed to the left Probability 0.5 0. 0.5 0. 0.15 0.1 0.05 0 1 4 5 6 7 8 9 10 11 x Copyright Reserved 19
Typical exam questions Questions 1 to 4 are based on the following information: 0% of the tires of airplanes at an airport are faulty. our tyres are randomly selected. Let: x = Number of faulty tires found Question 1 The standard deviation of x is: Answer 1 x is binomially distributed with n = 4 and p = 0.. Thus, ( )= (1 )= 4 0. 0.7= 0.917. Question The probability that the first and third tyres in the sample of 4 selected tyres are faulty is: Answer (0.)(0.7)(0.)(0.7)=0. 0.7 =0.0441. Question The probability that less than tyres selected are faulty, is: Answer ( <)= ( =0)+ ( =1)+ ( =)= 4 0 0. 0.7 + 4 1 0. 0.7 + 4 0. 0.7 = 0.401+0.4116+0.646=0.916. Question 4 The probability that 1 of the 4 randomly selected tyres is not faulty, is: Answer 4 If 1 out of 4 is not faulty, it means that out of 4 are faulty. ( =)= 4 0. 0.7 =0.0756. Copyright Reserved 0
Questions 5 to 9 are based on the following information: It is known that 60% of all outh Africans will watch the opening match of the 010 occer World Cup. A random sample of 40 outh Africans was asked whether they will watch the opening match. Let = the number of outh Africans who will watch the opening match. Consider the following results in Excel of two different binomial distributions: ormula worksheet: Value worksheet: Copyright Reserved 1
Question 5 uppose a random sample of 7 outh Africans is selected. The probability that the first 5 will watch the opening match is: Answer 5 (1 )(1 )=(0.6) (0.4) =0.014. Question 6 The probability that exactly outh Africans will watch the opening match is: Answer 6 ( =)= ()= 40 (0.6) (0.4) =0.104. Or using Excel we obtain: ( =)= ( ) ( )=0.419 0.115=0.104. Question 7 The probability that more than 18 but less than 4 outh Africans will watch the opening match is: Answer 7 (18< <4)= ( ) ( 18)=0.419 0.09=0.97 Question 8 The probability that more than 0 but less than 4 outh Africans will not watch the opening match is: Answer 8 Let y = the number of outh Africans who will not watch the opening match. The probability that someone will not watch the opening match is 1 0.6 = 0.4. These probabilities are given in column C of the Excel spreadsheet [see cells C9, C10 and C11]. (0< <4)= ( =1)+ ( =)+ ( =)=0.05+0.00+0.0106=0.0661. Question 9 The standard deviation of is: Answer 9 ( )= (1 )= 40 0.6 0.4=.10. Questions 10 to 1 are based on the following information: Consider the XYZ University. ive students writing the Accounting exam were selected at random. It is known from previous experience that the probability that any one student will pass the exam is 0.4. Let: x = the number of students who pass the exam. Define: An experimental outcome is a sequence of successes and failures in a 5-trial binomial experiment. (Tree diagram) Copyright Reserved
Question 10 The total number of experimental outcomes with successes out of 5 is: By drawing a tree diagram we find the answer = 10. Outcome Number of successes (,,,, ) (,,,, ) (,,,, ) (,,,, ) 5 4 4 (,,,, ) (,,,, ) (,,,, ) (,,,, ) (,,,, ) (,,,, ) (,,,, ) (,,,, ) 4 4 (,,,, ) (,,,, ) (,,,, ) (,,,, ) 1 (,,,, ) (,,,, ) (,,,, ) (,,,, ) 4 (,,,, ) (,,,, ) (,,,, ) (,,,, ) (,,,, ) (,,,, ) (,,,, ) (,,,, ) 1 1 (,,,, ) (,,,, ) (,,,, ) (,,,, ) 1 1 0 Copyright Reserved
Question 11 The probability that only the first and last student will pass the exam is: Answer 11 (1 )(1 )(1 ) = (1 ) =0.4 (0.6) =0.0456 Question 1 The probability that at most 4 of the 5 students will pass the exam is: Answer 1 ( 4) = ( =0)+ ( =1)+ ( =)+ ( =)+ ( =4) = 5 0 0.4 0.6 + 5 1 0.4 0.6 + 5 0.4 0.6 + 5 0.4 0.6 + 5 4 0.4 0.6 =0.07776+0.59+0.456+0.04+0.0768=0.98976. OR ( 4)=1 ( =5)=1 5 5 0.4 0.6 =1 0.0104=0.98976. Question 1 The probability that of the 5 students will fail is: Answer 1 If out of 5 fail the exam, the out of 5 pass the exam. Therefore, ( =)= 5 0.4 0.6 =0.04. OR Let y = the number of students who fail the exam The probability that any one student will fail the exam is 0.6. ( =)= 5 0.6 0.4 =0.04. Copyright Reserved 4