Chapter 5: Continuous Random Variables Where We’ve Been Using probability rules to find the probability of discrete events Examined probability models for discrete random variables McClave: Statistics, 11th ed. Chapter 5: Continuous Random Variables 2 Where We’re Going Develop the notion of a probability distribution for a continuous random variable Examine several important continuous random variables and their probability models Introduce the normal probability distribution McClave: Statistics, 11th ed. Chapter 5: Continuous Random Variables 3 5.1: Continuous Probability Distributions A continuous random variable can assume any numerical value within some interval or intervals. The graph of the probability distribution is a smooth curve called a probability density function, frequency function or probability distribution. McClave: Statistics, 11th ed. Chapter 5: Continuous Random Variables 4 5.1: Continuous Probability Distributions There are an infinite number of possible outcomes p(x) = 0 Instead, find p(a<x<b) Table Software Integral calculus) McClave: Statistics, 11th ed. Chapter 5: Continuous Random Variables 5 5.2: The Uniform Distribution X can take on any value between c and d with equal probability = 1/(d - c) For two values a and b ba P ( a x b) d c cabd McClave: Statistics, 11th ed. Chapter 5: Continuous Random Variables 6 5.2: The Uniform Distribution Mean: cd 2 Standard Deviation: d c 12 McClave: Statistics, 11th ed. Chapter 5: Continuous Random Variables 7 5.2: The Uniform Distribution Suppose a random variable x is distributed uniformly with c = 5 and d = 25. What is P(10 x 18)? McClave: Statistics, 11th ed. Chapter 5: Continuous Random Variables 8 5.2: The Uniform Distribution Suppose a random variable x is distributed uniformly with c = 5 and d = 25. What is P(10 x 18)? 18 10 P (10 x 18) .40 25 5 McClave: Statistics, 11th ed. Chapter 5: Continuous Random Variables 9 5.3: The Normal Distribution Closely approximates many situations Perfectly symmetrical around its mean The probability density function f(x): f ( x) 1 e 2 [( x ) / ]2 2 µ = the mean of x = the standard deviation of x = 3.1416… e = 2.71828 … McClave: Statistics, 11th ed. Chapter 5: Continuous Random Variables 10 5.3: The Normal Distribution Each combination of µ and produces a unique normal curve The standard normal curve is used in practice, based on the standard normal random variable z (µ = 0, = 1), with the probability distribution f ( z) 1 e 2 z2 2 The probabilities for z are given in Table IV McClave: Statistics, 11th ed. Chapter 5: Continuous Random Variables 11 5.3: The Normal Distribution P(0 z 1.00) .3413 P(1.00 z 0) .3413 P(1 z 1) .3413 .3413 .6826 P(1 z 1.25) P(0 z 1.25) P(0 z 1.00) .3944 .3413 .0531 McClave: Statistics, 11th ed. Chapter 5: Continuous Random Variables 12 5.3: The Normal Distribution For a normally distributed random variable x, if we know µ and , zi xi So any normally distributed variable can be analyzed with this single distribution McClave: Statistics, 11th ed. Chapter 5: Continuous Random Variables 13 5.3: The Normal Distribution Say a toy car goes an average of 3,000 yards between recharges, with a standard deviation of 50 yards (i.e., µ = 3,000 and = 50) What is the probability that the car will go more than 3,100 yards without recharging? McClave: Statistics, 11th ed. Chapter 5: Continuous Random Variables 14 5.3: The Normal Distribution Say a toy car goes an average of 3,000 yards between recharges, with a standard deviation of 50 yards (i.e., µ = 3,000 and = 50) What is the probability that the car will go more than 3,100 yards without recharging? 3100 3000 P( x 3100) P z 50 P( z 2.00) 1 P( z 2.00) 1 .5 P(0 z 2.00) 1 .5 .4772 .0228 McClave: Statistics, 11th ed. Chapter 5: Continuous Random Variables 15 5.3: The Normal Distribution To find the probability for a normal random variable … Sketch the normal distribution Indicate x’s mean Convert the x variables into z values Put both sets of values on the sketch, z below x Use Table IV to find the desired probabilities McClave: Statistics, 11th ed. Chapter 5: Continuous Random Variables 16 5.4: Descriptive Methods for Assessing Normality If the data are normal A histogram or stem-and-leaf display will look like the normal curve The mean ± s, 2s and 3s will approximate the empirical rule percentages The ratio of the interquartile range to the standard deviation will be about 1.3 A normal probability plot , a scatterplot with the ranked data on one axis and the expected z-scores from a standard normal distribution on the other axis, will produce close to a straight line McClave: Statistics, 11th ed. Chapter 5: Continuous Random Variables 17 5.4: Descriptive Methods for Assessing Normality IQR 22 1.29 s 17 Errors per MLB team in 2003 Mean: 106 Standard Deviation: 17 IQR: 22 Frequency Histogram 10 9 8 7 6 5 4 3 2 1 0 x 2 s 106 34 72 140 28 out of 30: 93% Frequency 77 89.8 102.6 115.4 128.2 More Errors per team, 2003 x s 106 17 89 123 22 out of 30: 73% x 3s 106 51 55 157 30 out of 30: 100% McClave: Statistics, 11th ed. Chapter 5: Continuous Random Variables 18 5.4: Descriptive Methods for Assessing Normality 3 Normal Quantile 2 1 0 A normal probability plot is a scatterplot with the ranked data on one axis and the expected zscores from a standard normal distribution on the other axis -1 -2 -3 60 80 100 120 140 160 Errors McClave: Statistics, 11th ed. Chapter 5: Continuous Random Variables 19 5.5: Approximating a Binomial Distribution with the Normal Distribution Discrete calculations may become very cumbersome The normal distribution may be used to approximate discrete distributions The larger n is, and the closer p is to .5, the better the approximation Since we need a range, not a value, the correction for continuity must be used A number r becomes r+.5 McClave: Statistics, 11th ed. Chapter 5: Continuous Random Variables 20 5.5: Approximating a Binomial Distribution with the Normal Distribution Calculate the mean plus/minus 3 standard deviations 3 np npq If this interval is in the range 0 to n, the approximation will be reasonably close Express the binomial probability as a range of values P( x a) P ( x b) P ( x a ) Find the z-values for each binomial value z (a .5) Use the standard normal distribution to find the probability for the range of values you calculated McClave: Statistics, 11th ed. Chapter 5: Continuous Random Variables 21 5.5: Approximating a Binomial Distribution with the Normal Distribution Flip a coin 100 times and compare the binomial and normal results Binomial: Normal: 100 50 50 .5 .5 .0796 P( x 50) 50 100 .5 50 100 .5 .5 5 50.5 50 49.5 50 P(49.5 x 50.5) P z 5 5 P(0.10 z 0.10) .0796 McClave: Statistics, 11th ed. Chapter 5: Continuous Random Variables 22 5.5: Approximating a Binomial Distribution with the Normal Distribution Flip a weighted coin [P(H)=.4] 10 times and compare the results Binomial: Normal: 10 5 5 P( x 5) .4 .6 .1204 5 10 .4 4 10 .4 .6 1.55 5.5 4 4.5 4 P(4.5 x 5.5) P z 1.55 1.55 P(0.32 z 0.32) .1255 McClave: Statistics, 11th ed. Chapter 5: Continuous Random Variables 23 5.5: Approximating a Binomial Distribution with the Normal Distribution Flip a weighted coin [P(H)=.4] 10 times and compare the results Binomial: Normal: 10 5 5 P( x 5) .4 .6 .1204 5 The more p differs from .5, 10 .4 4 and the smaller n is, 10 .4 .6 1.55 the less precise the approximation will be 5.5 4 4.5 4 P(4.5 x 5.5) P z 1.55 1.55 P(0.32 z 0.32) .1255 McClave: Statistics, 11th ed. Chapter 5: Continuous Random Variables 24 5.6: The Exponential Distribution Probability Distribution for an Exponential Random Variable x Probability Density Function f ( x) 1 e x / ( x 0) Mean: µ = Standard Deviation: = McClave: Statistics, 11th ed. Chapter 5: Continuous Random Variables 25 5.6: The Exponential Distribution Suppose the waiting time to see the nurse at the student health center is distributed exponentially with a mean of 45 minutes. What is the probability that a student will wait more than an hour to get his or her generic pill? 60 McClave: Statistics, 11th ed. Chapter 5: Continuous Random Variables 26 5.6: The Exponential Distribution Suppose the waiting time to see the nurse at the student health center is distributed exponentially with a mean of 45 minutes. What is the probability that a student will wait more than an hour to get his or her generic pill? P( x a) e P( x 60) e a 60 45 e 1.33 .2645 60 McClave: Statistics, 11th ed. Chapter 5: Continuous Random Variables 27