P(a < X <= b) = \int_a^b f(x)dx F(x) = P[X < x] = \int_{-oo}^x f(t) dt ---> f(x) = (d/dx) F(x) [ Be careful about RANGES ] Expectations: E[g(X)] = \int g(x) f(x) dx, if \int |g(x)| f(x) dx < oo Mean: E[X] = \int x f(x) dx Var: V[X] = \int (x-mu)^2 f(x) dx Independence: < wait until we look at joint distributions > const, a < x <= b Uniform Dist'n: f(x) = < ( const = 1/(b-a) ) 0, other x Mean: E[X] = (a+b)/2 Var: V[X] = (b-a)^2/12 -x^2 / 2 Std Normal Dist'n: f(x) = 1/sqrt(2 pi) e -(x-mu)^2/2 sig^2 Gen Normal Dist'n: f(x) = 1/sqrt(2 pi sig^2) e CLT: Sn-n mu S_n = X1 + X2 + ... + Xn, Var(Xn) < oo ==> P[ ------------- < z ] sqrt(n sig^2) -> Phi(z) --------------------------------- Distn with infinite mean: f(x) = 1/x^2, x>1; f(x)=0, x<1 Distn with infinite variance: f(x) = 2/x^3, x>1; f(x)=0, x<1 mu = \int_1^oo x (2/x^3) dx = \int_1^oo 2x^{-2} dx = 2 var = \int_1^oo x^2 (2/x^3) dx - 4 = \int_1^oo 1x^{-1} dx - 4 = oo ---------------------------------- Monte Carlo Integration: a) X_j ~ Unif[a,b]: I_n = ((b-a)/n) \sum g(X_j) E[ I_n ] = (b-a)/n \sum \int_a^b g(x) f(x) dx = (b-a) \int_a^b g(x) 1/(b-a) dx = \int_a^b g(x) dx V[ I_n ] = c/n -> 0 as n -> oo if c < oo b) X_j ~ f(x) : set w(x) = [1/f(x)] for every x, and: I_n = (1/n) \sum g(X_j) w(X_j) E[ I_n ] = 1/n \sum \int g(x) w(x) f(x) dx = 1/n \sum \int g(x) [1/f(x)] f(x) dx = \int g(x) dx V[ I_n ] = c/n -> 0 as n -> oo ----------------------------------- Exponential, Gamma Distributions: Ex: f(t) = lam exp( - lam t ), t > 0 Pr[ T > s+t | T > t ] = Pr[ T > s ] = exp(-lam s) Radioactive decay? Poisson Process? Survival Time? Half-life? Geometric Distribution: X = [[ T ]] -> Pr[ X=x ] = Pr[ x <= T < x+1 ] = exp(-lam x) - exp(-lam x+1) = exp(-lam x) [1-exp(-lam)] = q^x p, q = exp(-lam), p = 1-q Ga: f(x) = c t^(r-1) exp(-lam t), t > 0 [ c = lam^r/Gamma(r) ] where Gamma(r) = \int_0^oo x^{r-1} exp(-x} dx = (r-1)!, when r is an integer 1,2,... --------- Relations b/t Dist'ns: 1. Poisson - Exponential - Gamma: Usual assumptions w/ lambda fish per hour; Set T_k = time of k'th catch, N_t = # of fish caught in t hrs. N_t has Po( mu ) dist'n w/mu = lambda * t; use this to derive dist'ns of T_k via e.g. { T_1 > t } = { N_t = 0 } { T_1 <= t } = { N_t >= 1 } { T_k <= t } = { N_t >= k } w/prob \sum_k^oo P[ N_t=j ] Take derivs. to find Gamma, relate to Expo. ---------- 2. Binom - Uniform - Beta - Geometric - Neg Binom Let U.1 U.2 ... be iid Un(0,1). For fixed n, let X_p be # of U.j's <= p; Bi(n,p) dist'n. Of these let V.1 V.2 ... V.n be 1'st, 2'nd, ..., n'th smallest. P[ V.k <= p ] = Pr[ X_p >= k ] = sum_k^n P[ X_p=j ] -> pdf for V.k { Order Statistics } Let X_r be # of indices j before r'th U.i <= p; then P[ X_r = k ] = P[ r-1 S's and k F's in first k+r-1, then one S ] = (k+r-1:k) p^(r-1) q^k p k=0,1,2,... = (r*(r+1)*...*(r+k-1)/k! p^r q^k = Gamma(r+k)/[Gamma(r) k!] p^r q^k