DEPARTMENT OF QUANTITATIVE METHODS & INFORMATION SYSTEMS Introduction to Business Statistics QM 120 Chapter 5 Discrete random variables and their probability distribution Spring 2008 Dr. Mohammad Zainal Chapter 5: Random Variables 2 Random variables # of PC’s owned Frequency Relative Frequency 0 120 .12 1 180 .18 2 470 .47 3 230 .23 23 N = 1000 Sum = 1.000 Let x denote the number of PCs owned by a family. Then x can take any of the four possible values (0, 1, 2, and 3). ¾ A random variable (RV) is a variable whose value is determined by y the outcome of a random experiment. p ¾ Chapter 5: Random Variables 3 Discrete random variable A random variable that assumes countable values is called a discrete random variable. ¾ ¾ Examples of discrete RVs: ¾ Number of cars sold at a dealership during a week ¾ Number of houses in a certain block ¾ Number of fish caught g on a fishing g trip p ¾ Number of costumers in a bank at any given day Continuous random variable Continuous random variable A random variable that can assume any value contained in one or more intervals is called a continuous random variable. ¾ Chapter 5: Random Variables 4 ¾ Examples of continuous RVs: ¾ Height of a person ¾ Time taken to complete a test ¾ Weight g of a fish ¾ Price of a car Example: Classify each of the following RVs as discrete or E l Cl if h f h f ll i RV di continuous. ¾ Th number The b off new accounts t opened d att a bank b k during d i a week k ¾ The time taken to run a marathon ¾ The price of a meal in fast food restaurant ¾ The score of a football game ¾ The weight of a parcel Chapter 5: Probability Distribution of a Discrete RV 5 The probability distribution of a discrete RV lists all the possible bl value l that h the h RV can assume and d their h corresponding probabilities. ¾ Example: Write the probability distribution of the number of PCs owned by a family. # of PC’s owned Frequency Relative Frequency 0 120 .12 1 180 .18 2 470 .47 3 230 .23 N 1000 N = 1000 S Sum = 1 000 1.000 Chapter 5: Probability Distribution of a Discrete RV 6 The following two characteristics must hold for any discrete probability distribution: b bl d b ¾ ¾ The probability assigned to each value of a RV x lies in the range 0 to 1; that is 0 ≤ P(x) ≤ 1 for each x. ¾ The sum of the probabilities assigned to all possible values of x is equal to 1.0; that is ΣP(x) = 1. Example: Each of the following tables lists certain values of x and their probabilities. Determine whether or not each table represents a valid probability distribution. x P(x) x P(x) x P(x) 0 .08 0 .25 4 .2 1 .11 1 .34 5 .3 2 .39 39 2 .28 28 6 .6 6 3 .27 3 .13 8 ‐.1 Chapter 5: Probability Distribution of a Discrete RV 7 Example: The following table lists the probability distribution of a discrete RV x. x 0 P(x) 1 2 3 4 5 6 .11 .19 .28 .15 .12 .09 .06 a) P(x = 3) a) P( 3) b) P( ≤ 2) b) P(x ≤ c) P(x ≥ ) P( ≥ 4) d) P(1 ≤ x ≤ d) P(1 ≤ ≤ 4) e) Probability that x assumes a value less than 4 f) Probability that x assumes a value greater than 2 f) Probability that x assumes a value greater than 2 g) Probability that x assumes a value in the interval 2 to 5 Chapter 5: Probability Distribution of a Discrete RV 8 Example: For the following table x 1 2 3 4 5 P(x) 8 20 24 16 12 a) Construct a probability distribution table. Draw a graph of a) Construct a probability distribution table. Draw a graph of the probability distribution. b) Find the following probabilities i. P(x = 3) ii. P(x < 4) iii. P(x ≥ 3) iv. P(2 ≤ x ≤ 4) Chapter 5: Mean of a discrete RV 9 Mean of a discrete RV The mean μ ‐or expected value E(x)‐ of a discrete RV is the value that you would expect to observe on average if the experiment i t is i repeated t d again i and d again i ¾ ¾ It is denoted by E (x ) = ∑ xp (x ) Illustration: Let us toss two fair coins, and let x denote the number of heads observed. observed We should have the following probability distribution table ¾ x 0 P(x) 1/4 1 2 1/2 1/4 Suppose we repeat the experiment a large number of times, say n =4,000. =4 000 We should expect to have approximately Chapter 5: Mean of a discrete RV 10 1 thousand zeros, 2 thousand ones, and 1 thousand twos. Then th the average value of x would equal l f ld l Sum of measurements 1, 000 (0) + 2, 000 (1) + 1000 (2) = 4 000 4, n ⎛1⎞ ⎛1⎞ ⎛1⎞ = ⎜ ⎟ (0) + ⎜ ⎟ (1) + ⎜ ⎟ (2) ⎝4⎠ ⎝2⎠ ⎝4⎠ Similarly, if we use the E (x ) = ∑ xp (x ), we would have E (x ) = 0P (0) + 1P (1) + 2P (2) = 0(1/ 4) + 1(1/ 2) + 2(1/ 4) =1 Chapter 5: Mean of a discrete RV 11 Example: Recall “ number of PC’s owned by a family” example. Find the mean number of PCs owned by a family. l F d h b f PC db f l Chapter 5: Mean of a discrete RV 12 Example: In a lottery conducted to benefit the local fire company 8000 tickets are to be sold at $5 each. company, each The prize is a $12,000. If you purchase two tickets, what is your expected gain? Chapter 5: Mean of a discrete RV 13 Example: Determine the annual premium for a $1000 insurance policy covering an event that over a long period of time, has occurred at the rate of 2 times in 100. Let x : the yearly financial gain to the insurance company resulting from the sale of the policy C : unknown premium Calculate the value of C such that the expected gain E(x) will equal to zero so that the company can add the administrative costs and profit. Chapter 5: Mean of a discrete RV 14 Example: You can insure a $50,000 diamond for its total value by yp paying y gap premium of D dollars. If the p probability y of theft in a given year is estimated to be .01, what premium should the insurance company charge if it wants the expected gain to equal $1000. Chapter 5: Standard Deviation of a Discrete RV 15 ¾ ¾ ¾ The standard deviation of a discrete RV x, denoted by σ, measures the spread of its probability distribution. A higher value of σ indicates that x can assume values over a larger range about the mean. While, a smaller value indicates that most of the values that can x assume are clustered closely around the mean. The standard Th d d deviation d i i σ can be b found f d using i the h following f ll i formula: σ= ¾ ∑x 2 p (x ) − μ 2 Hence, the variance σ2 can be obtained by squaring its standard deviation σ. σ Chapter 5: Standard Deviation of a Discrete RV 16 Example: Recall “ number of PC’s owned by a family” example. Find the standard deviation of PCs owned by a family. Chapter 5: Standard Deviation of a Discrete RV 17 Example: An electronic store sells a particular model of a computer notebook. There are only four notebooks in stocks, and the manager wonders what today’s demand for this particular model will be. She learns from marketing department that the probability distribution for x, x the daily demand for the laptop, is as shown in the table. x P(x) 1 2 3 4 5 .40 .20 .15 .10 .05 Find the mean, variance, and the standard deviation of x. Is it lik l that likely th t five fi or more costumers t will ill wantt to t buy b a laptop? l t ? Chapter 5: Standard Deviation of a Discrete RV 18 Example: A farmer will earn a profit of $30,000 in case of heavy rain next year, $60,000 in case of moderate rain, and $15,000 in case of little rain. A meteorologist forecasts that the probability is .35 for heavy rain, .40 for moderate rain, and .25 for little rain next year. year Let x be the RV that represents next year’s profits in thousands of dollars for this farmer. Write the probability distribution of x. Find the mean, variance, and the standard deviation of x. Chapter 5: Standard Deviation of a Discrete RV 19 Example: An instant lottery ticket costs $2. Out of a total of 10,000 tickets printed for this lottery, 1000 tickets contain a prize of $5 each. 100 tickets contain a prize of $10 each, 5 tickets contain a prize of $1000 each, and 1 ticket has the prize of $5000. $5000 Let x be the RV that denotes the net amount player wins by playing this lottery. Write the probability distribution of x. Determine the mean and the standard deviation of x. Chapter 5: Standard Deviation of a Discrete RV 20 Example: Based in its analysis of future demand for its products, the financial department a company has determined that there is a .17 probability that the company will lose $1.2 million during the next year, a .21 probability that it will lose $ 7 million, $.7 million a .37 37 probability that it will make a profit of $0.9 $0 9 million, and a .25 probability that it will make a profit of $2.3 million. a) Let x be a RV that denotes the profit earned by this company during the next year. Write the probability distribution of x. x Chapter 5: Standard Deviation of a Discrete RV 21 b) Find the mean and standard deviation of the probability of part a. Chapter 5: Factorials & Combinations 22 Factorials ¾ The symbol y n!, reads as “n factorial,” represents p the product of all integers from n to 1. In other words, n! = n(n ‐ 1)(n ‐ 2)(n ‐ 3)…3.2.1 Example: Evaluate 7! 7! = 7.6.5.4.3.2.1 = 5040 Example: Evaluate (12‐4)! (12‐4)! = (8)! = 8.7.6.5.4.3.2.1 =40,320 Chapter 5: Factorials & Combinations 23 Example: Evaluate (8‐8)! (8‐8)! (8 8)! = (0)! = 1 Example: p Find the value of 8! By using factorial Table or your calculator. Locate 8 in the column labeled n. Then read the value for n! next to 8. Chapter 5: Factorials & Combinations 24 Combinations ¾ Combinations g give the number of ways y x elements can be selected from n elements. The notation used to denote the total number of combinations is n ¾ C x = C xn = ( nx ) It can be found using the following formula C xn = n C x = ¾ n! x!(n − x)! Remember: n is always greater than or at least equal to x. Chapter 5: Factorials & Combinations 25 Example: Three members of a jury will be randomly selected from five people. How many different combinations are possible? Chapter 5: Factorials & Combinations 26 Using the table of combinations ¾ Values of Table III in Appendix C lists the number of combinations of n elements selected x at a time. Example: Evaluate the followings a) 5C3 b) 8C4 c) ) 9C5 d) 5C5 e) 5C0 e) Chapter 5: The Binomial Probability Distribution 27 The most widely used discrete probability distribution. ¾ It is applied to find the probability that an event will occur x times in n repetitions of an experiment (under certain conditions). ¾ Suppose the probability that a VCR is defective at a factory is .05. We can apply the binomial probability distribution to fi d the find th odds dd off getting tti exactly tl one defective d f ti VCR outt three th VCRs. Chapter 5: The Binomial Probability Distribution 28 Binomial experiment ¾ An experiment p that satisfies the following g four conditions is called a binomial experiment. ¾ ¾ There are n identical trials ¾ Each trail has only two possible outcomes. ¾ The probabilities of the two outcomes remain constant. ¾ The trials are independent. independent A success does not mean that the corresponding outcome is considered favorable. Similarly, a failure doesnʹt necessarily refer to unfavorable outcome. Chapter 5: The Binomial Probability Distribution 29 Example: Consider the experiment consisting of 10 tosses of a coin. Determine whether or not it is a binomial experiment. Solution: Chapter 5: The Binomial Probability Distribution 30 The binomial probability distribution and its formula. ¾ The RV x that represents p the number of successes in n trials for a binomial experiment is called a binomial RV. ¾ The probability distribution of x is called the binomial distribution. ¾ Consider the VCRs example. p Let x be the number of defective VCRs in a sample of 3, x can assume any of the values 0, 1, 2, 3. Chapter 5: The Binomial Probability Distribution 31 ¾ For a binomial experiment, the probability of exactly x successes in n trials is given by the binomial formula P ( x ) = n C x p x q n− x = where n! p x q n− x x !( n − x )! n = totall number b off trials, i l p = probability of success, q = probability of failure 1 – p, p x = number of successes in n trials, n – x = number of failures in n trials Chapter 5: The Binomial Probability Distribution 32 Example: Find P(2) for a binomial RV with n = 5 and p =0.1 Solution: Chapter 5: The Binomial Probability Distribution 33 Example: Over a long period of time it has been observed that a given sniper can hit a target on a single trial with a probability = .8. Suppose he fires four shots at the target. a) What is the probability that he will hit the target exactly two times? b) What is the probability that he will hit the target at least once? Chapter 5: The Binomial Probability Distribution 34 Example: Five percent of all VCRs manufactured by a large factory are defective. A quality control inspector selects three VCRs from the production line. What is the probability that exactly one of these three VCRs is defective Solution: Chapter 5: The Binomial Probability Distribution 35 Example: At the Express Delivery Services (EDS), providing high‐quality service to its customers is the top priority of the management. The company guarantees a refund of all charges if a package is not delivered at its destination by the specified time It is known from the past that despite all efforts, time. efforts 2% of the packages mailed through this company does not arrive on time. A corporation mailed 10 packages through EDS. a) Find the probability that exactly 1 of these 10 packages will not arrive on time b) Find the probability that at most 1 of these 10 packages will not arrive on time. time Chapter 5: The Binomial Probability Distribution 36 Example: According to the U.S. Bureau of Labor Statistics, 56% of mothers with children under 6 years of age work outside their homes. A random sample of 3 mothers with children under 6 years of age is selected. Let x denote the number of mothers who work outside their homes. homes Write the probability distribution of x and draw a graph of the probability distribution. Solution: Chapter 5: The Binomial Probability Distribution 37 Using the table of binomial probabilities ¾ We can use the tables of binomial p probabilities (Table IV) given in Appendix C to calculate the required probabilities. P n x .05 .1 .2 … .95 1 0 .9500 .9000 .8000 … .0500 1 .0500 .1000 .2000 … .9500 0 .9025 .8100 .6400 … .0025 1 .0950 .1800 .3200 … .0950 2 .0025 .0100 .0400 … .9025 0 .8574 .7290 .5120 … .0001 1 .1354 .2430 .3840 … .0071 2 .0071 .0270 .0960 … .1354 3 .0001 .0010 .0080 … .8574 2 3 Chapter 5: The Binomial Probability Distribution 38 Example: Based on data from A peter D. Hart Research Associates’ poll on consumer buying habits and attitudes, It was estimated that 5% of American shoppers are status shoppers, that is, shoppers who love to buy designer labels. A random sample of eight American shoppers is selected. selected Using Binomial Table, answer the following: a)) Find the p probability y that exactly y 3 shoppers pp are status shoppers. b) Find the probability that at most 2 shoppers are status shoppers. pp Chapter 5: The Binomial Probability Distribution 39 c) Find the probability that at least 3 shoppers are status shoppers. d) Find the probability that 1 to 3 shoppers are status shoppers. e) Let x be the number of status shoppers, Write the probability distribution of x and draw a graph of this probability. Chapter 5: The Binomial Probability Distribution 40 Probability of success and the shape of the binomial distribution For any number of trials n ¾ The binomial probability distribution is symmetric if p = .5 0.4 p 0.35 x .05 .1 … .5 … .9 .95 0.3 4 0 .8145 .6561 … .0625 … .0001 .0000 0.25 1 .1715 .2916 … .2500 … .0036 .0005 2 .0135 .0486 … .3750 … .0486 .0135 0.1 0.05 3 .0005 .0036 … .2500 … .2916 .1715 4 .0000 .0001 … .0625 … .6561 .8145 P(x) n 0.2 0.15 0 0 1 2 x 3 4 Chapter 5: The Binomial Probability Distribution 41 The binomial probability distribution is skewed to the right if p is less than .5 0.7 p 0.6 x .05 .1 … .5 … .9 .95 0.5 4 0 .8145 .6561 … .0625 … .0001 .0000 0.4 1 .1715 .2916 … .2500 … .0036 .0005 2 .0135 .0486 … .3750 … .0486 .0135 3 .0005 .0036 … .2500 … .2916 .1715 4 .0000 .0001 … .0625 … .6561 .8145 P(x) n 0.3 0.2 0.1 0 0 1 2 3 4 x Chapter 5: The Binomial Probability Distribution 42 The binomial probability distribution is skewed to the left if p is greater than .5 0.7 p 0.6 x .05 .1 … .5 … .9 .95 0.5 4 0 .8145 .6561 … .0625 … .0001 .0000 0.4 1 .1715 .2916 … .2500 … .0036 .0005 2 .0135 .0486 … .3750 … .0486 .0135 3 .0005 .0036 … .2500 … .2916 .1715 4 .0000 .0001 … .0625 … .6561 .8145 P(x) n 0.3 0.2 0.1 0 0 1 2 3 x 4 Chapter 5: The Binomial Probability Distribution 43 Mean and standard deviation of the binomial distribution ¾ Although g we can still use the mean and standard deviations formulas learned in 5.3 and 5.4, it is more convenient and simpler to use the following formulas once the RV x is known to be a binomial RV μ = np and σ = npq Chapter 5: The Binomial Probability Distribution 44 Example: Refer to the mothers with children under 6 years of age example, find the mean and the standard deviation of the probability distribution. Solution: Chapter 5: The Binomial Probability Distribution 45 Example: Let x be a discrete RV that posses a binomial distribution. Using the binomial formula, find the following probabilities. a) P(x = 5) for f n = 8 and d p = .6 b) P(x = 3) for n = 4 and p = .3 c) P(x = 2) for n = 6 and p = .2 Verify your answer by using Table of Binomial Probabilities. Chapter 5: The Binomial Probability Distribution 46 Example: Let x be a discrete RV that posses a binomial distribution. a) Table of Binomial Probabilities, write the probability distribution for x for n = 7 and p = .3 and graph it. b) What are the mean and the standard deviation of the probability distribution developed in part a? Chapter 5: The Binomial Probability Distribution 47 ¾ An experiment that satisfies the following four conditions is called a binomial experiment. ¾ There are n identical trials ¾ Each trail has only two possible outcomes. ¾ The probabilities of the two outcomes remain constant. ¾ The trials are independent. Chapter 5: The Hypergeometric Probability Distribution 48 ¾ We learned that one of the conditions required to apply the binomial distribution is that the trials are independent so the probability of the two outcomes remain constant. ¾ What if the probability of the outcomes is not constant? ¾ In such cases we replace the binomial distribution by the hypergeometric yp g probability p y distribution. ¾ Such a case occurs when a sample is drawn without replacement from a finite population. Chapter 5: The Hypergeometric Probability Distribution 49 Hypergeometric probability distribution population p Let N = total number of elements in the p r = number of successes in the population N – r = number of failures in the population n = number of trials (sample size) x = number b off successes in i n trials ti l n – x = number of failures in n trials ¾ The probability of x successes Th b bili f in n trials is given by P (x ) = rC x N −r C n −x N Cn The mean and the variance Th d th i are given by ⎛ r ⎝N ⎛ r σ2 =n⎜ ⎝N μ =n⎜ ⎞ ⎟ ⎠ ⎞⎛ N − r ⎞⎛ N − n ⎞ ⎟⎜ ⎟⎜ ⎟ ⎠⎝ N ⎠⎝ N − 1 ⎠ Chapter 5: The Hypergeometric Probability Distribution 50 Example: Dawn corporation has 12 employees who hold managerial positions. Of them, 7 are female and 5 are male. The company is planning to send 3 of these 12 managers to a conference. If 3 mangers are randomly selected out of 12, a) find the probability that all 3 of them are female Chapter 5: The Hypergeometric Probability Distribution 51 b) find the probability that at most 1 of them is a female Chapter 5: The Hypergeometric Probability Distribution 52 Example: A case of soda has 12 bottles, 3 of which contain diet soda. A sample of 4 bottles is randomly selected from the case a) find the probability distribution of x, the number of diet sodas in the sample Chapter 5: The Hypergeometric Probability Distribution 53 b) what are the mean and variance of x? Chapter 5: The Hypergeometric Probability Distribution 54 Example: GESCO Insurance company has prepared a final list of 8 candidates for 2 positions. Of the 8 candidates, 5 are business majors and 3 are engineers. If the company manager decides to select randomly two candidates from this list, find the probability that a) both candidates are business majors b)) neither of the two candidates is a business major j c) at most one of the candidates is a business major Chapter 5: The Poisson Probability Distribution 55 ¾ The Poisson distribution is another discrete probability distribution that has numerous practical applications. ¾ It provides a good model for data that represent the number of occurrence of a specified event in a given unit of time or space. ¾ Here are some examples of experiments for which the RV x can modeled d l d by b the h Poisson P i RV RV: ¾ The number of phone calls received by an operator during a day ¾ Th The number of customer arrivals at checkout counter during an hour b f t i l t h k t t d i h ¾ The number of bacteria per a cm3 of a fluid ¾ The number of machine breakdowns during a given day The number of machine breakdowns during a given day ¾ The number of traffic accidents at a given time period Chapter 5: The Poisson Probability Distribution 56 ¾ The Poisson probability distribution is applied to experiments with random and independent occurrences ¾ The occurrences are random in the sense they do not follow any pattern and, hence, the are unpredictable. ¾ IIndependence of occurrences means that the occurrence or d d f th t th nonoccurrence of an event does not influence the successive occurrence of that next event. ¾ The occurrences are always considered with respect to an interval. ¾ The h intervall may be b a time interval, l a space interval, l or a volume interval. ¾ If the th average number b off occurrences (λ) for f a given i i t interval l is known, then by using the Poisson probability we can compute p the p probability y of a certain number of occurrences x in that interval. Chapter 5: The Poisson Probability Distribution 57 ¾ ¾ The following three conditions must be satisfied to apply the Poisson probability distribution ¾ x is a discrete RV. ¾ The occurrences are random. ¾ The occurrences are independent. The Poisson probability formula is given by P (x ) = ¾ λ x e −λ x! where λ (pronounced lambda) is the mean number of occurrences in that interval and the value of e is approximately i l 2.71828. 2 71828 Chapter 5: The Poisson Probability Distribution 58 ¾ ¾ The mean number of occurrences, denoted by λ, is called the parameter of the Poisson probability distribution or the Poisson parameter. Remember: The interval of λ and x must be of the same length. If they are not, the mean λ should be redefined to make k them h equal. l For F instance, i if λ was given i i hours in h and d we were asked to find the event in minutes, λ needs to be divided by 60 to have both x and λ in the same interval length Chapter 5: The Poisson Probability Distribution 59 Example: The automatic teller machine (ATM) installed outside Mansfield Savings and Loan is used on average by five costumers per hour. The bank closed this ATM for one hour for repairs. What is the probability that during that hour eight customers came to use this ATM? Solution: Chapter 5: The Poisson Probability Distribution 60 Example: The average number of traffic accidents on a certain section of highway is two per week. assume that the number of accidents follows a Poisson distribution with λ = 2. 1. Find the probability of no accidents on this section of highway during a 1‐week period. 2. Find the probability of at most three accidents on this section of highway during a 2‐week period. Chapter 5: The Poisson Probability Distribution 61 Using the table of Poisson probabilities ¾ The p probabilities for Poisson distribution can also be found using Poisson Probability Table Chapter 5: The Poisson Probability Distribution 62 Example: On average, two new accounts are opened per day at an Imperial Savings Bank branches. Using Table VI of Appendix C, find the probability that on a given day the number of new accounts opened at this bank will be a) Exactly 6 b) At most 3 c) At least 7 Chapter 5: The Poisson Probability Distribution 63 Mean and standard deviation of the Poisson probability distribution ¾ For F the th Poisson P i di t ib ti distribution μ = λ σ2 = λ =λ Example: An auto salesperson sells an average of .9 cars per day. Let x be the number of cars sold by this salesperson on any given day. Using the Poisson probability table, write the probability distribution of x, draw the probability distribution, and d find fi d the th mean and d standard t d d deviation d i ti off x