Sample Variance Calculator

Instructions: Use this Sample Variance Calculator to compute, showing all the steps the sample variance \(s^2\), using the form below:

X values (comma or space separated) =
Name of the random variable (Optional)

The Sample Variance

The sample variance \(s^2\) is one of the most common ways of measuring dispersion for a distribution. When a sample of data \(X_1, X_2, ...., X_n\) is given, the sample variance measures the dispersion of the sample values with respect to the sample mean.

How do You compute the sample variance?

More specifically, the sample variance is computed as shown in the formula below:

\[ s^2 = \displaystyle \frac{1}{n-1} \sum_{i=1}^n (X_i - \bar X)^2 \]

The above formula has the sum of squares \( \sum_{i=1}^n (X_i - \bar X)^2 \)on the top and the number of degrees of freedom \(n-1\) in the bottom.

Observe that you need to compute the sample mean \(\bar X\) first in order to use the above formula. You can compute the variance using Excel by using the =VAR() function, but the advantage of ours is that it is a variance calculator with steps. Also, notice that if you take the square root of the variance, what you get is the sample standard deviation.

A More Operational Form

People complain that in order to compute the variance they need to go and first compute the sample mean, and the after they need to compute the deviations, and all that. But, is there a way to calculate the sample variance right away, without computing the sample mean?

You bet there is. You can check below the way to compute the sample variance directly, without computing the sample mean

\[ s^2 = \displaystyle \frac{1}{n-1} \left( \sum_{i=1}^n X_i^2 - \frac{1}{n}\left(\sum_{i=1}^n X_i \right)^2 \right) \]

If instead, you want to get a step-by-step calculation of all descriptive statistics, you can try our descriptive statistics calculator .

Also, if you interested in relative dispersion, as opposed to absolute dispersion, you can use our coefficient of variation calculator , which tells you how large is the dispersion relative to the mean .

log in to your account

Don't have a membership account?
sign up

reset password

Back to
log in

sign up

Back to
log in