Random Variables 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 0, heads X = 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 0 if TTT X = 1 if HTT, THT, TTH 2 if HHT, HTH, THH 3 if 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 / 6 1 / 6 1 / 6 1 / 6 1 / 6 1 / 6
Cumulative Let F(x) = Pr{X < x} x p(x) 1 / 6 1 / 6 1 / 6 1 / 6 1 / 6 1 / 6 F(x) 1 / 6 2 / 6 3 / 6 4 / 6 5 / 6 6 / 6
Complementary Cumulative Let F(x) = 1 - F(x) = Pr{X > x} x p(x) 1 / 6 1 / 6 1 / 6 1 / 6 1 / 6 1 / 6 F(x) 1 / 6 2 / 6 3 / 6 4 / 6 5 / 6 6 / 6 F(x) 5 / 6 4 / 6 3 / 6 2 / 6 1 / 6 0 / 6
Discrete Univariate u Binomial u Discrete Uniform (Die) u Hypergeometric u Poisson u Bernoulli u Geometric u Negative Binomial
Binomial Distribution x P(x) x P(x) n=5, p=.3 n=8, p=.5 x P(x) n=4, p= x P(x) n=20, p=.5
Binomial Measures Mean : Variance: xpx x () 22 ()()xpx x = np = np(1-p)
Continuous Distribution x a b c d f(x) A 1.f(x) > 0, all x 2. 3.P(A) = Pr{a < x < b} = 4.Pr{X=a} = fxdx a d () 1 fx b c () fx a a () 0
Continuous Univariate u Normal u Uniform u Exponential u Weibull u LogNormal u Beta u T-distribution u Chi-square u F-distribution u Maxwell u Raleigh u Triangular u Generalized Gamma u H-function
Normal Distribution 65% 95% 99.7%
Std. Normal Transformation Standard Normal Z X f(z) N(0,1)
Example u Suppose a resistor has specifications of 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? x LSLUSL 100
Example Cont. x LSLUSL 100 Pr{in spec}= Pr{90 < x < 110} Pr x = Pr(-2 < z < 2)
Example Cont. x LSLUSL 100 Pr{in spec} = Pr(-2 < z < 2) = [F(2) - F(-2)] = ( ) =.9545
Example Cont. x LSLUSL 100 Pr{in spec} = Pr(-2 < z < 2) = [F(2) - F(-2)] = ( ) =.9545 Pr{out of spec} = 1 - Pr{in spec} = =
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
Example Cont. Pr{magna or summa} = Pr{X > 3.5}} = Pr(z > 1.67) = = x 3.0 Pr X
Example u Suppose we wish to relax the criteria so that 10% of the student body graduates magna or summa cum laude. x 3.0 0.1
Example u Suppose we wish to relax the criteria so that 10% of the student body graduates magna or summa cum laude. x 3.0 = Pr{Z > z} z = 1.282
Example But x 3.0 0.1 X Z x = + z = x =
Exponential Distribution fxe x () Density Cumulative Mean 1/ Variance 1/ 2 Fxe x () 1, x > Time to Fail Density =1
Exponential Distribution fxe x () Density Cumulative Mean 1/ Variance 1/ 2 Fxe x () 1, x > 0 = Time to Fail Density =2
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., x > 0, > 0 fxe x ()
Example Exponential Life Time to Fail Density a fxe x () f(x) FaXa()Pr{} edx x a 0 e xa 0
Example Exponential Life Time to Fail Density a fxe x () f(x) FaXa()Pr{} edx x a 0 e xa 0 1e a
Example fxe x () Exponential Life Time to Fail Density a f(x) FaXa()Pr{} edx x a 0 e xa 0 1e a Note: F( ) = 1-e - = 1 F(0) = 1 - e - 0 = 0
Complementary Suppose we wish to know the probability that the machine will last at least a hrs? Exponential Life Time to Fail Density a f(x) FaXa()Pr{} edx x a e a
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. Pr{X > a + c | X > c}= Pr{X > a + c X > c} / Pr{X > c} = Pr{X > a + c} / Pr{X > c} c a c+a e e e ca c a ()