diff --git a/source/statistics/bessel_correction.rst b/source/statistics/bessel_correction.rst index 48d1df3..e24d727 100644 --- a/source/statistics/bessel_correction.rst +++ b/source/statistics/bessel_correction.rst @@ -1,4 +1,7 @@ +.. _bessel_correction: + Bessel's Correction ----------------------- -TODO +Bessel's correction is the use of :math:`n-1` instead of :math:`n` in the formula for the sample +variance and sample standard deviation. diff --git a/source/statistics/metrics.rst b/source/statistics/metrics.rst index 4c9f3e1..7cdf2e1 100644 --- a/source/statistics/metrics.rst +++ b/source/statistics/metrics.rst @@ -12,6 +12,11 @@ occurring we have: .. math:: \mathbb{E}[X]=x_1p_1+x_2p_2+\cdots+x_np_n +When working with a sample, the following is an unbiased estimator of the expected value (`source `_): + +.. math:: + \overline{x}=\frac{\sum_{i=1}^n x_i}{n} + Variance ------------------ @@ -20,6 +25,13 @@ Variance can be seen as the expected squared deviation from the expected value o .. math:: \mathbb{V}[X]=\mathbb{E}[X-\mathbb{E}[X]]^2=\frac{\sum_{i=1}^n (x_i - \mathbb{E}[X])^2}{n}=\mathrm{Cov}(X,X) +When working with a sample, the following is an unbiased estimator of the variance: + +.. math:: + s=\frac{\sum_{i=1}^n(x_i-\overline{x})^2}{n-1} + +To understand why denominator is :math:`n-1` see :ref:`Bessel's correction `. + Covariance ------------------ @@ -45,11 +57,17 @@ Standard deviation provides a way to interprete the variance using the unit of : .. math:: \sigma=\sqrt{\mathbb{V}[X]} +When working with a sample, the following is an unbiased estimator of the standard deviation: + +.. math:: + s=\sqrt{\frac{\sum_{i=1}^n(x_i-\overline{x})^2}{n-1}} + +To understand why denominator is :math:`n-1` see :ref:`Bessel's correction `. Standard Error of the Mean ----------------------------- -Standard Error of the Mean (SEM) quantifies the error that is potentially made when computing the mean. +Standard Error of the Mean (SEM) quantifies the error that is potentially made when computing the mean of a population. .. math:: \mathrm{SEM}=\sigma_X^{-}=\sqrt{\frac{\mathbb{V}[X]}{n}}=\frac{\sigma}{\sqrt{n}} @@ -79,6 +97,11 @@ Output example: Means SD: 1.27 SEM 1.26 +When working with a sample of :math:`n` individuals, an estimator of the SEM is: + +.. math:: + s_{\overline{x}}=\frac{s}{\sqrt{n}} + Degree of Freedom --------------------