Calculate Sample Variance (s2) Step by Step
Quick answer: to calculate sample variance, find the mean, square each difference from the mean, add them and divide by n - 1. For 4, 8, 6, 5, 3 the mean is 5.2 and the sample variance is 3.7.
Advertisement
How to calculate variance of a sample
- Add the values and divide by n to get the mean.
- Subtract the mean from each value and square it.
- Add all squares.
- Divide by n - 1 (sample) or n (population).
- Square root of the variance is the standard deviation (here 1.92).
Roman Urdu: Har value ka mean se farq lein, square karein, jama karke n-1 se taqseem karein.
Calculate Sample Variance table
Quick reference values you can check your own numbers against.
| Value x | x - mean (5.2) | (x - mean) squared |
|---|---|---|
| 4 | -1.2 | 1.44 |
| 8 | 2.8 | 7.84 |
| 6 | 0.8 | 0.64 |
| 5 | -0.2 | 0.04 |
| 3 | -2.2 | 4.84 |
| Sum | 0 | 14.8 |
| Sample variance (n-1) | 3.7 | |
| Population variance (n) | 2.96 |
Sample variance divides by n - 1; population variance divides by n.
Advertisement
Sample vs population variance
Use n - 1 when your numbers are only a sample of a bigger group, for example 30 shops out of all shops. For a full list of numbers use the Variance Calculator, the Mean, Median, Mode Calculator and the calculators hub.
Official sources
Questions people ask
How do I calculate sample variance?
Sum the squared differences from the mean and divide by n - 1.
How do I calculate variance of a sample by hand?
Find the mean, square each difference, add them up and divide by n - 1.
Why divide by n - 1?
It corrects the bias that comes from estimating the mean from the same sample.
What is the sample variance of 4, 8, 6, 5, 3?
3.7, and the standard deviation is about 1.92.
How do I calculate the variance of a portfolio?
Weight each asset, then combine the variances and the covariances between assets. A single list of returns uses the sample formula above.
Advertisement