given (conditional)

          P(A | B) = \frac{P(AB)}{P(B)}
        
          \begin{aligned}
          P(AB) &= P(A) \, P(B | A) \\
          &= P(A) \, P(B) ~ \text{if independent}
          \end{aligned}
        

independence

          P(A | B) = P(A)
        

if independent given C,
complements also independent

          P(AB|C) = P(A|C) \, P(B|C)
        
          P(A|BC) = P(A|C)
        

independent RVs

          P(X = a, Y = b) = P(X = a) \, P(Y = b)
        

expected value

          E[g(X)] = \int_{-\infty}^\infty g(u) \, f_X(u) \, du
        
          E[g(X, Y)] = \int\limits_{-\infty}^\infty \int\limits_{-\infty}^\infty g(u, v) \, f_{X, Y}(u, v) \, du \, dv
        
          E[aX + g(Y) + b] = aE[X] + E[g(Y)] + b
        

splitting into cases

          \begin{aligned}
          P(A) &= P(AB) + P(AB^C) \\
          &= P(A | B) \, P(B) + P(A | B^C) \, P(B^C) \\
          P(A | E) &= P(A | B E) \, P(B | E) + P(A | B^C E) \, P(B^C | E)
          \end{aligned}
        

variance

          \Var(X) = E[X^2] - E[X]^2 = E[(X - E[X])^2]
        
          \Var(aX) = a^2 \Var(X)
        
          \Var(X \pm Y) = \Var(X) + \Var(Y) \pm 2\Cov(X, Y)
        
          (aX + b) \sim N(am + b, a^2 \sigma^2)
        
          p_{aX + b}(u) = p_X \left(\frac{u - b}{a}\right)
        

covariance

          \begin{aligned}
          \Cov(X, Y) &= E[XY] - E[X] \, E[Y] \\
          &= E[(X - E[X])(Y - E[Y])]
          \end{aligned}
        
\Cov(aX + c, bY + d) = ab \Cov(X, Y)

if independent then uncorrelated:
E[XY] = E[X] \, E[Y] so \Cov(X, Y) = 0

          \rho_{X, Y} = \frac{\Cov(X, Y)}{\sigma_X \sigma_Y}
        

marginal

          f_X(u) = \int_{-\infty}^\infty f_{X,Y}(u, v) \, dv
        

math

          \binom{n}{k} = \frac{n!}{k! \, (n - k)!}
        
          \int ue^{au} = \frac{1}{a} ue^{au} - \frac{1}{a^2} e^{au}
        
          \int ue^{au^2} = \frac{1}{2a} e^{au^2}
        
          \iint f(r, \theta) \, r \, dr \, d\theta
        
\sin 2x = 2 \sin x \cos x
\cos 2x = \cos^2 x - \sin^2 x
\log A - \log B = \log \left(\frac{A}{B}\right)
n \log A = \log A^n
RV pmf/pdf mean variance

uniform (discrete)

n equally spaced rvs of probability \frac{1}{n}

binary RV

flipping a biased coin

p_X(0) = 1 - q
p_X(1) = q
q
q(1-q)

binomial

number of heads from flipping biased coin n times

            p_X(k) = \binom{n}{k} p^k (1 - p)^{n-k}
          

for k = 0, 1, \dots, n

np

poisson

              p_X(k) = \dfrac{\lambda^k e^{-\lambda}}{k!}
            

for k = 0, 1, 2, \dots

\lambda

geometric

number of biased coin flips until first head

            p_X(k) = p(1 - p)^{k - 1}
          

for k = 1, 2, 3, \dots

\frac{1}{p}

uniformly distributed on [a, b]

            f_X(u) = \begin{cases}
              \dfrac{1}{b - a} & \text{if $a < u < b$} \\
              0 & \text{else}
            \end{cases}
          
\frac{a + b}{2}
\frac{(a-b)^2}{12}

gaussian

            X \sim \N(m, \sigma^2)
          
            f_X(u) = \frac{1}{\sigma \sqrt{2\pi}} e^{-\dfrac{(u - m)^2}{2\sigma^2}}
          
m
\sigma^2

exponential

            f_X(u) = \begin{cases}
              \lambda e^{-\lambda u} & \text{if $u > 0$} \\
              0 & \text{else}
            \end{cases}
          
\frac{1}{\lambda}

leibniz

      \frac{d}{du} \int_{h(u)}^{g(u)} f(z, u) dz = f(g(u), u) \, g'(u) - f(h(u), u) \, h'(u) + \int_{h(u)}^{g(u)} \left(\frac{\partial}{\partial u} f(z, u)\right) dz
    

joint gaussian

        \begin{aligned}
          f_{X,Y}(u, v) &=
            \frac{1}{2\pi\sigma_X\sigma_Y\sqrt{1-\rho^2}} ~
            e^{\displaystyle -\frac{1}{2(1 - \rho^2)} \left(
              \left(\frac{u - m_X}{\sigma_X}\right)^2
              + \left(\frac{v - m_Y}{\sigma_Y}\right)^2
              - 2\rho\left(\frac{u - m_X}{\sigma_X}\right)\left(\frac{v - m_Y}{\sigma_Y}\right)
            \right)} \\
          &= \frac{1}{2\pi\sqrt{1-\rho^2}} ~
            e^{\displaystyle -\frac{1}{2(1 - \rho^2)}
            (u^2 + v^2 - 2\rho uv)} ~ \text{if $m_X = m_Y = 0$, $\sigma_X = \sigma_Y = 1$} \\
        \end{aligned}