# Standard Deviation & Variance Calculator

#### Including a Guide to the Concepts and Calculations

Use the calculator below to compute standard deviation for a data set.

## Calculate Standard Deviation & Variance:

Enter your data set below. Each number can be separated by a comma, space, or a new line break.
e.g. enter 10,000 as 10000

Paste in as many values as you want!

 Standard Deviation (Based on a population): - Standard Deviation (Based on a sample) - Variance (Population) - Variance (Sample) - Average - Total Numbers - Standard Error of the Mean -

Empirical rule distributions
(assumes the sampling distribution of the mean follows normal distribution)

 68% of the population is between: - 95% of the population is between: - 99.7% of the population is between: -
 68% of the sample is between: - 95% of the sample is between: - 99.7% of the sample is between: -

Confidence Interval Approximations For Population Mean
(assumes the sampling distribution of the mean follows normal distribution)

 85% confident the population mean is between: - 90% confident the population mean is between: - 95% confident the population mean is between: - 99% confident the population mean is between: -

## How to Calculate Standard Deviation

Below is an example of 6 test scores from a class to walk through an example calculation:

Test scores: 78, 88, 81, 92, 65, 58
(1)
Find the average:
\begin{align*} \frac{78+88+81+92+65+58}{6} = 77 \end{align*}
(2)
Calculate the deviations of each data point from the mean, and square the result of each
\begin{align*} (78-77)^2 = 1 \end{align*} \begin{align*} (88-77)^2 = 121\\ \end{align*} \begin{align*} (81-77)^2 = 16\\ \end{align*} \begin{align*} (92-77)^2 = 225\\ \end{align*} \begin{align*} (65-77)^2 = 144\\ \end{align*} \begin{align*} (58-77)^2 = 361\\ \end{align*}
(3)
We can compute the population variance by taking the average of these values
\begin{align*} \frac{1+121+16+225+144+361}{6} = 144.67 \end{align*}
(4)
The population standard deviation is equal to the square root of the variance
\begin{align*} \sqrt{{144.67^8}} = 12.028 \end{align*}

The above example can be condensed to the following formulas:

Population Standard Deviation
(All elements from a data set - e.g 20 out of 20 students in class)

The population standard deviation is used when the entire population can be accounted for. It is calculated by taking the square root of the variance of the data set. The following equation can be used in this scenario:

\begin{align*} σ = \sqrt{\frac{ \sum_{}(x_i-μ)^2}{6} } \end{align*}

Where,

σ = Population standard deviation

= Sum of..

xi = An individual value..

μ = Population mean

n = Number of values in the population data set

Sample Standard Deviation
(One or more elements from a data set - but not 100% of elements - e.g 100 out of 300 students taking a computer class)

Sometimes it is not possible to capture all the data from a population, so we use a sample. The sample standard deviation formula uses the sample size as "n" and then makes an adjustment to "n". This adjustment, ("n-1" below) is referred to as degrees of freedom. The version below is used in most entry level statistical courses. While it is a better estimate compared to just using the population started deviation, this version still has significant bias for small sample sizes (less than 10).

\begin{align*} s = \sqrt{\frac{\sum_{}(x_i-x̄)^2}{6} } \end{align*}

Where,

s = Sample standard deviation

= Sum of..

xi = An individual value..

x̄ = Sample mean

n = Number of values in the sample data set

## How to Interpret Standard Deviation

Standard deviation quantifies the amount of variation or dispersion of a data set. The standard deviation shows how widely the data set distributed about the mean. A smaller standard deviation indicates that more of the data is clustered about the mean. A larger one indicates the data set is more spread out.

Generally speaking, data is normally distributed. This is important as it then can be inferred that normally distributed data follows a bell shaped curve. That bell shaped curve can give us further insights.

The above graph shows the rules for normally distributed data. 68.2% of responses are within 1 deviation of the mean, 95.4% of responses are within 2 deviations of the mean, while 99.6% of the data is within 3 deviations of the mean.

Example: If a question in your survey asks for annual income, the mean could be $35,000 with a standard deviation of$5,000. From the empirical rule, we could assume that 68% of total responses fall somewhere between $30,000 and$40,000. We could also assume 95% of the data falls between $25,000 and$45,000.

This data would help ensure a successful marketing campaign. You would now be able to create a campaign specific to your largest demographic!

## How to Interpret Variance

Variance also measures the amount of variation or dispersion of a set of data values from the mean.

As mentioned, variance takes the average of all the squared differences from the mean. Standard deviation takes the square root of that number. Thus, the only difference between variance and standard deviation is the units. For example, if we took the times of 50 people running a 100-meter race, we would capture their time in seconds. When we compute the variance, we come up with units in seconds squared. Seconds squared aren't useful, so to get back to regular second units, we take the square root of the variance.

The variance takes the squares of the difference compared to the mean (as opposed to the absolute value) for two important reasons: squaring always gives a positive value and squaring emphasizes larger differences.

## Standard Error of the Mean

If you look at a sample of data that is normally distributed, the mean should be close to the population mean. But depending on the sample you took, the data might be spread out compared to the mean, and thus your sample mean might differ compared to the population mean. As in the above example, if we took the times of 50 people running a 100-meter race, we might notice the mean is 16 seconds. If you took a sample of 100 people, the mean might be 15 seconds flat. The population mean would be closer to 15 seconds, as opposed to 16 seconds.

The larger the sample, the closer your data set will be grouped near the mean.

The larger the sample, the better conclusions you can draw. In the real world it might not be possible to sample the entire population for a set of data. In that case we would need to compute an error to determine how close our sample mean is compared to the population mean. This is called the standard error of the mean, also referred to as standard error. A low standard error indicates your sample mean is close to the population mean. A high standard error indicates your sample mean is father away from the population mean.

The equation for computing the standard error is as follows:

\begin{align*} SE_{x̄} = \frac{σ}{\sqrt{n}} \end{align*}

Where,

SE = Standard Error

σ = Population Standard Deviation

n = Number of values or observations in the sample data set

Using the standard error, a confidence interval can be computed for the range for the true mean. The equation to find out the confidence interval for the mean would be:

\begin{align*} Lower \text{ }Interval \text{ } = \text{ } {x̄} - ({\text{Z} * SE_{x̄} }) \end{align*}
\begin{align*} Upper \text{ }Interval \text{ } = \text{ } {x̄} + ({\text{Z} * SE_{x̄} }) \end{align*}

Where,

x̄ = Sample mean

Z = Z-Score for your confidence level (see table below)

SE = Standard error

 Desired Confidence Interval Z-score 80% 1.28 85% 1.44 90% 1.65 95% 1.96 99% 2.58

## Survey Questions that Use Standard Deviation

Single text boxes with number, dollar, or percent validation - Useful to gather income, age, or numbers which require analysis.

Continuous Sum gives deviation for each label - Useful to gather budget data, time allocated to projects, or other numerical allocation questions requiring analysis.