Notes@HKU by Jax

Probability distributions

A continuous random variable has probabilities the area under its curve. Hence, P(X=n)P(X=n) for any outcome nn is 00. A discrete random variables have specific probabilities assigned to an outcome.

Operation on continous ranges

P(X<x)=P(Xx)P(X<x)=P(X\leq x)

P(X>x)=1P(X<x)P(X>x)=1 - P(X<x)

P(aXb)=P(X<b)P(X<a)P(a\leq X\leq b)=P(X<b)-P(X<a)

Operation on discrete ranges

P(X<x)=P(Xx1)P(X<x)=P(X\leq x-1)

P(X>x)=1P(Xx)P(X>x)=1-P(X\leq x)

P(aXb)=P(Xb)P(Xa1)P(a\leq X\leq b)=P(X\leq b)-P(X\leq a-1)

Probability distribution functions

A p.d.f is a continuous function that returns the probability of the given outcome. The following is an example of a p.d.f:

Xf(x)={Kx20x10otherwiseX\sim f(x) = \begin{cases} Kx^2 & 0 \leq x \leq 1 \\ 0 & \text{otherwise} \end{cases}

Using the function

P(X=x)=0P(X=x)=0

P(a<X<b)=P(aXb)=abf(x)dxP(a<X<b)=P(a\leq X\leq b)=\int_{a}^{b}f(x)dx

Note that f(x)dx=1\int_{\infty}^{-\infty}f(x)dx = 1, as the total probability of any event is 1. This condition must be true for f(x)f(x) to be a valid p.d.f. Hence for the example K=3K=3

Expected value

E(Xn)=xnf(x)dxE(X^n)=\int_{\infty}^{-\infty}x^nf(x)dx

Cumulative distribution function

To obtain a c.d.f XF(x)X'\sim F(x)where P(X=x)=P(X<x)P(X'=x) = P(X < x), all we have to do is integrate the p.d.f:

F(X)=f(x)dxF(X)=\int f(x)dx

Using our example:

F(X)={1x>1x30<x<10x<0F(X)=\begin{cases} 1 & x > 1 \\ x^3 & 0 < x < 1 \\ 0 & x < 0 \\ \end{cases}

And to convert a c.d.f back to it's p.d.f, all we have to do is differentiate F(x)F(x):

f(x)=ddxF(x)f(x)=\frac{d}{dx}F(x)

Statistical distributions

Common statistical distribution

ContinuousDiscreteDiscreteDiscreteDiscreteDiscrete
ExponentialBernoulliBinomialGeometricNegative BinomialPossion
Expo(λ)Expo(\lambda)Ber(p)Ber(p)B(n,p)B(n, p)Geo(p)Geo(p)NB(n,p)NB(n, p)Po(λ)Po(\lambda)
λeλx\lambda e^{-\lambda x}pp if true, else (1p)(1-p)(nx)px(1p)nx\binom{n}{x} p^x(1-p)^{n-x}p(1p)x1p(1-p)^{x-1}(x1n1)pn(1p)xn\binom{x-1}{n-1} p^n(1-p)^{x-n}λxx!eλ\frac{\lambda^x}{x!} e^{-\lambda}
E=λ1E=\lambda^{-1}E=pE=pE=npE=npE=1pE=\frac{1}{p}E=npE=\frac{n}{p}E=λE=\lambda
Var=λ2Var=\lambda^{-2}Var=p(1p)Var=p(1-p)Var=np(1p)Var=np(1-p)Var=1pp2Var=\frac{1-p}{p2}Var=n(1p)p2Var=\frac{n(1-p)}{p2}Var=λVar=\lambda

Usage cases

  • Ber: Outcomes only TrueTrue or FalseFalse
  • B: xx successes in nn
  • Geo: 11st success at xx tries
  • NB: nnth success at xx tries
  • Po: xx successes in interval λ\lambda

Normal distribution

The Normal distribution is given by the following formula (which you don't have to memorize):

XN(μ,σ2)=12πσ2e(xμ)22σ2,where μmean,σ2varianceX\sim N(\mu, \sigma^2)=\frac{1}{\sqrt{2\pi\sigma^2}} e^{-\frac{(x-\mu)^2}{2\sigma^2}},\quad\quad\text{where }\underbrace{\mu}_{\text{mean}},\underbrace{\sigma^2}_{\text{variance}}

To calculate P(X<x)P(X<x), we have to standardize our NN by ZN(0,1)Z\sim N(0, 1), P(X<x)=P(Z<xμσ)P(X<x)=P(Z<\frac{x-\mu}{\sigma}). Here ZZ is the standard normal variable.

Reading the Z-table

For P(Z<z)=pP(Z<z)=p, to find pp, locate the header and leftmost column in the z-table such that their sum is zz. The corresponding intersecting cell is pp.

ZpZ_p gives the value zz in P(Z<z)=pP(Z<z)=p

Critical interval

The critical interval is given by:

C.I.=[Xˉ±ZC.L.+12×σn],where C.L.Confidence level, XˉMean valueC.I.=[\bar{X}\pm Z_{\frac{C.L.+1}{2}}\times\frac{\sigma}{\sqrt{n}}],\quad\quad\text{where }\underbrace{C.L.}_{\text{Confidence level}},\ \underbrace{\bar{X}}_{\text{Mean value}}

Hence, we can derive that the critical interval width is:

2×ZC.L.+12×σn2\times Z_{\frac{C.L.+1}{2}}\times\frac{\sigma}{\sqrt{n}}

On this page