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
South Dakota School of Mines & Technology Introduction to Probability & Statistics Industrial Engineering Introduction to Probability & Statistics Concepts of Probability Probability Concepts S = Sample Space : the set of all possible unique outcomes of a repeatable experiment. Ex: flip of a coin S = {H,T} No. dots on top face of a die S = {1, 2, 3, 4, 5, 6} Body Temperature of a live human S = [88,108] Probability Concepts Event: a subset of outcomes from a sample space. Simple Event: one outcome; e.g. get a 3 on one throw of a die A = {3} Composite Event: get 3 or more on throw of a die A = {3, 4, 5, 6} Rules of Events Union: event consisting of all outcomes present in one or more of events making up union. Ex: A = {1, 2} B = {2, 4, 6} A B = {1, 2, 4, 6} Rules of Events Intersection: event consisting of all outcomes present in each contributing event. Ex: A = {1, 2} A B = {2} B = {2, 4, 6} Rules of Events Complement: consists of the outcomes in the sample space which are not in stipulated event Ex: A = {1, 2} S = {1, 2, 3, 4, 5, 6} A = {3, 4, 5, 6} Rules of Events Mutually Exclusive: two events are mutually exclusive if their intersection is null Ex: A = {1, 2, 3} AB={ }= B = {4, 5, 6} Probability Defined Equally Likely Events If m out of the n equally likely outcomes in an experiment pertain to event A, then p(A) = m/n Probability Defined Equally Likely Events If m out of the n equally likely outcomes in an experiment pertain to event A, then p(A) = m/n Ex: Die example has 6 equally likely outcomes: p(2) = 1/6 p(even) = 3/6 Probability Defined Suppose we have a workforce which is comprised of 6 technical people and 4 in administrative support. Probability Defined Suppose we have a workforce which is comprised of 6 technical people and 4 in administrative support. P(technical) = 6/10 P(admin) = 4/10 Rules of Probability Let A = an event defined on the event space S 1. 2. 3. 4. 0 < P(A) < 1 P(S) = 1 P( ) = 0 P(A) + P( A ) = 1 Addition Rule P(A B) = P(A) + P(B) - P(A B) A B Addition Rule P(A B) = P(A) + P(B) - P(A B) A B Example Suppose we have technical and administrative support people some of whom are male and some of whom are female. Example (cont) If we select a worker at random, compute the following probabilities: P(technical) = 18/30 Example (cont) If we select a worker at random, compute the following probabilities: P(female) = 14/30 Example (cont) If we select a worker at random, compute the following probabilities: P(technical or female) = 22/30 Example (cont) If we select a worker at random, compute the following probabilities: P(technical and female) = 10/30 Example (cont) Alternatively we can find the probability of randomly selecting a technical person or a female by use of the addition rule. P (T F ) = P (T ) + P ( F ) - P (T F ) = 18/30 + 14/30 - 10/30 = 22/30 Operational Rules Mutually Exclusive Events: P(A B) = P(A) + P(B) A B Conditional Probability Now suppose we know that event A has occurred. What is the probability of B given A? A AB P(B|A) = P(A B)/P(A) Example Returning to our workers, suppose we know we have a technical person. Example Returning to our workers, suppose we know we have a technical person. Then, P(Female | Technical) = 10/18 Example Alternatively, P(F | T) = P(F T) / P(T) = (10/30) / (18/30) = 10/18 Independent Events Two events are independent if P(A|B) = P(A) or P(B|A) = P(B) In words, the probability of A is in no way affected by the outcome of B or vice versa. Example Suppose we flip a fair coin. The possible outcomes are H T The probability of getting a head is then P(H) = 1/2 Example If the first coin is a head, what is the probability of getting a head on the second toss? H,H H,T T,H T,T P(H2|H1) = 1/2 Example Suppose we flip a fair coin twice. The possible outcomes are: H,H H,T T,H T,T P(2 heads) = P(H,H) = 1/4 Example Alternatively P(2 heads) = P(H1 H2) = P(H1)P(H2|H1) = P(H1)P(H2) = 1/2 x 1/2 = 1/4 Example Suppose we have a workforce consisting of male technical people, female technical people, male administrative support, and female administrative support. Suppose the make up is as follows Tech Admin Male 8 8 Female 10 4 Example Let M = male, F = female, T = technical, and A = administrative. Compute the following: Tech Male Female Admin 8 8 10 4 P(M T) = ? P(T|F) = ? P(M|T) = ? South Dakota School of Mines & Technology Introduction to Probability & Statistics Industrial Engineering Introduction to Probability & Statistics Counting Fundamental Rule If an action can be performed in m ways and another action can be performed in n ways, then both actions can be performed in m•n ways. Fundamental Rule Ex: A lottery game selects 3 numbers between 1 and 5 where numbers can not be selected more than once. If the game is truly random and order is not important, how many possible combinations of lottery numbers are there? Fundamental Rule Ex: A lottery game selects 3 numbers between 1 and 5 where numbers can not be selected more than once. If the game is truly random and order is not important, how many possible combinations of lottery numbers are there? 1 2 3 4 5 Fundamental Rule Ex: A lottery game selects 3 numbers between 1 and 5 where numbers can not be selected more than once. If the game is truly random and order is not important, how many possible combinations of lottery numbers are there? 1 2 3 4 5 2 3 4 5 Fundamental Rule Ex: A lottery game selects 3 numbers between 1 and 5 where numbers can not be selected more than once. If the game is truly random and order is not important, how many possible combinations of lottery numbers are there? 1 2 3 4 5 2 3 4 5 3 4 5 Fundamental Rule Ex: A lottery game selects 3 numbers between 1 and 5 where numbers can not be selected more than once. If the game is truly random and order is not important, how many possible combinations of lottery numbers are there? 1 2 3 4 5 2 3 4 5 3 4 5 LN = 5•4•3 = 60 Combinations Suppose we flip a coin 3 times, how many ways are there to get 2 heads? Combinations Suppose we flip a coin 3 times, how many ways are there to get 2 heads? Soln: List all possibilities: H,H,H H,H,T H,T,H T,H,H H,T,T H,T,H T,H,H T,T,T Combinations Of 8 possible outcomes, 3 meet criteria H,H,H H,H,T H,T,H T,H,H H,T,T H,T,H T,H,H T,T,T Combinations If we don’t care in which order these 3 occur H,H,T H,T,H T,H,H Then we can count by combination. 3! 3 2 1 3 3 C2 2 !(3 2)! 2 1 (1) Combinations Combinations nCk = the number of ways to count k items out n total items order not important. n! k Cn k !(n k )! n = total number of items k = number of items pertaining to event A Example How many ways can we select a 4 person committee from 10 students available? Example How many ways can we select a 4 person committee from 10 students available? No. Possible Committees = 10! 10 9 8 7 6! 1,260 10 C4 4! 6! 4 3 2 1 6! Example We have 20 students, 8 of whom are female and 12 of whom are male. How many committees of 5 students can be formed if we require 2 female and 3 male? Example We have 20 students, 8 of whom are female and 12 of whom are male. How many committees of 5 students can be formed if we require 2 female and 3 male? Soln: Compute how many 2 member female committees we can have and how many 3 member male committees. Each female committee can be combined with each male committee. Example 8! 12! 6,160 8 C2 12 C3 2! 6! 3! 9! Permutations Permutations is somewhat like combinations except that order is important. n! n Pk (n k )! Example How many ways can a four member committee be formed from 10 students if the first is President, second selected is Vice President, 3rd is secretary and 4th is treasurer? Example How many ways can a four member committee be formed from 10 students if the first is President, second selected is Vice President, 3rd is secretary and 4th is treasurer? 10! 5,040 10 P4 (10 4)! Example How many ways can a four member committee be formed from 10 students if the first is President, second selected is Vice President, 3rd is secretary and 4th is treasurer? 10P4 • • = 10*9*8*7 = 5,040 South Dakota School of Mines & Technology Introduction to Probability & Statistics Industrial Engineering Introduction to Probability & Statistics Random Variables Random Variables A Random Variable is a function that associates a real number with each element in a sample space. Ex: Toss of a die X = # dots on top face of die = 1, 2, 3, 4, 5, 6 Random Variables A Random Variable is a function that associates a real number with each element in a sample space. Ex: Flip of a coin X= 0 , heads 1 , tails Random Variables A Random Variable is a function that associates a real number with each element in a sample space. Ex: Flip 3 coins X= 0 1 2 3 if if if if TTT HTT, THT, TTH HHT, HTH, THH HHH Random Variables A Random Variable is a function that associates a real number with each element in a sample space. Ex: X = lifetime of a light bulb X = [0, ) Distributions Let X = number of dots on top face of a die when thrown p(x) = Prob{X=x} x p(x) 1 2 3 4 5 6 1/ 1/ 1/ 1/ 1/ 1/ 6 6 6 6 6 6 Cumulative Let F(x) = Pr{X < x} x 1 2 3 4 5 6 p(x) 1/ F(x) 1/ 2/ 3/ 4/ 5/ 6/ 6 6 6 6 6 6 1/ 1/ 1/ 1/ 1/ 6 6 6 6 6 6 Complementary Cumulative Let F(x) = 1 - F(x) = Pr{X > x} x 1 2 3 4 5 6 p(x) 1/ 1/ 1/ 1/ 1/ 1/ 6 6 6 6 6 6 F(x) 1/ 2/ 3/ 4/ 5/ 6/ 6 6 6 6 6 6 F(x) 5/ 4/ 3/ 2/ 1/ 0/ 6 6 6 6 6 6 Discrete Univariate Binomial Discrete Uniform (Die) Hypergeometric Poisson Bernoulli Geometric Negative Binomial Binomial What is the probability of getting 2 heads out of 3 flips of a coin? Binomial What is the probability of getting 2 heads out of 3 flips of a coin? Soln: H,H,H H,T,T H,H,T T,H,T H,T,H T,T,H T,H,H T,T,T Binomial P{2 heads in 3 flips} = P{H,H,T} + P{H,T,H} + P{T,H,H} = 3•P{H}P{H}P{T} = 3C2•P{H}2•P{T}3-2 = 3C2•p2•(1-p)3-2 Distributions Binomial: X = number of successes in n bernoulli trials p = Pr(success) = const. from trial to trial n = number of trials n! x n x p ( 1 p ) p(x) = b(x; n,p) = x !(n x)! Binomial Distribution n=8, p=.5 0.5 0.5 0.4 0.4 0.3 0.3 P(x) P(x) n=5, p=.3 0.2 0.1 0.2 0.1 0.0 0.0 0 1 2 3 4 5 0 1 x 4 0.4 0.3 P(x) 0.3 0.2 0.1 0.2 0.1 0.0 3 4 5 x 6 7 8 4 2 2 1 0 0.0 0 5 n=20, p=.5 0.5 0.4 P(x) 3 x n=4, p=.8 0.5 2 x Example Suppose we manufacture circuit boards with 95% reliability. If approximately 5 circuit boards in 100 are defective, what is the probability that a lot of 10 circuit boards has one or more defects? Example (soln.) Pr{X 1} 1 Pr{X 0} 10 ! 0 10 1 (.05) (.95) 0 !(10 !) = 1 - .9510 = .4013 Example For p .05 .05 .05 .01 .01 .01 n Pr{X > 1} 10 100 1,000 10 100 1,000 0.4013 0.9941 1.0000 0.0956 0.6340 1.0000 99% Defect Free Rate 500 incorrect surgical procedures every week 20,000 prescriptions filled incorrectly each year 12 babies given to the wrong parents each day 16,000 pieces of mail lost each hour 2 million documents lost by IRS each year 22,000 checks deducted from wrong accounts during next hour (Ref: Quality, March 91) Continuous Distribution f(x) A x a 1. f(x) > 0 b c , d all x d 2. f ( x)dx 1 a c 3. P(A) = Pr{a < x < b} = f ( x)dx a 4. Pr{X=a} = f ( x)dx 0 a b Continuous Univariate Normal Uniform Exponential Weibull LogNormal Beta T-distribution Chi-square F-distribution Maxwell Raleigh Triangular Generalized Gamma H-function Normal Distribution 1 f ( x) 2 F IJ G H K e 1 X 2 2 65% 95% 99.7% Scale Parameter >1 x =1 Location Parameter x >1 x =1 Std. Normal Transformation f(z) Standard Normal X Z 1 f ( z) e 2 1 z2 2 N(0,1) Example Suppose a resistor has specifications of 100 + 10 ohms. R = actual resistance of a resistor and R N(100,5). What is the probability a resistor taken at random is out of spec? LSL USL x 100 Example Cont. LSL USL x Pr{in spec} 100 = Pr{90 < x < 110} 90 100 x 110 100 Pr 5 5 = Pr(-2 < z < 2) Example Cont. LSL USL x Pr{in spec} 100 = Pr(-2 < z < 2) = [F(2) - F(-2)] = (.9773 - .0228) = .9545 Pr{out of spec} = 1 - Pr{in spec} = 1 - .9545 = 0.0455 Example Assume that the per capita income in South Dakota is normally distributed with a mean of $20,000 and a standard deviation of $4,000. If the poverty level is considered to be $15,000 per year, compute the percentage of South Dakotans who would be considered to be at or below the poverty level. Example x 15,000 20,000 Pr{poverty level} = Pr{X < 15,000} X 15,000 20,000 Pr{ } 4,000 = Pr{Z < -1.25} = 0.5 - Pr{0 < Z < 1.25} = 0.5 - 0.3944 = 0.1056 Other Continuous Distributions Exponential Distribution Density f ( x ) e Cumulative F ( x) 1 e Mean 1/ Variance 1/2 x ,x>0 x 1.0 Density =1 0.5 0.0 0 0.5 1 1.5 Time to Fail 2 2.5 3 Exponential Distribution Density f ( x ) e Cumulative F ( x) 1 e Mean 1/ Variance 1/2 x ,x>0 x 2.0 Density 1.5 =1 =2 1.0 0.5 0.0 0 0.5 1 1.5 Time to Fail 2 2.5 3 LogNormal 1 Density f ( x) Cumulative no closed form Variance 2 ,x>0 2 2 e e 2 ( e 1) 2 =0 2 1.0 f(x) Mean x 2 e 1 ln x 2 =1 0.5 0.0 0.0 1.0 2.0 3.0 4.0 x 5.0 6.0 7.0 LogNormal 1 Density f ( x) Cumulative no closed form Variance 2 ,x>0 2 2 e e 2 ( e 1) 2 =0 2 1.0 f(x) Mean x 2 e 1 ln x 2 =2 0.5 0.0 0.0 1.0 2.0 3.0 4.0 x 5.0 6.0 7.0 LogNormal 1 Density f ( x) Cumulative no closed form Variance 2 ,x>0 2 2 e e 2 ( e 1) 2 =0 2 1.0 =0.5 0.5 f(x) Mean x 2 e 1 ln x 2 0.0 0.0 1.0 2.0 3.0 4.0 -0.5 x 5.0 6.0 7.0 Gamma Density 1 x/ f ( x) x e ( ) ,x>0 Cumulative no closed form for integer Mean Variance 2 f(x) 1.0 =1 0.5 0.0 0.0 1.0 2.0 3.0 4.0 x 5.0 6.0 7.0 Gamma Density 1 x/ f ( x) x e ( ) ,x>0 no closed form for integer Mean Variance 2 f(x) Cumulative 1.0 =2 0.5 0.0 0.0 1.0 2.0 3.0 4.0 x 5.0 6.0 7.0 Gamma Density 1 x/ f ( x) x e ( ) ,x>0 Cumulative no closed form for integer Mean Variance 2 1.0 f(x) =3 0.5 0.0 0.0 1.0 2.0 3.0 4.0 x 5.0 6.0 7.0 Weibull Density f ( x) x 2 Cumulative F ( x) 1 e e ( x/ ) 2 ,x>0 ( x/ ) 2 2 Variance 1 Mean 1 2 1 1 2 2 1.5 = 1 1.0 =1 0.5 0.0 0.0 1.0 2.0 3.0 4.0 5.0 6.0 7.0 Weibull f ( x) x Density 2 Cumulative F ( x) 1 e e ( x/ ) 2 ,x>0 ( x/ ) 2 2 Variance 1 Mean 1 2 1 1 2 2 1.5 = 1 1.0 =2 0.5 0.0 0.0 1.0 2.0 3.0 4.0 5.0 6.0 7.0 Weibull f ( x) x Density 2 Cumulative F ( x) 1 e e ( x/ ) 2 ,x>0 ( x/ ) 2 2 Variance 1 Mean 1 2 1 1 2 2 1.5 = 1 =3 1.0 0.5 0.0 0.0 1.0 2.0 3.0 4.0 5.0 6.0 7.0 Uniform Density Cumulative 1 f ( x) b a x a F ( x) b a Mean (a + b)/2 Variance (b - a)2/12 , a<x<b f(x) x a b End Probability Review Session 1