Pitman MTH 135/ STA 104 Probability Week 7 Read: Pitman sections 4.1--4.3 Density Functions, CDF's * Probability Density Functions * Exponential and Gamma Distributions * CDF's Continuous Random Variables ========== 1. Introduction Recall that the "Cumuilative Distribution Function" or "CDF" is: F(x) = P[X <= x] It's defined for all -oo < x < oo, and satisfies 2 rules: a) x < y => F(x) <= F(y) [ note < and <= signs ] b) LIM (F(x): x-> -oo) = 0, LIM (F(x): x-> +oo) = 1 c) F might not be continuous, but F(x) = LIM {F(x+eps), eps>0} E.G.: Binomial, Exponential, Geometric, Normal, Uniform Call X *continuous* if CDF F(x) = P[X <= x] is a *continuous* function of x In this course every such F has a derivative f=F' at almost every x and F(x) = int{ f(t): -oo < t <= x } so for any interval A = (a,b] (or any other set A), Pr[ X in (a,b] ] = F(b) - F(a) = INT_A { f(x) dx } Notice that the "density function" (or "pdf") f satisfies: a) 0 <= f(x) for all x b) INT { f(x)dx } = 1 *) F(b) = P[X <= b] = integral [f(x): -oo < x <= b] -> f(x) = F'(x) *) f(x) need NOT be continuous; *) f(x) CAN be bigger than 1.... can even be infinite! Example: X = U^2 -> F(x) = P[X f(x) = 1/2sqrt(x) Example: Lifetime of old-fashioned radio tube: 100/x^2, x>100; 0, x<= 100 PROBLEM: a) P[X < 150] = ??? (1/3) b) P[ 2 of 5 such tubes fail in 150 hrs ] = ??? (5:2)(1/3)^2(2/3)^3=80/243 2. Expectation & Variance of a Continuous Random Variable E[g(X)] = sum{ g(x) P[X=x] } for discrete variables = int{ g(x) f(x) dx } for continuous variables In particular, the mean and variance are: mu = E[X] = int{ x f(x) dx } (if it exists!) and var = V[X] = int{ (x-mu)^2 f(x) dx } = int{ x^2 f(x) dx } - mu^2 3. The Uniform Random Variable / 1 \ | ----- | if a < x < b Uniform on range alpha < X < beta: f(x) = \ b-a / ( 0 ) if xb CDF: F(x) = 0, xb. Note: pdf f(x) is indeterminant at x=a, x=b (17? 42?), but CDF F(x) is well-defined everywhere ( F(a)=0, F(b)=1 ) Mean: mu = (a+b)/2 Var: (b-a)^2/12 5. Exponential Random Variables (consider doing hazard FIRST) f(x) = lam * e^(-lam * x) , x > 0 P[ T > x ] = exp(-lam * x), x>0 ------------------------------------------------------------------------------- P[ T <= x + eps | T > x ] = P[ x < T <= x + eps ] / P[ x < T ] = 1 - exp(-lam * (x+eps)) / exp(-lam * x) = 1 - exp(-lam * eps) = lam*eps - (lam*eps)^2/2 + ... = lam*eps + o(eps) ==> lam is *hazard* = death rate; for exponential distribution (ONLY) this is constant. 1. Hazard Rates _ Survivor function: F(t) = 1 - F(t) = P[X > t] (optimistic view...) _ Hazard: lambda(t) = f(t)/(1-F(t)) = f(t)/F(t) _ F(x) = exp(-int(0:x) lambda(t) dt) Example: lambda(t) = b*t --> F(x) = 1 - exp(-b*x^2/2), x>0 ("Rayleigh") f(x) = b * x * exp(-b*x^2/2), x>0 lambda(t) = a --> F(x) = 1 - exp(-a*x), x>0 ("Exponential") f(x) = a * exp(-a*x), x>0 6. Other Continuous Distributions 1. The Gamma Distribution: Length of time to catch t fish @ lam/hr avg rate 2. The Weibull Distribution: Lifetimes: 1-F(t) = exp(-((x-v)/alpha)^beta 3. The Cauchy Distribution: Like a normal but much flatter... no mean, var. 4. The Beta Distribution Uncertain probability 0 f_Y(y) = SUM {f_X(x)/|g'(x)| : g(x)=y} Discrete: p_Y(y) = SUM {p_X(x) : g(x)=y} Note: Jacobian only needed for continuous variables [chain rule]. ================