# Sample and Population Mean and Median

The equations for calculating sample and population standard deviations are slightly different:

$s = \sqrt{ \frac{1}{n-1} \sum_{i=1}^{n} (x_i - \overline{x})^2 }$

$\sigma = \sqrt{ \frac{1}{n} \sum_{i=1}^{n} (x_i - \mu)^2 }$

So why are calculating the sample and population mean, and sample and population median, the same?

## 2 Answers

Loosely speaking the standard deviation uses 1 estimate ( the mean ) requiring 1 degree of freedom subtracted from the sample size.

The sample mean and median don't use any estimates for their respective calculation, so no requirement for a degree of freedom

Yes, the formula for sample and population standard deviations are different. The formula for calculating the population and sample mean are roughly the same in the sense that in both the cases we are diving the sum of observations by the number of observations. The only difference is the number of observations in both the cases are denoted by different terms. In case of population mean, we denote it by $N$ and in case of sample mean we denote it by $n$. Similarly, median or the $0.5^{th}$ quantile for both population and sample can be calculated using the same method or formula. The only difference will be in the results.