#### Transcript 4.1 Mathematical Expectation

Known Probability Distributions • Engineers frequently work with data that can be modeled as one of several known probability distributions. • Being able to model the data allows us to: model real systems design predict results • Key discrete probability distributions include: binomial negative binomial hypergeometric Poisson EGR 252 - 6 1 Discrete Uniform Distribution • Simplest of all discrete distributions All possible values of the random variable have the same probability, i.e., f(x; k) = 1/ k, x = x1 , x2 , x3 , … , xk • Expectations of the discrete uniform distribution k EGR 252 - 6 k xi i 1 k and 2 ( x i )2 i 1 k 2 Binomial & Multinomial Distributions • Bernoulli Trials Inspect tires coming off the production line. Classify each as defective or not defective. Define “success” as defective. If historical data shows that 95% of all tires are defect-free, then P(“success”) = 0.05. Signals picked up at a communications site are either incoming speech signals or “noise.” Define “success” as the presence of speech. P(“success”) = P(“speech”) Administer a test drug to a group of patients with a specific condition. P(“success”) = ___________ • Bernoulli Process n repeated trials the outcome may be classified as “success” or “failure” the probability of success (p) is constant from trial to trial repeated trials are independent. EGR 252 - 6 3 Binomial Distribution • Example: Historical data indicates that 10% of all bits transmitted through a digital transmission channel are received in error. Let X = the number of bits in error in the next 4 bits transmitted. Assume that the transmission trials are independent. What is the probability that Exactly 2 of the bits are in error? At most 2 of the 4 bits are in error? more than 2 of the 4 bits are in error? • The number of successes, X, in n Bernoulli trials is called a binomial random variable. EGR 252 - 6 4 Binomial Distribution • The probability distribution is called the binomial distribution. n x nx b(x; n, p) = p q x , x = 0, 1, 2, …, n where p = _________________ q = _________________ • For our example, b(x; n, p) = _________________ EGR 252 - 6 5 For Our Example … • What is the probability that exactly 2 of the bits are in error? • At most 2 of the 4 bits are in error? EGR 252 - 6 6 Your turn … • What is the probability that more than 2 of the 4 bits are in error? EGR 252 - 6 7 Expectations of the Binomial Distribution • The mean and variance of the binomial distribution are given by μ = np σ2 = npq • Suppose, in our example, we check the next 20 bits. What are the expected number of bits in error? What is the standard deviation? μ = ___________ σ2 = __________ , EGR 252 - 6 σ = __________ 8 Another example A worn machine tool produces 1% defective parts. If we assume that parts produced are independent, what is the mean number of defective parts that would be expected if we inspect 25 parts? What is the expected variance of the 25 parts? EGR 252 - 6 9 Helpful Hints … • Sometimes it helps to draw a picture. Suppose we inspect the next 5 parts … P(at least 3) P(2 ≤ X ≤ 4) P(less than 4) • Appendix Table A.1 (pp. 661-666) lists Binomial Probability Sums, ∑rx=0b(x; n, p) EGR 252 - 6 10 Your turn … • Use Table A.1 to determine 1. b(x; 15, 0.4) , P(X ≤ 8) = ______________ 2. b(x; 15, 0.4) , P(X < 8) = ______________ 3. b(x; 12, 0.2) , P(2 ≤ X ≤ 5) = ___________ 4. b(x; 4, 0.1) , P(X > 2) = ______________ EGR 252 - 6 11 Multinomial Experiments • What if there are more than 2 possible outcomes? (e.g., acceptable, scrap, rework) • That is, suppose we have: n independent trials k outcomes that are mutually exclusive (e.g., ♠, ♣, ♥, ♦) exhaustive (i.e., ∑all kpi = 1) • Then n x1 x2 p1 p2 ... pkxk f(x1, x2, …, xk; p1, p2, …, pk, n) = x1, x2 ,..., xk EGR 252 - 6 12 Example • Look at problem 22, pg. 126 x1 = _______ p1 = _______ x2 = _______ p2 = _______ x3 = _______ p3 = _______ n = _____ f( __, __, __; ___, ___, ___, __) =_________________ = __________________________________ EGR 252 - 6 13 Hypergeometric Distribution • Example*: Automobiles arrive in a dealership in lots of 10. Five out of each 10 are inspected. For one lot, it is know that 2 out of 10 do not meet prescribed safety standards. What is probability that at least 1 out of the 5 tested from that lot will be found not meeting safety standards? *from Complete Business Statistics, 4th ed (McGraw-Hill) EGR 252 - 6 14 • This example follows a hypergeometric distribution: A random sample of size n is selected without replacement from N items. k of the N items may be classified as “successes” and N-k are “failures.” • The probability associated with getting x successes in the sample (given k successes in the lot.) k N k x n x P ( X x ) h( x; N, n, k ) N n Where, k = number of “successes” = 2 N = the lot size = 10 EGR 252 - 6 n = number in sample =5 x = number found = 1 or 2 15 Hypergeometric Distribution • In our example, P ( X x ) P ( X 1) P ( X 2) 2 10 2 2 10 2 1 5 1 2 5 2 h(1;10,5,2) h(2;10,5,2) 10 10 5 5 = _____________________________ EGR 252 - 6 16 Expectations of the Hypergeometric Distribution • The mean and variance of the hypergeometric distribution are given by nk N N n k k 2 * n * (1 ) N 1 N N • What are the expected number of cars that fail inspection in our example? What is the standard deviation? μ = ___________ σ2 = __________ , EGR 252 - 6 σ = __________ 17 Your turn … A worn machine tool produced defective parts for a period of time before the problem was discovered. Normal sampling of each lot of 20 parts involves testing 6 parts and rejecting the lot if 2 or more are defective. If a lot from the worn tool contains 3 defective parts: 1. What is the expected number of defective parts in a sample of six from the lot? 2. What is the expected variance? 3. What is the probability that the lot will be rejected? EGR 252 - 6 18 Binomial Approximation • Note, if N >> n, then we can approximate this with the binomial distribution. For example: Automobiles arrive in a dealership in lots of 100. 5 out of each 100 are inspected. 2 /10 (p=0.2) are indeed below safety standards. What is probability that at least 1 out of 5 will be found not meeting safety standards? • Recall: P(X ≥ 1) = 1 – P(X < 1) = 1 – P(X = 0) Hypergeometric distribution EGR 252 - 6 Binomial distribution (Compare to example 5.14, pg. 129) 19 Negative Binomial Distribution • Example: Historical data indicates that 30% of all bits transmitted through a digital transmission channel are received in error. An engineer is running an experiment to try to classify these errors, and will start by gathering data on the first 10 errors encountered. What is the probability that the 10th error will occur on the 25th trial? EGR 252 - 6 20 • This example follows a negative binomial distribution: Repeated independent trials. Probability of success = p and probability of failure = q = 1-p. Random variable, X, is the number of the trial on which the kth success occurs. • The probability associated with the kth success occurring on trial x is given by, x 1 k x k p q , x k, k 1, k 2,... b * ( x; k, p ) k 1 Where, k = “success number” = 10 x = trial number on which k occurs = 25 p = probability of success (error) = 0.3 q = 1 – p = 0.7 EGR 252 - 6 21 Negative Binomial Distribution • In our example, 25 1 (0.3)10 (0.7)25 10 b * (25;10,0.3) 10 1 = _____________________________ EGR 252 - 6 22 Geometric Distribution • Example: In our example, what is the probability that the 1st bit received in error will occur on the 5th trial? • This is an example of the geometric distribution, which is a special case of the negative binomial in which k = 1. The probability associated with the 1st success occurring on trial x is given by g ( x; p) pq x 1 = __________________________________ EGR 252 - 6 23 Your turn … A worn machine tool produces 1% defective parts. If we assume that parts produced are independent: 1.What is the probability that the 2nd defective part will be the 6th one produced? 2.What is the probability that the 1st defective part will be seen before 3 are produced? 3.How many parts can we expect to produce before we see the 1st defective part? (Hint: see Theorem 5.4, pg. 135) EGR 252 - 6 24 Poisson Process • The number of occurrences in a given interval or region with the following properties: “memoryless” P(occurrence) during a very short interval or small region is proportional to the size of the interval and doesn’t depend on number occurring outside the region or interval. P(X>1) in a very short interval is negligible EGR 252 - 6 25 Poisson Process • Examples: Number of bits transmitted per minute. Number of calls to customer service in an hour. Number of bacteria in a given sample. Number of hurricanes per year in a given region. EGR 252 - 6 26 Poisson Process • Example An average of 2.7 service calls per minute are received at a particular maintenance center. The calls correspond to a Poisson process. To determine personnel and equipment needs to maintain a desired level of service, the plant manager needs to be able to determine the probabilities associated with numbers of service calls. What is the probability that fewer than 2 calls will be received in any given minute? EGR 252 - 6 27 Poisson Distribution • The probability associated with the number of occurrences in a given period of time is given by, e t ( t ) x p( x; t ) , x 0,1,2,... x! Where, λ = average number of outcomes per unit time or region = 2.7 t = time interval or region = 1 minute EGR 252 - 6 28 Our Example • The probability that fewer than 2 calls will be received in any given minute is … P(X < 2) = P(X = 0) + P(X = 1) = __________________________ • The mean and variance are both λt, so μ = _____________________ • Note: Table A.2, pp. 667-669, gives Σt p(x;μ) EGR 252 - 6 29 Poisson Distribution • If more than 6 calls are received in a 3-minute period, an extra service technician will be needed to maintain the desired level of service. What is the probability of that happening? μ = λt = _____________________ P(X > 6) = 1 – P(X < 6) = _____________________ EGR 252 - 6 30 Poisson Distribution 50 Frequency 40 30 20 10 0 Calls per minute EGR 252 - 6 31 Poisson Distribution The effect of λ on the Poisson distribution 0.4 0.35 0.3 0.25 0.2 0.15 0.1 1 2 3 4 5 6 7 8 9 0.05 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 EGR 252 - 6 32