Calc 2 Lecture Notes Section 5.7 Page 1 of 7 Section 5.7: Probability Big idea: If you have a function that mimics a histogram of all possible outcomes for some kind of measurement, then the definite integral of that function over a range of outcomes or measurements is the probability that you will make a measurement in that range. Hmmm…. Big skill: You should be able to integrate a probability density function over the correct range of values to predict the likelihood of an event, and to compute the mean value of a measurement over a range of values. Main Formulas: 1. Properties of a probability density function (pdf) f(x) on the complete range of possible outcomes a x b: a. Probability is always positive: f(x) 0 for a x b b b. All possible outcomes must sum up to 100%: f ( x)dx 1 a d c. Probability of a range of measurements computed as: P(c X d) = f ( x)dx c b 2. The mean (most likely value) is: xf ( x)dx . a 3. The median (half above, half below) is found by solving this equation for c: c 0.5 f ( x)dx . a Formula Practice: 3 1. Show that the function f x x 2 is a valid pdf (probability distribution function) on 8 the interval [0, 2]. Then compute the mean and median of this pdf. Finally, compute the probability of an x value falling in the range [0.5, 1.5]. Calc 2 Lecture Notes Section 5.7 Page 2 of 7 2. Compute the value of k to make f x k sin x a valid pdf (probability distribution function) on the interval [0, 1]. Then compute the mean and median of this pdf. Finally, compute the probability of an x value falling in the range [0, 0.25]. Connection Between Discrete Probability and Probability Distribution Functions: Question: What does child-birthin’ have to do with probability distribution functions? Answer: The number of kids you can expect of either gender is a precursor to the “normal distribution function”. Example: If you have 2 kids, what are the probabilities of getting zero, one, or two girls? You can list all the possibilities this way: GG, GB, BG, BB, where the first letter represents the gender of the first kid, and the second letter represents the gender of the second kid. You also can list the possibilities using a “probability tree.” Tracing through every branch of the tree yields the same four choices: GG, GB, BG, BB. Calc 2 Lecture Notes Section 5.7 Page 3 of 7 There is only one possibility (out of 4) that leads to no girls, there are two possibilities (out of 4) that lead to one girl, and only one possibility (out of 4) that leads to two girls. 1 o Thus, the possibility of 0 girls is 0.25 4 2 o The possibility of 1 girl is 0.50 4 1 o The possibility of 2 girls is 0.25 4 These probabilities are frequently represented on a bar chart (or histogram) like this: Probability of Number of Girls Out of Two Children Probability 0.60 0.50 0.40 0.30 0.20 0.10 0.00 -1 -0.5 0 0.5 1 1.5 2 2.5 3 Number of Girls Connection between this histogram, PDFs, and integrals: Notice what happens if you add up the areas of each of the three rectangles: (0.25)(1) + (0.50)(1) + (0.25)(1) = 1; this can be interpreted as: the chance of getting either zero, one, or two girls out of two children is 100% (obviously). Connection to calculus: this sum is a midpoint approximation to the integral of some as b yet unknown function, and that integral is equal to 1: f ( x)dx 1 a Notice that if you want the probability of zero or one girls, the answer is: (0.25)(1) + (0.50)(1) = 0.75 (or 75%). Connection to calculus: This is a midpoint approximation to the integral from 0 to 1: 1 f ( x)dx 0.75 0 Calc 2 Lecture Notes Section 5.7 Page 4 of 7 How to compute the histogram for more kids: A cool connection between probability and algebra is that the coefficients of the power of a binomial match the number of chances of getting a certain outcome. Notice the similarity of squaring the binomial to the 4 possible outcomes from having two children: 2 G B G B G B GG GB BG BB 1 G 2 2 GB 1 B 2 Remember that Pascal’s Triangle can be used to find the coefficients in the expansion of a binomial. However, Pascal originally did not invent his triangle to speed calculation of the powers of a binomial; he was a gambling fiend who wanted an edge at the casino… Also remember that the binomial theorem can be used to compute the expansion of a n n n n! n binomial: G B G n i Bi , where . The total number of outcomes is i 0 i i i ! n i ! n n n k n 2 , so the probability of k girls (or boys) out of n kids is n . 2 i 0 i Example: If you have 4 kids, what are the probabilities of getting zero through four girls? 4 G B 1 G 4 4 G 3 B 6 G 2 B 2 4 GB3 1 B 4 There are 1 + 4 + 6 + 4 + 1 = 16 total outcomes; there are always 2n total choices. Breakdown per possibility: 1 0.0625 o Possibility of 0 girls is 16 4 0.25 o Possibility of 1 girl is 16 6 0.375 o Possibility of 2 girls is 16 4 0.25 o Possibility of 3 girls is 16 1 0.0625 o Possibility of 4 girls is 16 Calc 2 Lecture Notes Section 5.7 Page 5 of 7 Probability of Number of Girls Out of Four Children 0.40 Probability 0.30 0.20 0.10 0.00 -1 0 1 2 3 4 5 Number of Girls Example: If you have 20 kids, what are the probabilities? Probability of Number of Girls Out of 20 Children Probability 0.2 0.15 0.1 0.05 0 -1 1 3 5 7 9 11 13 15 17 19 21 Number of Girls Discrete Probability Normal Distribution, Sigma = 2.264 As the number of children (or coin tosses or radioactive decays or any other random process) tends to infinity, the histogram gets closer and closer to a pdf called the Normal Distribution Function: 1 The Normal Distribution Function: f x e 2 x 2 2 2 In the Normal Distribution Function, = the mean, or average value, which corresponds to the maximum of the function. = the standard deviation, which measures the “spread” of the distribution function 1 is the “normalization constant” which guarantees f x dx 1 2 Calc 2 Lecture Notes Section 5.7 Page 6 of 7 Once you have a probability distribution function, you can make many statistical calculations: For example, the distribution function for IQ, where the average IQ is defined as 100 and the 1 standard deviation is 10, is f x e 10 2 x 1002 200 . What is the probability that someone has an IQ between 90 and 110 (i.e., a range from one standard deviation above to one standard deviation below the mean)? P 90 x 110 110 f ( x)dx 90 110 x 100 2 1 e 200 dx 10 2 90 1 fnInt(e^(-(X-100) 2 / 200), X ,90,110) 10 2 0.6827 68.27% What is the probability that someone has an IQ of 115? You have to choose a range of values that would “round off” to this IQ value, like [114.5, 115.5]. P 114.5 x 115.5 115.5 f ( x) dx 114.5 115.5 x 100 2 1 e 200 dx 10 2 114.5 1 fnInt(e^(-(X-100) 2 / 200), X ,114.5,115.5) 10 2 0.01296 1.296% Calc 2 Lecture Notes Section 5.7 Page 7 of 7 What is the probability that someone has an IQ over 130 (i.e., 3 standard deviations above the average)? 130 1 P x 130 1 f ( x)dx 2 70 1 1 1 2 10 2 0.0013 0.13% 130 e x 100 2 200 70 dx Show that this distribution returns 100 as the mean: b xf ( x)dx a 1 10 2 1 10 2 1 10 2 100 10 2 0 100 xe x 100 2 200 Let u x dx x 100 100 e x 100 200 2 dx x 100 e x 100 2 200 1 dx 100 10 2 e x 100 2 200 dx e du 100 1 u 100 x 100 200 2 x 100 1 du x 100 dx 200 100 du x 100 100 dx x 100 e x 1002 200 dx 100 100eu du And u(-) = - And u() = - Show that the median is also 100: i.e., show that c = 100 is the value that satisfies the c equation 0.5 f ( x)dx . a c a 100 x 1002 1 f ( x)dx e 200 dx 10 2 1 fnInt(e^(-(X-100) 2 / 200), X , 1000,100) 10 2 0.5 2 du u e dx dx