Survey
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
Chapter 5 Continuous Random Variables 1 Table of Contents 5.1 Continuous Probability Distributions 5.2 The Uniform Distribution 5.3 The Normal Distribution 5.4 The Exponential Distribution (optional) 2 5.1 Continuous Probability Distributions Recall: A continuous random variable may assume any numerical value in one or more intervals Use a continuous probability distribution to assign probabilities to intervals of values The curve f(x) is the continuous probability distribution of the continuous random variable x if the probability that x will be in a specified interval of numbers is the area under the curve f(x) corresponding to the interval • Other names for a continuous probability distribution: • probability curve, or • probability density function 3 Properties of Continuous Probability Distributions Properties of f(x): f(x) is a continuous function such that 1. f(x) 0 for all x 2. The total area under the curve of f(x) is equal to 1 Essential point: An area under a continuous probability distribution is a probability. 4 Area and Probability The blue-colored area under the probability curve f(x) from the value x = a to x = b is the probability that x could take any value in the range a to b Symbolized as P(a x b) Or as P(a < x < b), because each of the interval endpoints has a probability of 0 5 Continuous Probability Distributions For a continuous random variable its probability density function gives a complete information about the variable. The most useful density functions are Normal distribution (正态分布), uniform distribution (均匀分布) and Exponetial distribution (指数分布) 6 Distribution Shapes Symmetrical and rectangular The uniform distribution Symmetrical and bell-shaped The normal distribution Section 5.2 Section 5.3 Skewed Skewed either left or right Section 5.4 for the right-skewed exponential distribution 7 5.2 The Uniform Distribution If c and d are numbers on the real line (c < d), the probability curve describing the uniform distribution is 1 f x = d c 0 for c x d f(x) otherwise c d x The probability that x is any value between the given values a and b (a < b) is ba P a x b d c Note: The number ordering is c < a < b < d. 8 The Uniform Probability Curve 9 5.2 The Uniform Distribution The mean X and standard deviation X of a uniform random variable x are X cd 2 X d c 12 10 Notes on the Uniform Distribution The uniform distribution is symmetrical Symmetrical about its center X X is the median The uniform distribution is rectangular For endpoints c and d (c < d and c ≠ d) the width of the distribution is d – c and the height is 1/(d – c) The area under the entire uniform distribution is 1 Because width height = (d – c) [1/(d – c)] = 1 So P(c x d) = 1 11 Example 5.1: Uniform Waiting Time #1 The amount of time, x, that a randomly selected hotel patron spends waiting for the elevator at dinnertime. Record suggests x is uniformly distributed between zero and four minutes So c = 0 and d = 4, 1 f x = 4 0 0 1 for 0 x 4 4 otherwise ba ba P a x b 40 4 12 Example 5.1: Uniform Waiting Time #2 What is the probability that a randomly selected hotel patron waits at least 2.5 minutes for the elevator? The probability is the area under the uniform distribution in the interval [2.5, 4] minutes The probability is the area of a rectangle with height ¼ and base 4 – 2.5 = 1.5 P(x ≥ 2.5) = P(2.5 ≤ x ≤ 4) = ¼ 1.5 = 0.375 What is the probability that a randomly selected hotel patron waits less than one minutes for the elevator? P(x ≤ 1) = P(0 ≤ x ≤ 1) = ¼ 1 = 0.25 13 Example 5.1: Uniform Waiting Time #4 Expect to wait the mean time X X 04 2 minutes 2 with a standard deviation X of X 40 1.1547 minutes 12 14 5.3 The Normal Distribution The normal probability distribution is defined by the equation f(x) f( x) = 1 σ 2π e 1 x 2 2 for all values x on the real number line, where x is the mean and is the standard deviation, = 3.14159, e = 2.71828 is the base of natural logarithms 15 5.3 The Normal Distribution The normal curve is symmetrical and bell-shaped • The normal is symmetrical about its meanμ • The mean is in the middle under the curve • So is also the median • The normal is tallest over its mean • The area under the entire normal curve is 1 • The area under either half of the curve is 0.5 16 Properties of the Normal Distribution There is an infinite number of possible normal curves The tails of the normal extend to infinity in both directions The particular shape of any individual normal depends on its specific mean and standard deviation The tails get closer to the horizontal axis but never touch it mean = median = mode The left and right halves of the curve are mirror images of each other 17 The Position and Shape of the Normal Curve (a) The mean positions the peak of the normal curve over the real axis 18 The Position and Shape of the Normal Curve (b) The variance 2 measures the width or spread of the normal curve 19 Normal Probabilities Suppose x is a normally distributed random variable with mean and standard deviation The probability that x could take any value in the range between two given values a and b (a < b) is P(a ≤ x ≤ b) P(a ≤ x ≤ b) is the area colored in blue under the normal curve and between the values x = a and x = b 20 Three Important Areas under the Normal Curve 1. P ( – ≤ x ≤ + ) = 0.6826 So 68.26% of all possible observed values of x are within (plus or minus) one standard deviation of 2. P ( – 2 ≤ x ≤ + 2) = 0.9544 So 95.44% of all possible observed values of x are within (plus or minus) two standard deviations of 3. P ( – 3 ≤ x ≤ + 3) = 0.9973 So 99.73% of all possible observed values of x are within (plus or minus) three standard deviations of 21 Three Important Areas under the Normal Curve (Visually) The Empirical Rule for Normal Populations 22 The Standard Normal Distribution If x is normally distributed with mean and standard deviation , then the random variable z x z is normally distributed with mean 0 and standard deviation 1; this normal is called the standard normal distribution. 23 The Standard Normal Distribution z measures the number of standard deviations that x is from the mean • The algebraic sign on z indicates on which side of m is x • z is positive if x > m (x is to the right of m on the number line) • z is negative if x < m (x is to the left of m on the number line) 24 The Standard Normal Table The standard normal table is a table that lists the area under the standard normal curve to the right of the mean (z = 0) up to the z value of interest See Table 5.1 (p.203) Also see Table A.3 (p.824) in Appendix A and the table on the back of the front cover This table is so important that it is repeated 3 times in the textbook! Always look at the accompanying figure for guidance on how to use the table 25 The Standard Normal Table The values of z (accurate to the nearest tenth) in the table range from 0.00 to 3.09 in increments of 0.01 The areas under the normal curve to the right of the mean up to any value of z are given in the body of the table 26 The Standardized Normal Table 0.4772 The Standardized Normal table in the textbook gives the Z probability from 0 to Z 0 2.00 The row gives the value of Z to the second decimal point Z 0.0 The column shows the value 0.1 . of Z to the first . 1.9. decimal point 2.0 0.00 0.01 0.02 … 0.06 0.4750 .4772 P(0<Z < 2.00) = 0.4772, P(0<Z<1.96)=0.4750 27 The Standard Normal Table Example Find P (0 ≤ z ≤ 2) Find the area listed in the table corresponding to a z value of 2.00 Starting from the top of the far left column, go down to “2.0” Read across the row z = 2.0 until under the column headed by “.00” The area is in the cell that is the intersection of this row with this column As listed in the table, the area is 0.4772, so P (0 ≤ z ≤ 2) = 0.4772 28 Some Areas under the Standard Normal Curve 29 Calculating P (-2.53 ≤ z ≤ 2.53) First, find P(0 ≤ z ≤ 2.53) Go to the table of areas under the standard normal curve Go down left-most column for z = 2.5 Go across the row 2.5 to the column headed by .03 The area to the right of the mean up to a value of z = 2.53 is the value contained in the cell that is the intersection of the 2.5 row and the .03 column The table value for the area is 0.4943 Continued 30 Calculating P (-2.53 ≤ z ≤ 2.53) From last slide, P (0 ≤ z ≤ 2.53)=0.4943 By symmetry of the normal curve, this is also the area to the LEFT of the mean down to a value of z = –2.53 Then P (-2.53 ≤ z ≤ 2.53) = 0.4943 + 0.4943 = 0.9886 31 Calculating P (z -1) An example of finding the area under the standard normal curve to the right of a negative z value • Shown is finding the under the standard normal for z ≥ -1 32 Calculating P(z 1) An example of finding tail areas • Shown is finding the righthand tail area for z ≥ 1.00 • Equivalent to the lefthand tail area for z ≤ 1.00 33 Finding Normal Probabilities General procedure: 1. Formulate the problem in terms of x values 2. Calculate the corresponding z values, and restate the problem in terms of these z values 3. Find the required areas under the standard normal curve by using the table Note: It is always useful to draw a picture showing the required areas before using the normal table 34 Example 5.2: The Car Mileage Case #1 Want the probability that the mileage of a randomly selected midsize car will be between 32 and 35 mpg • Let x be the random variable of mileage of midsize cars, in mpg • Want P (32 ≤ x ≤ 35 mpg) Given: x is normally distributed = 33 mpg = 0.7 mpg 35 Example 5.2: The Car Mileage Case #2 Procedure (from previous slide): 1. Formulate the problem in terms of x (as above) 2. Restate in terms of corresponding z values (see next slide) 3. Find the indicated area under the standard normal curve using the normal table (see the slide after that) 36 Example 5.2: The Car Mileage Case #3 For x = 32 mpg, the corresponding z value is z x 32 33 1 1.43 0.7 .07 (so the mileage of 32 mpg is 1.43 standard deviations below (to the left of) the mean = 32 mpg) For x = 35 mpg, the corresponding z value is z x 35 33 2 2.86 0.7 .07 (so the mileage of 35 mpg is 2.86 standard deviations above (to the right of) the mean = 32 mpg) Then P(32 ≤ x ≤ 35 mpg) = P(-1.43 ≤ z ≤ 2.86) 37 Example 5.2: The Car Mileage Case #4 Want: the area under the normal curve between 32 and 35 mpg Will find: the area under the standard normal curve between -1.43 and 2.86 Refer to Figure 5.16 on the second slide Continued 38 Example 5.2: The Car Mileage Case #5 Break this into two pieces, around the mean The area to the left of between -1.43 and 0 By symmetry, this is the same as the area between 0 and 1.43 From the standard normal table, this area is 0.4236 The area to the right of between 0 and 2.86 From the standard normal table, this area is 0.4979 The total area of both pieces is 0.4236 + 0.4979 = 0.9215 Then, P(-1.43 ≤ z ≤ 2.86) = 0.9215 Returning to x, P(32 ≤ x ≤ 35 mpg) = 0.9215 39 Finding Z Points on a Standard Normal Curve 40 z .00 .01 .02 .03 .04 .05 .06 .07 .08 .09 . . . . . . . . . . . 1.5 .4332 .4345 .4357 .4370 .4382 .4394 .4406 .4418 .4429 .4441 1.6 .4452 .4463 .4474 .4484 .4495 .4505 .4515 .4525 .4535 .4545 1.7 .4554 .4564 .4573 .4582 .4591 .4599 .4608 .4616 .4625 .4633 1.8 .4641 .4649 .4656 .4664 .4671 .4678 .4686 .4693 .4699 .4706 1.9 .4713 .4719 .4726 .4732 .4738 .4744 .4750 .4756 .4761 .4767 . . . . . . . . . . . 41 Finding Z Points on a Normal Curve Example 5.5 Stocking out of inventory A large discount store sells blank VHS tapes want to know how many blank VHS tapes to stock (at the beginning of the week) so that there is only a 5 percent chance of stocking out during the week • Let x be the random variable of weekly demand • Let s be the number of tapes so that there is only a 5% probability that weekly demand will exceed s • Want the value of s so that P(x ≥ s) = 0.05 Given: x is normally distributed = 100 tapes = 10 tapes 42 Example 5.5 #1 • Refer to Figure 5.20 in the textbook • In panel (a), s is located on the horizontal axis under the right-tail of the normal curve having mean = 100 and standard deviation = 10 • The z value corresponding to s is st st 100 z 10 • In panel (b), the right-tail area is 0.05, so the area under the standard normal curve to the right of the mean z = 0 is 0.5 – 0.05 = 0.45 43 Example 5.5 #2 Use the standard normal table to find the z value associated with a table entry of 0.45 But do not find 0.45; instead find values that bracket 0.45 For a table entry of 0.4495, z = 1.64 For a table entry of 0.4505, z = 1.65 For an area of 0.45, use the z value midway between these So z = 1.645 st 100 1.645 10 Solving for s gives s = 100 + (1.645 10) = 116.45 Rounding up, 117 tapes should be stocked so that the probability of running out will not be more than 5 percent 44 z .00 .01 .02 .03 .04 .05 .06 .07 .08 .09 . . . . . . . . . . . 1.5 .4332 .4345 .4357 .4370 .4382 .4394 .4406 .4418 .4429 .4441 1.6 .4452 .4463 .4474 .4484 .4495 .4505 .4515 .4525 .4535 .4545 1.7 .4554 .4564 .4573 .4582 .4591 .4599 .4608 .4616 .4625 .4633 1.8 .4641 .4649 .4656 .4664 .4671 .4678 .4686 .4693 .4699 .4706 1.9 .4713 .4719 .4726 .4732 .4738 .4744 .4750 .4756 .4761 .4767 . . . . . . . . . . . 45 Finding Z Points on a Normal Curve 46 Finding a Tolerance Interval Finding a tolerance interval [ k] that contains 99% of the measurements in a normal population 47 Normal Approximation to the Binomial • The figure below shows several binomial distributions • Can see that as n gets larger and as p gets closer to 0.5, the graph of the binomial distribution tends to have the symmetrical, bell-shaped, form of the normal curve 48 Normal Approximation to the Binomial 49 Normal Approximation to the Binomial Continued • Generalize observation from last slide for large p • Suppose x is a binomial random variable, where n is the number of trials, each having a probability of success p • Then the probability of failure is 1 – p • If n and p are such that np 5 and n(1 – p) 5, then x is approximately normal with np and np1 p 50 Example 5.8: Normal Approximation to a Binomial #1 • Suppose there is a binomial variable x with n = 50 and p = 0.5 • Want the probability of x = 23 successes in the n = 50 trials • Want P(x = 23) • Approximating by using the normal curve with np 50 0.50 25 np1 p 50 0.50 0.50 3.5355 51 Example 5.8: Normal Approximation to a Binomial #2 • With continuity correction, find the normal probability P(22.5 ≤ x ≤ 23.5) • See figure below 52 Example 5.8: Normal Approximation to a Binomial #3 For x = 22.5, the corresponding z value is z x 22 .5 25 0.71 3.5355 For x = 23.5, the corresponding z value is x 23 .5 25 z 0.42 3.5355 Then P(22.5 ≤ x ≤ 23.5) = P(-0.71 ≤ z ≤ -0.42) = 0.2611 – 0.1628 = 0.0983 Therefore the estimate of the binomial probability P(x = 23) is 0.0983 53