Discussion 9B

Random Variables

A random variable is an assignment of a number to each sample point of an experiment. 
The distribution of a (discrete) random variable XX is given by the values Pr[X=x]\Pr[X=x] for all values of xx, where Pr[X=x]=ω:X(ω)=xPr[ω]\Pr[X=x] = \sum_{\omega : X(\omega) = x} \Pr[\omega].

Bernoulli/Indicator Random Variables

XBernoulli(p)X \sim \text{Bernoulli}(p) 
Pr[X=1]=p\Pr[X=1] = p and Pr[X=0]=1p\Pr[X=0] = 1-p
Denotes outcome of a binary event (coin flips) where pp is the probability of a success

Geometric Random Variables

XGeometric(p)X \sim \text{Geometric}(p)
Pr[X=x]=(1p)x1p\Pr[X=x] = (1-p)^{x-1} p
Denotes number of independent trials until a success (number of flips until heads) where pp is the probability of a success

Binomial Random Variables

XBinomial(n,p)X \sim \text{Binomial}(n, p)
Pr[X=x]=(nx)px(1p)nx\Pr[X=x] = \binom{n}{x} p^x (1-p)^{n-x}
Denotes the number of successes in nn independent trials where pp is the probability of a success

Expectation

E[X]=xxPr[X=x]E[X] = \sum_{x} x \Pr[X=x]

Linearity of Expectation

E[X+aY]=E[X]+aE[Y]E[X + a Y] = E[X] + a E[Y]
XBernoulli(p)X \sim \text{Bernoulli}(p)
E[X]=pE[X] = p
XGeometric(p)X \sim \text{Geometric}(p)
E[X]=1pE[X] =\frac{1}{p}
XBinomial(n,p)X \sim \text{Binomial}(n, p)
E[X]=npE[X] = np