STA 2023 Chapter 5 – Continuous Random Variables Continuous Probability Distributions (5.1) o General Rule of Continuous Distributions When working with discrete distributions, we were able to plug in numbers or sample points for our desired probabilities. When working with continuous distributions, we will calculate the area under the curve for each distribution – in some cases we will do this directly (uniform, exponential), and in others we will do this using a table (normal). o Example – Discrete versus Continuous Distributions P(x=4) = 0 P(x6) = P(x=6) P(axb) = P(a<xb) = P(ax<b) = P(a<x<b) The Uniform Distribution (5.2) o Probability Distribution, Mean, and Variance for a Uniform Distribution 1 f(x) = , where cxd d c cd 1 = d c 2 d c = 12 c d o Example – An electronic part Suppose the time to failure of an electronic part is uniformly distributed on the interval [0, 12]. What are the values of f(x), the mean, and standard deviation of the 1 time to failure? Using d=12 and c=0, we have f(x)= , = 12 0 12 12 0 = 6, and = = 3.46. 2 12 What is the probability that the electronic part fails within the first 1 9 years? Using f(x)= that we calculated in the last part as the 12 height of our rectangle, we can multiply this by the length of our interval (9), since the entire interval lies within the defined region, and obtain P(0<x<9) = .75. What is the probability that the electronic part lasts between 8 and 15 years? Here, part of our interval lies outside of the defined region so we must truncate at 12, making the length of our interval 1 equal to 4, and multiplying by f(x)= , we have P(8<x<15) = .33. 12 Find P(x=4). Since the electronic component is uniformly distributed, and, hence, continuously distributed, we know that the probability at individual points is zero, so P(x=4) = 0. 1 STA 2023 Chapter 5 – Continuous Random Variables The Normal Distribution (5.3) o Probability Distribution for a Normal Random Variable f(x) = 1 x 2 1 2 e (we will never use this) 2 Graph of a normal random variable -3 -2 -1 +1 +2 +3 A normal distribution with =0 and =1 is called a standard normal distribution. Since there are infinitely many normal distributions, our objective will be to convert each normal random variable to standard normal. We will use z to denote the standard normal random variable. o Example – Finding probabilities from Table IV (pg. 807) P(0 < z < 1.45) = .4265 P(0 z 2) = .4772 P(-1.96 < z < 0) = P(0 < z < 1.96) = .4750 P(z > 2.32) = .5 – P(0 < z < 2.32) = .5 – .4898 = .0102 P(z > 0.48) = .5 – P(0 < z < 0.48) = .5 – .1844 = .3156 P(z < 2.11) = .5 + P(0 < z < 2.11) = .5 + .4826 = .9826 P(z > -2.63) = P(-2.63 < z < 0) + P(z > 0) = .4957 + .5 = .9957 P(-1.51 < z < 1.51) = 2 P(0 < z < 1.51) = 2(.4345) = .8690 P(-2.36 < z < 0.67) = P(-2.36 < z < 0) + P(0 < z < 0.67) = .4909 + .2486 = .7395 P(-1.96 < z or z > 1.96) = 2 P(z > 1.96) = 2(.0250) = .0500 Find the z-score that has 1% above it. P(z > z0) = .01 z0 = 2.33 Find the z-score that has 5% below it. P(z < -z0) = .05 z0 = -1.645 Find the z that has 85% between. P(-z0 < z < z0) = .85 z0 = 1.44 o Property of Normal Distributions If x is a normally distributed with mean and standard deviation , then z x is a standard normal distribution where z = . o Example – Let x be test scores that are normally distributed with =75 and =8 Sketch the distribution of x. 51 59 67 75 83 91 99 2 STA 2023 Chapter 5 – Continuous Random Variables Descriptive Methods for Assessing Normality (5.4) – SKIP Approximating a Binomial Distribution with a Normal Distribution (5.5) o Example – Recall quarter-tossing experiment from Chapter 4 20 18 16 14 12 10 8 6 4 2 0.18 0.16 0.14 0.12 0.1 0.08 0.06 0.04 0.02 0 0 P(x) Binomial with n=25 and p=.5 24 Find P(x = 80). P(x = 80) = 0 Find P(x > 75). P(x > 75) = .5 Find the probability that a student scored less than 61 on the test. P(x<61) 61 75 = P(z< ) = P(z<-1.75) = .5 – P(0<z<1.75) = .5 - .4599 = .0401 8 Find the probability that a student scored better than 91 on the test. 91 75 P(x>91) = P(z> ) = P(z>2) = .5 – P(0<z<2) = .5 – .4772 = .0228 8 Find the probability that a student scored between 66 and 96. P(66<x<96) 66 75 96 75 = P( <z< ) = P(-1.13<z<2.63) = .3708 + .4957 = .8665 8 8 Find the probability that a student scored below 43. P(x<43) = 43 75 P(z< ) = P(z<-4) 0 8 The teacher decides that they want to fail approximately 20% of the people who took the test. At what test score should they set the pass mark? Assuming the teacher wants to fail the lowest 20%, we must first find the value of z0 such that P(-z0<z) = .2. Looking inside Table IV, we see that the most appropriate z-score would be -.84. Using this z-score, we convert this to a test score using x=+z = 75+(-.84)(8) = 68.28. Thus the teacher should set the pass mark at 68.28. 22 x 3 STA 2023 Chapter 5 – Continuous Random Variables o o o o Recall previously that P(x13) = .655 Using the mean and standard deviation of binomial to approximate the mean and standard deviation of the normal distribution, find P(x13) using the normal distribution. Recall that = np = 12.5 and = npq = 13 12.5 2.5. Thus P(x13) = P(z< ) = P(z<.2) = .5793. 2 .5 Looking at the graph of the binomial with a continuous eye, we can include the entire bar of 13 (in the binomial sense) by going to 13.5 (in the continuous sense). Recalculate the probability using this continuity 13.5 12.5 correction. P(x13) = P(z< ) = P(z<.4) = .6554. 2 .5 Conclusion: The continuity correction always outperforms its counterpart – therefore, when using the normal approximation we should always add .5 to our value of k, when in the form of P(xk). Normal Approximation Precondition If we refer to our previous knowledge of the empirical rule and normal distribution we know that almost all of the data lies within three standard deviations of the mean. By imposing the same condition on the binomial distribution, we create a precondition for using the normal approximation: the interval 3 must lie between 0 and n. Example – Coin tossing, revisited Check to see whether the normal approximation was appropriate to use. Recall that = np = 12.5 and = npq = 2.5. Calculating the interval 3, yields (5, 20). We see that this lies entirely within (0, 25), thus, the normal approximation was appropriate. Example – Exercise 5.54 (a,b) (pg. 248) n=100, p=.01. = np = 1, = npq = .995, and 3 yields (-1.985, 3.985) which does not lie entirely within (0, 100). Thus, the normal approximation is not appropriate. n=20, p=.6. = np = 12, = npq = 2.19, and 3 yields (5.43, 18.57) which lies entirely within (0, 20). Thus, the normal approximation is appropriate. Example – Exercise 5.58 (pg. 248) n=1000 and p=.50. = np = 500, = npq = 15.81, and 3 yields (484.19, 515.81) which lies entirely within (0, 1000). Thus, the normal approximation is appropriate. 500.5 500 Find P(x>500). P(x>500) = 1 – P(x500) = 1 – P(z< )=1– 15.81 P(z<.03) = 1 – .5120 = .4880 Find P(490x<500). P(490x<500) = P(x499) – P(x489) = 499.5 500 489.5 500 P(z< ) – P(z< ) = P(z<-.03) – P(z<-.66) = .4880 15.81 15.81 – .2546 = .2334 4 STA 2023 Chapter 5 – Continuous Random Variables The Exponential Distribution (5.6) o Probability Distribution, Mean, and Standard Deviation for an Exponential R.V. x 1 f(x) = e (we will never use this) = 2 = 2 = o Finding Probability (Area) for an Exponential Distribution P(x>a) = e x x P(x<a) = 1 – e o Example – Exercise 5.80 (pg. 254) Find P(x3). Here, = 9.15, so P(x3) = 1 – e Find P(x>20). Again, = 9.15, so P(x>20) = e 3 9.15 20 9.15 = 1 – .7205 = .2795 = .1124 5