180 likes | 356 Views
Discrete Random Variables 2. Random Variable Numerical attribute of an experimental outcome. Probability Mass Function (PMF). Functions of Random Variables Y = 4*H 3 + 75 Y = H – E(H) Y = 1 if H = 0 0 if H >= 1. Expectation
E N D
Random Variable Numerical attribute of an experimental outcome.
Functions of Random Variables Y = 4*H3 + 75 Y = H – E(H) Y = 1 if H = 0 0 if H >= 1
Expectation Weighted average of all possible outcomes. E[x] = ∑ [ x px(x) ] Variance Measures the spread of the PMF around the expected value. or Y = (X – E(X))2 σx2 = E(Y)
Functions of Random Variables (cont) Y = 1 if h <= 1 0 if h >= 2 E(H) = 1.5 E(Y) = ? In general, for any var. X and func. g(X): if Y = g(X): E(Y) = ∑ [ g(X) px(X) ]
Bernoulli Random Variable Experiment: Toss coin once 1-p p 0.5 0.5 H T X 0 (T) 1 (H) Examples of experiments with 2 possible outcomes: - is a person healthy or sick? - do you like a song on pandora.com? - will event A occur or not? P(X=1) = p P(X=0) = 1-p
Bernoulli Random Variable (cont) p Experiment: Toss coin once PMF: 1-p X p E(X) = 0 (T) 1 (H) variance(X) = p(1-p) 1 CDF: 1-p X 0 (T) 1 (H)
Binomial Random Variable Experiment: number of tosses: 4 probability of heads: ¾ X = number of heads ¾ HHHH H ¾ H HHHT T P(X=2) ? 6 x (¾)2 x(¼)2 = 27/128 = 0.21 H ¾ HHTH H P(X=3) ? 4 x (¾)3 x(¼) = 108/256 = 0.42 T T HHTT HTHH H H H T HTHT ¾ ¼ T HTTH H T T HTTT Generalized Experiment: number of tosses: n probability of heads: p THHH H H THHT T H ¾ THTH H T ¼ T THTT T TTHH P(X = k) = ? H H TTHT T ¼ (n C k) pk (1-p)n-k T TTTH H T ¼ T TTTT ¼
Binomial Random Variable (cont) PMF: E(X) = np Variance(X) = np(1-p) k CDF: k
Geometric Random Variable Experiment: number of tosses: 3 probability of heads: ¾ X = number of tosses until you get heads P(X=3) = ? P(H1) = 48/64 P(T1 H2) = 12/64 P(T1 T2 H2) = 3/64 H1 H2 H3 P(H1) = 3/4 P(H2|T1) = 3/4 P(H2|T1 T2) = 3/4 T1 T2 T3 P(T1) = 1/4 P(T2 | T1) = 1/4 P(T3 | T1 T2) = 1/4 Generalized Experiment: number of tosses: n probability of heads: p P(X = k) = ?
Geometric Random Variable (cont) PMF: E(X) = Variance(X) = CDF:
Some thoughts What does it mean for 2 experiments to be independent? How do you derive the properties of binomial random variables from Bernoulli random variables?
Other topics: - PMFs of more than one random variable - conditional PMF