Common Probability Density functions in Statistical Tests

The following probability density functions (pdf) are commonly used in statistical hypothesis tests:

Assume $x\sim{\cal N}(\mu,\sigma^2)$ is a random variable having a normal probability density function (pdf) with mean $\mu$ and variance $\sigma^2$, both of which are unknown. We can estimate the value of $x$ by the sample mean of a set of $N$ i.i.d samples $\{x_1,\cdots,x_N\}$ drawn from this distribution:

  $\displaystyle \bar{x}=\frac{1}{N}\sum_{i=1}^N x_i \;\;\sim\;\; {\cal N}(\mu, \sigma^2/N)
$ (18)
This is also a normally distributed random variable with the same mean $\mu$ as $x$ but a different variance $\sigma^2/N$. The standard deviation $\sigma/\sqrt{N}$, called the standard error and denoted by SE, can be considered as the variability or noise. Specially when $N=1$, SE is the same as the standard deviation $\sigma$ of the original distribution, but it decrease when $N$ increases, and it approaches to zero when $N$ approaches to infinity.

We can further define another random variable $z$ by shifting $\bar{x}$ by its mean $\mu$ and scaling by its standard error $SE=\sigma/\sqrt{N}$, so that $z$ has a standard normal distribution of zero mean and unit variance:

  $\displaystyle z=\frac{\bar{x}-\mu}{\mbox{SE}}=\frac{\bar{x}-\mu}{\sigma/\sqrt{N}}
\;\;\sim\;\; {\cal N}(0,1)
$ (19)
Given $z$, called test statistic, we can carry out various statistic tests called Z-test.

If the variance $\sigma^2$ is unknown, it can be estimated by the sample variance:

  $\displaystyle S^2=\frac{1}{N-1}\sum_{i=1}^N e_i^2
=\frac{1}{N-1}\sum_{i=1}^N (x_i-\bar{x})^2
=\frac{1}{N-1}\left(\sum_{i=1}^N x_i-N\bar{x}\right)
$ (20)
This is an unbiased estimation of the variance, based on which we can further find the unbiased estimated standard error (ESE) $\mbox{ESE}=S/\sqrt{N}$. Now the random variable $z$ based on $\sigma$ can be replaced by another random variable $t$ based on $S$:
  $\displaystyle t=\frac{\bar{x}-\mu}{\mbox{ESE}}=\frac{\bar{x}-\mu}{S/\sqrt{N}}
\sim {\cal T}_\nu(t)
$ (21)
Different from $z$ with a normal distribution, $t$, as a test statistic, has a t-distribution with $\nu=N-1$ degrees of freedom.

Given $t$ as a test statistic, we can carry out various statistic tests called Student's t-test.