In the previous lesson we looked at the key statistical concepts. Here we outline the basic equations for how to calculate the key population parameters and sample statistics.

Calculation of population parameters

For a random variable, X, the population variance is calculated as follows for a population of size N:

    \begin{equation*} \sigma_X^2 = \dfrac{1}{N} \sum_{i=1}^{N} (X_i-\mu_X)^2 \end{equation*}

where \mu_X is the population mean calculated as follows:

    \begin{equation*} \mu_X=\dfrac{1}{N}\sum_{i=1}^{N} X_i \end{equation*}

and the population standard deviation is:

    \begin{equation*} \sigma_X=\sqrt{\sigma_X^2} \end{equation*}

population covariance is calculated as follows for two random variables X and Y of size N:

    \begin{equation*} \sigma_{XY}^2 = \dfrac{1}{N} \sum_{i=1}^{N} (X_i-\mu_X)(Y_i-\mu_Y) \end{equation*}

and the coefficient of correlation expressed in these terms is:

    \begin{equation*} \rho_{XY}=\dfrac{\sigma_{XY}}{\sigma_{X}\sigma_{Y}} \end{equation*}

Calculation of sample statistics

For a random sample x of size n, the sample variance is calculated as follows:

    \begin{equation*} s_x^2 = \dfrac{1}{n-1} \sum_{i=1}^{n} (x_i-\bar{x})^2 \end{equation*}

where \bar{x} is the sample mean calculated as follows:

    \begin{equation*} \bar{x}=\dfrac{1}{n}\sum_{i=1}^{n} x_i \end{equation*}

and the sample standard deviation is:

    \begin{equation*} s_x=\sqrt{s_x^2} \end{equation*}

sample covariance is calculated as follows for two random samples x and y of size n:

    \begin{equation*} s_{xy}^2 = \dfrac{1}{n-1} \sum_{i=1}^{n} (x_i-\bar{x})(y_i-\bar{y}) \end{equation*}

and the sample coefficient of correlation is:

    \begin{equation*} r_{xy}=\dfrac{s_{xy}}{s_{x}s_{y}} \end{equation*}