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
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 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 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% 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 0 100 0 Example Cont. LSL USL x 0 Pr{in spec} 100 0 = Pr{90 < x < 110} 90 100 x 110 100 Pr 5 5 = Pr(-2 < z < 2) Example Cont. LSL USL x 0 Pr{in spec} 100 0 = Pr(-2 < z < 2) = [F(2) - F(-2)] = (.9773 - .0228) = .9545 Pr{out of spec} = 1 - Pr{in spec} = 1 - .9545 = 0.0455 Example Suppose the distribution of student grades for university are approximately normally distributed with a mean of 3.0 and a standard deviation of 0.3. What percentage of students will graduate magna or summa cum laude? x 3.0 .5 Example Cont. x 3.0 .5 Pr{magna or summa} = Pr{X > 3.5}} Pr X 3.5 3.0 0.3 = Pr(z > 1.67) = 0.5 - 0.4525 = 0.0475 Example Suppose we wish to relax the criteria so that 10% of the student body graduates magna or summa cum laude. 0.1 x 3.0 ? Example Suppose we wish to relax the criteria so that 10% of the student body graduates magna or summa cum laude. 0.1 x 3.0 0.1 = Pr{Z > z} z = 1.282 ? Example 0.1 x 3.0 But X Z ? x = + z = 3.0 + 0.3 x 1.282 = 3.3846 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 Example Let X = lifetime of a machine where the life is governed by the exponential distribution. determine the probability that the machine fails within a given time period a. f ( x) e x , x > 0, > 0 Example Exponential Life 2.0 1.8 1.6 F ( a ) Pr{X a} a x e 0 dx e x a 0 1 e a Density f ( x) e x 1.4 1.2 f(x) 1.0 0.8 0.6 0.4 0.2 0.0 0 0.5 1 a 1.5 2 Time to Fail 2.5 3 Complementary Exponential Life 2.0 1.8 1.6 Density Suppose we wish to know the probability that the machine will last at least a hrs? 1.4 1.2 0.8 0.6 F ( a ) Pr{X a} 0.4 0.0 a e a e x f(x) 1.0 0.2 0 dx 0.5 1 a 1.5 2 Time to Fail 2.5 3 Example Suppose for the same exponential distribution, we know the probability that the machine will last at least a more hrs given that it has already lasted c hrs. a c c+a Pr{X > a + c | X > c} = Pr{X > a + c X > c} / Pr{X > c} = Pr{X > a + c} / Pr{X > c} e (ca ) a e c e