35 Chapter 4 Section 4.1 Discrete Probability Distributions Representing a Discrete Probability Distribution Function Example 1. A family has 3 children. Define discrete random variable X = the number of girls. (a). Find the range of X. (b). Find the probability of each value of X. Solution: (a). X = 0: BBB X = 1: GBB, BGB, BBG X = 2: GGB, GBG, BGG X = 3: GGG Range of X: {0, 1, 2, 3} (b). Sample Space: S = {GGG, GGB, GBG, GBB, BGG, BGB, BBG, BBB} 1 3 3 1 P( X 0) , P( X 1) , P( X 2) , P( X 3) 8 8 8 8 Let x the value of X x P , then the table 0 1 2 3 1/8 3/8 3/8 1/8 defines P as a function of x : probability distribution function. 36 A probability distribution function can also be expressed by an algebra expression (a formula) Example 2. Two fair dice are rolled. X = the sum of the face numbers. (a). Find the range of X. (b). Find the PDF (Probability Distribution Function). Solution: (a). {2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12} (b). The PDF can be represented as table: x P 2 3 4 5 6 7 8 9 10 11 12 1/36 2/36 3/36 4/36 5/36 6/36 5/36 4/36 3/36 2/36 1/36 This function can also be written as formula: P( X x) x7 6 36 36 Or simply as P( x) 6 x7 , x {2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12} 36 Note P( x) P( X x) . A formula representation of PDF may not be possible. A probability distribution gives the probability for each value of the random variable. 37 Example 3. Suppose A company plans to hire 10 new employees and there are hundreds of applicants, with equal numbers of men and women. Let the random variable X represent the number of women hired. If new employees are selected in such a way that men and women have equal chance of being hired, find the probability distribution for random variable X . Solution: The Table below describes the probability distribution for the random variable X . The probability of no women will be hired (among 10) is 0.001, the probability of 1 woman (and 9 men) is 0,010, and so on. Later on we will see how the probabilities in the table were found. P(x) 0.001 0.010 0.044 0.117 0.205 0.246 0.205 0.117 0.044 0.010 0.001 0.3 0.25 Probability x 0 1 2 3 4 5 6 7 8 9 10 0.2 0.15 0.1 0.05 0 0 1 2 3 4 5 6 7 8 Number of Women Hired 10 x (The probabilities are calculated by P( x) 0.5 x (1 0.5)10 x .) 9 10 38 Requirements for P(x) to be a probability distribution Function: 1. P(x) 1 where x assumes all possible values 2. 0 P( x) 1 for every value of x Example 4 Does P( x) x 5 (where x can take the values of 0, 1, 2, 3) determine a probability distribution? Solution: If a probability distribution is determined, then it must satisfy the above two conditions. But 0 1 2 3 6 P ( x ) 5 5 5 5 5 1, so P(x) is not a PDF on {0, 1, 2, 3}. Example 5. Does P( x) x 10 (where x can take the values of 0, 1, 2, 3 or 4) determine a probability distribution? Solution: For x = 0, 1, 2, 3, 4, 0 P( x) 0 1 2 3 x 1 and 10 4 P( x) 10 10 10 10 10 1 , so P(x) is a PDF on {0, 1, 2, 3, 4}. 39 Section 4.2 Expectation and Variance Three extremely important characteristics of data: (1). Representative score, such as an average. (2). Measure of scattering or variation (3). Nature or shape of the distribution, such as bell shape. Expectation: The expected value of a discrete random variable is the mean or average. Let X be the random variable, x be its value, and P(x) = to the probability of X x , then the expected value of X is E xP(x) where, means sum over all possible values of x . For there are total n values for X : x1 , x 2 , xn and if every value has the equal chance of being selected, i.e. P( x) 1 n , then n n i 1 i 1 1 n xi P( xi ) xi x1 x2 xn , n which is the formula we had earlier. Variance: 2 [( x ) 2 P( x)] (Definition formula) [( x 2 2 x 2 ) P( x)] [ x 2 P( x)] 2 [ xP( x)] 2 P( x) [ x 2 P( x)] 2 2 1 40 Thus, 2 [ x 2 P( x)] 2 Standard deviation: Example 1. [ x (Calculation formula) 2 P ( x )] 2 Consider the number game started many years ago by organized crime groups and now run legally by many organized governments. You can place a bet that 3-digit number of your choice will be a winning number selected. The typical winning pay off is 499 to 1, meaning that for each winning $1 bet, you would be given $500; your return is $499. Suppose that you bet on number 327. What is your expected value of gain or loss? Solution: For this bet there are only two outcomes: You win or you lose. Because you have number 327 and there are 1000 possibilities ( 000 – 999), your possibility of winning is 1/1000 and losing is 999/1000. Event Net gain ( x ) Probability P(x) Win 499 0.001 Lose -1 0.999 Expected value E xP( x) 499(0.001) (1)(0.999) 0.50 This means that in a long run, for each $1 bet, we expected to lose an average of 50 cents. 41 Example 2. Assume that the Telektron Company has applicants from men and equal number from women and assuming that 10 applicants will be hired in such a way that men and women have the equal opportunities, find the mean number of women hired in such groups of 10, as well as the variance and standard deviation. Solution: (This is the continuation of Example 3 in Section 4.1.) x P(x) xP(x ) 0 1 2 3 4 5 6 7 8 9 10 Total 0.001 0.010 0.044 0.117 0.205 0.246 0.205 0.117 0.044 0.010 0.001 0.000 0.010 0.088 0.351 0.820 1.230 1.230 0.819 0.352 0.090 0.010 5.000 xP(x) x2 0 1 4 9 16 25 36 49 64 81 100 x 2 P( x) 0.000 0.010 0.176 1.053 3.280 6.150 7.380 5.733 2.816 0.810 0.100 27.508 x 2 P( x) Use the table results, we get xP ( x) 5.0 ( E ) 2 [ x 2 P( x)] 2 27.508 5.02 2.508 2.5 2.508 1.6 We now know that among 10 new employees, the mean number of women is 5.0, the variance is 2.5 “women squared”, and the standard deviation is 1.6 women. 42 Section 4.3 Bernoulli Random Variables Definition: A Bernoulli random variable is a discrete random variable with only two possible outcomes on a single trial, such as The two outcomes are mutually exclusive. If Pr (success) = p , then Pr (failure) = 1 p . Successive trials are independent of one another. Examples 1. Flip a fair coin “Success” = head, “failure” = tail P ( S ) 1 2 , P( F ) 1 2 2. Checking products “Success” = good, “failure” = defective 3. Making free throw “Success” = “make it”, “failure” = “miss it” (Note: Successive trials may not be independent, so this may not be a Bernoulli trial.) 4. Suppose two fair dice are rolled once. “Success” = the sum of the face value is 10, “failure” = the sum of the face value is not 10. P( S ) 3 36 1 12 P( F ) 1 1 12 11 12 43 Section 4.4 The Binomial Distribution Binomial Distribution is the most important discrete distribution Definition: Random variable X follows a Binomial distribution if X counts the number of successes in a sequence of n independent Bernoulli trials. Notation: X ~ B(n, p) (“ X follows a Binomial distribution.”) X : Binomial random variable n : the fixed number of trials p : the probability of success (or failure) ( n , p are the parameters of the Binomial distribution) Examples 1. Flip a fair coin 10 times, X = number of the heads occur X ~ B (10, 0.5) 2. Suppose a player makes free throw with 80% accuracy, X = the number of times he misses the free throw in 15 tries. X ~ B (15, 0.2) Note: p 20% 1 80% . 44 Binomial PDF n P( x) p x (1 p) n x , x where n n! x x!(n x)! and P( x) Pr ( X x) . Mean, variance and standard deviation for the binomial distribution: The binomial distribution is a discrete probability distribution, so the mean, variance and standard deviation can be found from the formulas xP(x) 2 [ x 2 P( x)] 2 Substitute [ x 2 P ( x )] 2 n P( x) p x (1 p) n x x into the formulas, after algebraic manipulations, we have the following simple formulas: np 2 np(1 p) npq npq The formula for the mean makes sense intuitively. If we were to analyze 100 births, we would expect to get about 50 girls, and np in this experiment becomes 100(1/2) = 50. In general, if we consider p to be the proportion of success, then the product np will give us the actual number of expected successes among n trials. 45 Example 1. Like many companies, the Providence Electronics mail order company now has its telephone services configured so that callers can directly reach the department they want by pressing a number on their touch-tone phone. However callers with rotary phones must listen to a long message before they can speak to an operator who can make a connection. 70% of the households have touch-tone phones (Based on the Yankee Group and USA Today research). A manger monitors the first 4 calls to learn how the system is working. If X is the random variable representing the number of callers with touch-tone phones in a group of 4, find its mean, variance, and standard deviation. Solution: In this binomial experiment we have n 4 and P (touchtone) = 0.70. It follows that P(rotary phone) = 0.30. We will find the mean and standard deviation by using two methods. Method 1: Use binomial distribution formulas: np 4(0.70) 2.8 touch-tone phones 2 npq 4(0.70)(0.30) 0.84 npq 0.84 0.92 Method 2: Method 1 provides us with the solutions we seek, but we want to show that these same values will result from use of more general formulas as well 46 xP(x) 2 [ x 2 P( x)] 2 [ x 2 P ( x )] 2 x P(x) xP(x ) 0 1 2 3 4 Total 0.008 0.076 0.265 0.412 0.240 0.000 0.076 0.530 1.236 0.960 2.802 x2 0 1 4 9 16 x 2 P( x) 0.000 0.076 1.060 3.708 3.840 8.684 xP( x) 2.802 2.8 . 2 [ x 2 P( x)] 2 8.684 2.802 2 0.832796 0.83 . 0.832796 0.91 The two methods produce the same results, except for minor discrepancies due to rounding. Two important points: 1. The simplified formulas do lead to the same result as the more general formulas that apply to all discrete probability distributions. 2. The binomial formulas are much simpler, less chance for arithmetic errors, and are more conducive to a positive outlook on life. If we know that an experiment is binomial, we should use the simplified formulas. 47 After finding the values for the mean and standard deviation , we can use them to draw some conclusions about the variation. In particular, we can use the rule of thumb, the empirical rule( 68-9599 rule), in the next example. Example 2. Providence Electronics receives 400 calls in a typical day, 70% of the callers have touch-tone phones. a). If X is the random variable representing the number of callers with touch-tone phones in a group of 400, find its mean and standard deviation. b). According to the empirical rule, 95% of scores fall within 2 standard deviations of the mean. Apply this rule by using the result from part a) and find the values that are 2 standard deviations away from the mean. (The empirical rule applies because this binomial distribution has a probability histogram that is approximately bell shaped.) Solution: a). X ~ B(400, 0.7) np 400(0.70) 280 touch-tone phones, npq 400(0.70)(0.30) 9.2 touch-tone phones. 48 b). Using the empirical rule, we know that 95% of the scores fall within 2 standard deviations 2 280 2(9.2) 261.6 2 280 2(9.2) 298.4 That is 95% of typical days with 400 calls will include between 261.6 and 298.4 callers with touch-tone phones. The results also shows that 95% of such days will have between 101.6 (= 400 – 298.4) and 138.4 (= 400 – 261.6) callers with rotary phones. Such information is crucial to the manager who must provide enough operators to handle calls so that customers are not left on hold with the awful message “All operators are busy, Please stand by.” When n is large and p is close to 0.5 ( as in the following example), the binomial distribution tends to resemble the smooth curve that approximates the probability histogram in the graph below. Note that the data tend to form a bell-shaped curve. In the following example we will use the empirical rule, which requires such a bell shaped distribution. Example 3. 100 couples were trying to have baby girls used the Ericsson’s method of gender selection. 75 of the couples had girls and 25 had boys. Assuming that Ericsson’s method had no 49 effect and assuming that girls and boys are equally likely, find the mean and standard deviation for the number of girls in groups of 100 babies. Use the empirical rule to determine whether these results support Dr. Ericsson’s claim that his method is effective. 0.09 0.08 0.07 P(x) 0.06 0.05 0.04 0.03 0.02 0.01 96 10 0 92 88 84 80 76 72 68 64 60 56 52 48 44 40 36 32 28 24 20 8 12 16 4 0 0 Number of Success (x) Solution: Let X represent the random variable for the number of girls in 100 births. Assuming that Ericsson’s method has no effect and that girls and boys are equally likely, then X ~ B(100, 0.5) np 100(0.5) 50 girls npq 100(0.50)(0.50) 5 girls 50 For groups of 100 couples who each have a baby, the mean number is 50 and the standard deviation is 5. Therefore, for the specific group that use Ericsson’s method of gender selection, the 75 girls represent 75 50 5 5 (or z -score of 5) standard deviations away from the mean. According the empirical rule, about 99.7% of all scores fall within 3 standard deviations of the mean. This suggests under the assumption of equally likely of girls and boys, our sample results are highly unusual. Because it is very unlikely that there would be 75 girls in 100 births, it appears that the Ericsson method is effective in increasing the likelihood of a baby being a girl.