* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
Download Learning Objective Thinking Challenge Random Variables
Survey
Document related concepts
Transcript
1 WEEK5: DISCRETE PROBABILITY DISTRIBUTIONS AND CONTINUOUS PROBABILITY DISTRIBUTIONS Learning Objective Discrete Probability Distributions 2 3 Random Variables Discrete Probability Distributions Expected Value and Variance Binomial Probability Distribution Poisson Probability Distribution Hypergeometric Probability Distribution Dr. Po-Lin Lai .40 .30 .20 Develop the notion of a random variable Learn that numerical data are observed values of either discrete or continuous random variables Study two important types of random variables and their probability models: the binomial and normal model Define a sampling distribution as the probability of a sample statistic Learn that the sampling distribution of follows a normal model .10 0 Thinking Challenge 4 1 2 3 You’re taking a 33 question multiple choice test. Each question has 4 choices. Clueless on 1 question, you decide to guess. What’s the chance you’ll get it right? If you guessed on all 33 questions, what would be your grade? Would you pass? Discrete Random Variables with a Finite Number of Values Random Variables 5 4 6 A random variable is a numerical description of the outcome of an experiment. A discrete random variable means that random variables that can assume a countable number (finite or infinite) of values. A continuous random variable may assume any numerical value in an interval or collection of intervals. Example: JSL Appliances Let x = number of TVs sold at the store in one day, where x can take on 5 values (0, 1, 2, 3, 4) We can count the TVs sold, and there is a finite upper limit on the number that might be sold (which is the number of TVs in stock). 1 Discrete Random Variables with a Infinite Number of Values Discrete Random Variable Examples Continuous Random Variable Examples 7 Example: JSL Appliances We can count the customers arriving, but there is no finite upper limit on the number that might arrive. Discrete Probability Distributions 10 Random Variable (X) Experiment Let x = number of customers arriving in one day, where x can take on the values 0, 1, 2, . . . Possible Values Make 100 Sales Calls # Sales 0, 1, 2, ..., 100 Inspect 70 Radios # Defective 0, 1, 2, ..., 70 We can describe a discrete probability distribution with a table, graph, or formula. Weigh 100 People Possible Values Weight X>0 Hours $ amount Inter-Arrival Time Answer 33 Questions # Correct 0, 1, 2, ..., 33 Count Cars at Toll Between 11:00 & 1:00 # Cars Arriving 0, 1, 2, ..., ∞ Measure Time Between Arrivals Discrete Probability Distributions Random Variable (X) Measure Part Life Amount spent on food Salary=$2000 11 The probability distribution for a random variable describes how probabilities are distributed over the values of the random variable. Experiment X>0 0<X<2000 X>0 Discrete Probability Distributions 12 The probability distribution is defined by a probability function, denoted by f(x), which provides the probability for each value of the random variable. The required conditions for a discrete probability function are: f(x) > 0 f(x) = 1 Example: JSL Appliances Using past data on TV sales, … a tabular representation of the probability distribution for TV sales was developed. Units Sold 0 1 2 3 4 Number of Days 80 50 40 10 20 200 x 0 1 2 3 4 f(x) .40 .25 .20 .05 .10 1.00 80/200 2 Discrete Probability Distributions 13 Expected Value Discrete Uniform Probability Distribution 14 Example: JSL Appliances Probability .50 .40 f(x) = 1/n .10 where: n = the number of values the random variable may assume 1 2 3 4 17 Variance Weighted average of squared deviation about mean 2 = E[(x (x p(x) Standard Deviation The expected value does not have to be a value the random variable can assume. Expected Value Expected Value 16 The expected value is a weighted average of the values the random variable may assume. The weights are the probabilities. the values of the random variable are equally likely .20 Values of Random Variable x (TV sales) E(x) = = xf(x) The discrete uniform probability function is .30 0 The expected value, or mean, of a random variable is a measure of its central location. The discrete uniform probability distribution is the simplest example of a discrete probability distribution given by a formula. Graphical representation of probability distribution Expected Value 18 Example: JSL Appliances x 0 1 2 3 4 f(x) xf(x) .40 .00 .25 .25 .20 .40 .05 .15 .10 .40 E(x) = 1.20 expected number of TVs sold in a day Example: JSL Appliances x x- 0 1 2 3 4 -1.2 -0.2 0.8 1.8 2.8 (x - )2 f(x) (x - )2f(x) 1.44 0.04 0.64 3.24 7.84 .40 .25 .20 .05 .10 .576 .010 .128 .162 .784 Variance of daily sales = 2 TVs squared = 1.660 Standard deviation of daily sales = 1.2884 TVs 3 Thinking Challenge Discrete Probability Distribution Example Expected Value & Variance Solution* Experiment: Toss 2 coins. Count number of tails. You toss 2 coins. You’re interested in the number of tails. What are the expected value, variance, and standard deviation of this random variable, number of tails? Probability Distribution Values, x Probabilities, p(x) © 1984-1994 T/Maker Co. 0 1/4 = .25 1 2/4 = .50 2 1/4 = .25 x p(x) x p(x) x – (x – ) (x – ) 2p(x) 0 .25 0 –1.00 1.00 1 .50 .50 0 0 0 2 .25 .50 1.00 1.00 .25 2 = 1.0 .25 2 = .50 = .71 © 1984-1994 T/Maker Co. Binomial Probability Distribution 22 Binomial Probability Distribution Binomial Probability Distribution 23 The binomial probability distribution is a discrete probability distribution that provides many applications. It is associated with a multiple-step experiment that we can call the binomial experiment. Four Properties of a Binomial Experiment 1. The experiment consists of a sequence of n identical trials. Our interest is in the number of successes occurring in the n trials. 2. Two outcomes, success and failure, are possible on each trial. We let x denote the number of successes occurring in the n trials. 3. The probability of a success, denoted by p, does not change from trial to trial. stationarity assumption 4. The trials are independent. 4 Binomial Probability Distribution 25 Binomial Probability Distribution 26 Binomial Probability Distribution 27 Binomial Probability Function Example: Evans Electronics Evans Electronics is concerned about a low retention rate for its employees. In recent years, management has seen a turnover of 10% of the hourly employees annually. Thus, for any hourly employee chosen at random, management estimates a probability of 0.1 that the person will not be with the company next year. Choosing 3 hourly employees at random, what is the probability that 1 of them will leave the company this year? Binomial Probability Function where: x = the number of successes p = the probability of a success on one trial 1-p = the probability of a failure on any one trial n = the number of trials f(x) = the probability of x successes in n trials Number of experimental outcomes providing exactly x successes in n trials Binomial Probability Distribution 28 Probability of a particular sequence of trial outcomes with x successes in n trials Binomial Probability Distribution 29 Example: Evans Electronics The probability of the first employee leaving and the second and third employees staying, denoted (S, F, F), is given by p(1 – p)(1 – p) With a .10 probability of an employee leaving on any one trial, the probability of an employee leaving on the first trial and not on the second and third trials is given by (.10)(.90)(.90) = (.10)(.90)2 = .081 Binomial Probability Distribution 30 Example: Evans Electronics Two other experimental outcomes also result in one success and two failures. The probabilities for all three experimental outcomes involving one success follow. Experimental Outcome Probability of Experimental Outcome (S, F, F) (F, S, F) (F, F, S) p(1 – p)(1 – p) = (.1)(.9)(.9) = .081 (1 – p)p(1 – p) = (.9)(.1)(.9) = .081 (1 – p)(1 – p)p = (.9)(.9)(.1) = .081 Total = .243 Example: Evans Electronics Let: p = .10, n = 3, x = 1 Using the probability function 5 Poisson Probability Distribution Binomial Probability Distribution 31 Using a tree diagram Example: Evans Electronics 1st Worker 2nd Worker Leaves (.1) Leaves (.1) 3rd Worker L (.1) x 3 Prob. .0010 S (.9) 2 .0090 L (.1) 2 .0090 S (.9) 1 .0810 2 .0090 Stays (.9) Leaves (.1) Stays (.9) L (.1) S (.9) L (.1) Stays (.9) S (.9) 1 .0810 1 .0810 0 .7290 32 Poisson Probability Function Where: x = the number of occurrences in an interval f(x) = the probability of x occurrences in an interval = mean number of occurrences in an interval e = 2.71828 Two Properties of a Poisson Experiment 1. The probability of an occurrence is the same for any two intervals of equal length. 2. The occurrence or non-occurrence in any It is a discrete random variable that may assume an infinite sequence of values (x = 0, 1, 2, . . . ). interval is independent of the occurrence or non-occurrence in any other interval. Poisson Probability Distribution 35 A Poisson distributed random variable is often useful in estimating the number of occurrences over a specified interval of time or space Poisson Probability Distribution 34 Poisson Probability Distribution 33 Poisson Probability Distribution 36 Poisson Probability Function Since there is no stated upper limit for the number of occurrences, the probability function f(x) is applicable for values x = 0, 1, 2, … without limit. In practical applications, x will eventually become large enough so that f(x) is approximately valueero and the probability of any larger values of x becomes negligible. Example: Mercy Hospital Patients arrive at the emergency room of Mercy Hospital at the average rate of 6 per hour on weekend evenings. What is the probability of 4 arrivals in 30 minutes on a weekend evening? 6 Poisson Probability Distribution 37 Poisson Probability Distribution 38 Example: Mercy Hospital Poisson Probability Distribution 39 Example: Mercy Hospital Poisson Probabilities A property of the Poisson distribution is that the mean and variance are equal. 0.25 Probability = 6/hour = 3/half-hour, x = 4 Using the probability function 0.20 = 2 actually, the sequence continues: 11, 12, … 0.15 0.10 0.05 0.00 0 1 2 3 4 5 6 7 8 9 10 Number of Arrivals in 30 Minutes Poisson Probability Distribution Thinking Challenge Poisson Distribution Solution: Finding * 40 Example: Mercy Hospital Variance for Number of Arrivals During 30-Minute Periods =2=3 You work in Quality Assurance for an investment firm. A clerk enters 75 words per minute with 6 errors per hour. What is the probability of 0 errors in a 255-word bond transaction? 75 words/min = (75 words/min)(60 min/hr) = 4500 words/hr 6 errors/hr = 6 errors/4500 words = .00133 errors/word In a 255-word transaction (interval): = (.00133 errors/word )(255 words) = .34 errors/255-word transaction 7 Hypergeometric Probability Distribution 43 Hypergeometric Probability Distribution 44 Hypergeometric Probability Distribution 45 Hypergeometric Probability Function Hypergeometric Probability Function The hypergeometric distribution is closely related to the binomial distribution. for 0 < x < r However, for the hypergeometric distribution: the trials are not independent, and where: x = number of successes n = number of trials f(x) = probability of x successes in n trials N = number of elements in the population r = number of elements in the population labeled success the probability of success changes from trial to trial. Hypergeometric Probability Distribution 46 Hypergeometric Probability Distribution 47 Hypergeometric Probability Function The probability function f(x) on the previous slide is usually applicable for values of x = 0, 1, 2, … n. However, only values of x where: 1) x < r and 2) n – x < N – r are valid. If these two conditions do not hold for a value of x, the corresponding f(x) equals 0. number of ways x successes can be selected from a total of r successes in the population number of ways n – x failures can be selected from a total of N – r failures in the population number of ways n elements can be selected from a population of size N Hypergeometric Probability Distribution 48 Example: Neveready’s Batteries Bob Neveready has removed two dead batteries from a flashlight and inadvertently mingled them with the two good batteries he intended as replacements. The four batteries look identical. Bob now randomly selects two of the four batteries. What is the probability he selects the two good batteries? Example: Neveready’s Batteries Using the probability function where: x = 2 = number of good batteries selected n = 2 = number of batteries selected N = 4 = number of batteries in total r = 2 = number of good batteries in total 8 Hypergeometric Probability Distribution 49 Hypergeometric Probability Distribution 50 Example: Neveready’s Batteries Mean Variance Hypergeometric Probability Distribution 51 Consider a hypergeometric distribution with n trials and let p = (r/n) denote the probability of a success on the first trial. When the population size is large, a hypergeometric distribution can be approximated by a binomial distribution with n trials and a probability of success p = (r/N). If the population size is large, the term (N – n)/(N – 1) approaches 1. The expected value and variance can be written E(x) = np and Var(x) = np(1 – p). Note that these are the expressions for the expected value and variance of a binomial distribution. continued Continuous Probability Distributions Continuous Probability Distributions 52 53 f (x) Uniform Probability Distribution Normal Probability Distribution Normal Approximation of Binomial Probabilities Exponential Probability Distribution f (x) Exponential Uniform f (x) Normal x x x Continuous Probability Distributions 54 A continuous random variable can assume any value in an interval on the real line or in a collection of intervals. It is not possible to talk about the probability of the random variable assuming a particular value. Instead, we talk about the probability of the random variable assuming a value within a given interval. f (x) The probability of the random variable assuming a value within some given interval from x1 to x2 is defined to be the area under the graph of the probability density function between x1 and x2. Uniform f (x) Exponential f (x) x1 x2 Normal x x1 x2 x x1 xx12 x2 x 9 Continuous Probability Density Function Uniform Probability Distribution Continuous Probability Density Function 57 The graphical form of the probability distribution for a continuous random variable x is a smooth curve This curve, a function of x, is denoted by the symbol f(x) and is variously called a probability density function (pdf), a frequency function, or a probability distribution. f (x) = 1/(b – a) for a < x < b =0 elsewhere The areas under a probability distribution correspond to probabilities for x. The area A beneath the curve between two points a and b is the probability that x assumes a value betweena and b. Uniform Probability Distribution 58 Expected Value of x E(x) = (a + b)/2 Variance of x Var(x) = (b - a)2/12 where: a = smallest value the variable can assume b = largest value the variable can assume Uniform Probability Distribution 59 A random variable is uniformly distributed whenever the probability is proportional to the interval’s length. The uniform probability density function is: Uniform Probability Distribution 60 Example: Slater's Buffet Slater customers are charged for the amount of salad they take. Sampling suggests that the amount of salad taken is uniformly distributed between 5 ounces and 15 ounces. Uniform Probability Density Function f(x) = 1/10 for 5 < x < 15 =0 elsewhere Where: x = salad plate filling weight 10 Uniform Probability Distribution 61 Uniform Probability Distribution 62 Expected Value of x E(x) = (a + b)/2 = (5 + 15)/2 = 10 Uniform Probability Distribution for Salad Plate Filling Weight f(x) Variance of x P(12 < x < 15) = 1/10(3) = .3 1/10 1/10 0 5 10 Salad Weight (oz.) 15 x 65 The area under the graph of f(x) and probability are identical. This is valid for all continuous random variables. The probability that x takes on a value between some lower value x1 and some higher value x2 can be found by computing the area under the graph of f(x) over the interval from x1 to x2. 0 Normal Probability Distribution Area as a Measure of Probability 64 What is the probability that a customer will take between 12 and 15 ounces of salad? f(x) Var(x) = (b - a)2/12 = (15 – 5)2/12 = 8.33 Uniform Probability Distribution 63 5 10 12 Salad Weight (oz.) x 15 Normal Probability Distribution 66 The normal probability distribution is the most important distribution for describing a continuous random variable. It is widely used in statistical inference. It has been used in a wide variety of applications including: Heights of people Rainfall amounts Test scores Scientific measurements Abraham de Moivre, a French mathematician, published The Doctrine of Chances in 1733. He derived the normal distribution. Normal Probability Density Function where: = mean = standard deviation = 3.14159 e = 2.71828 11 Normal Probability Distribution 67 Normal Probability Distribution 68 Characteristics Normal Probability Distribution 69 The distribution is symmetric; its skewness measure is zero. Characteristics The entire family of normal probability distributions is defined by its mean m and its standard deviation s . Characteristics The highest point on the normal curve is at the mean, which is also the median and mode. Standard Deviation s x Normal Probability Distribution 70 Normal Probability Distribution 71 Characteristics Characteristics The standard deviation determines the width of the curve: larger values result in wider, flatter curves. s = 15 x -10 0 Normal Probability Distribution 72 The mean can be any numerical value: negative, zero, or positive. x x Mean m s = 25 Characteristics Probabilities for the normal random variable are given by areas under the curve. The total area under the curve is 1 (.5 to the left of the mean and .5 to the right). .5 25 x .5 x 12 Normal Probability Distribution 73 Normal Probability Distribution 74 Characteristics (basis for the empirical rule) Standard Normal Probability Distribution 75 Characteristics (basis for the empirical rule) 99.72% 95.44% 68.26% 68.26% of values of a normal random variable are within of its mean. +/- 1 standard deviation Characteristics A random variable having a normal distribution with a mean of 0 and a standard deviation of 1 is said to have a standard normal probability distribution. 95.44% of values of a normal random variable are within +/- 2 standard deviations of its mean. 99.72% of values of a normal random variable are within +/- 3 standard deviations of its mean. – 3s – 1s – 2s Standard Normal Probability Distribution 76 + 3s + 1s + 2s x Standard Normal Probability Distribution 77 Characteristics The letter z is used to designate the standard normal random variable. Standard Normal Probability Distribution 78 Characteristics Converting to the Standard Normal Distribution We can think of z as a measure of the number of standard deviations x is from . Example: Pep Zone Pep Zone sells auto parts and supplies including a popular multi-grade motor oil. When the stock of this oil drops to 20 gallons, a replenishment order is placed. The store manager is concerned that sales are being lost due to stockouts while waiting for a replenishment order. z 0 13 Standard Normal Probability Distribution 79 Standard Normal Probability Distribution 80 Example: Pep Zone It has been determined that demand during replenishment lead-time is normally distributed with a mean of 15 gallons and a standard deviation of 6 gallons. The manager would like to know the probability of a stockout during replenishment lead-time. In other words, what is the probability that demand during lead-time will exceed 20 gallons? Standard Normal Probability Distribution 81 Solving for the Stockout Probability Step 1: Convert x to the standard normal distribution. z = (x - )/ = (20 - 15)/6 = .83 Step 2: Find the area under the standard normal curve to the left of z = .83. P(x > 20) = ? P(z < .83) see next slide Standard Normal Probability Distribution 82 Standard Normal Probability Distribution 83 Solving for the Stockout Probability Step 3: Compute the area under the standard normal curve to the right of z = .83. Solving for the Stockout Probability Solving for the Stockout Probability If the manager of Pep Zone wants the probability of a stockout during replenishment lead-time to be no more than .05, what should the reorder point be? ------------------------------------------------------------ (Hint: Given a probability, we can use the standard normal table in an inverse fashion to find the corresponding z value.) Area = 1 - .7967 Area = .7967 = .2033 = .2033 P(x > 20) Standard Normal Probability Distribution 84 P(z > .83) = 1 – P(z < .83) = 1- .7967 Probability of a stockout Cumulative Probability Table for the Standard Normal Distribution 0 .83 z 14 Standard Normal Probability Distribution 85 Standard Normal Probability Distribution 86 Solving for the Reorder points Standard Normal Probability Distribution 87 Solving for the Reorder points Step 1: Find the z-value that cuts off an area of .05 in the right tail of the standard normal distribution. Area = .9500 Solving for the Reorder points Step 2: Convert z.05 to the corresponding value of x. x = + z.05 (6) = 15 + 1.645(6) Area = .0500 = 24.87 or 25 0 We look up the complement of the tail area (1 - .05 = .95) z z.05 Normal Probability Distribution 89 Solving for the Reorder points Probability of a stockout during replenishment lead-time = .05 15 90 Probability of no stockout during replenishment lead-time = .95 24.87 x A reorder point of 25 gallons will place the probability of a stockout during leadtime at (slightly less than) .05. Normal Approximation of Binomial Probabilities Normal Probability Distribution 88 By raising the reorder point from 20 gallons to 25 gallons on hand, the probability of a stockout decreases from about .20 to .05. This is a significant decrease in the chance that Pep Zone will be out of stock and unable to meet a customer’s desire to make a purchase. When the number of trials, n, becomes large, evaluating the binomial probability function by hand or with a calculator is difficult. The normal probability distribution provides an easy-to-use approximation of binomial probabilities where np > 5 and n(1 - p) > 5. In the definition of the normal curve, set = np and 15 Normal Approximation of Binomial Probabilities Normal Approximation of Binomial Probabilities 91 92 Normal Approximation of Binomial Probabilities 93 Example Suppose that a company has a history of making errors in 10% of its invoices. A sample of 100 invoices has been taken, and we want to compute the probability that 12 invoices contain errors. In this case, we want to find the binomial probability of 12 successes in 100 trials. So, we set: m = np = 100(.1) = 10 = [100(.1)(.9)] ½ = 3 Add and subtract a continuity correction factor because a continuous distribution is being used to approximate a discrete distribution. For example, P(x = 12) for the discrete binomial probability distribution is approximated by P(11.5 < x < 12.5) for the continuous normal distribution. Normal Approximation to a Binomial Probability Distribution with n = 100 and p = .1 =3 P(11.5 < x < 12.5) (Probability of 12 Errors) = 10 11.5 Normal Approximation of Binomial Probabilities 94 Normal Approximation of Binomial Probabilities 95 Normal Approximation to a Binomial Probability Distribution with n = 100 and p = .1 Normal Approximation of Binomial Probabilities 96 Normal Approximation to a Binomial Probability Distribution with n = 100 and p = .1 P(x < 12.5) = .7967 10 12.5 x 12.5 The Normal Approximation to the Probability of 12 Successes in 100 Trials is .1052 P(x < 11.5) = .6915 x 10 x 11.5 P(x = 12) = .7967 - .6915 = .1052 10 11.5 12.5 x 16 Exponential Probability Distribution Exponential Probability Distribution The exponential probability distribution is useful in describing the time it takes to complete a task. The exponential random variables can be used to describe: A property of the exponential distribution is that the mean and standard deviation are equal. The exponential distribution is skewed to the right. Its skewness measure is 2. •Time between vehicle arrivals at a toll booth •Time required to complete a questionnaire •Distance between major defects in a highway Density Function for x > 0 = expected or mean where: In waiting line applications, the exponential distribution is often used for service times. Exponential Probability Distribution Exponential Probability Distribution Cumulative Probabilities where: x0 = some specific value of x e = 2.71828 Exponential Probability Distribution Example: Al’s Full-Service Pump The time between arrivals of cars at Al’s fullservice gas pump follows an exponential probability distribution with a mean time between arrivals of 3 minutes. Al would like to know the probability that the time between two successive arrivals will be 2 minutes or less. Exponential Probability Distribution Example: Al’s Full-Service Pump f(x) P(x < 2) = 1 - 2.71828-2/3 = 1 - .5134 = .4866 .4 .3 .2 .1 x 0 1 2 3 4 5 6 7 8 9 10 Time Between Successive Arrivals (mins.) 17 Relationship between the Poisson and Exponential Distributions End of Week 5 The Poisson distribution provides an appropriate description of the number of occurrences per interval The exponential distribution provides an appropriate description of the length of the interval between occurrences 18