# Variance Calculator

## How to use this variance calculator?

To use this variance calculator, follow the steps that are given below.

• Enter the comma-separated values in the input box.
• Select for which data you want to calculate variance, i-e (sample or population)
• Hit the "calculate" button to get the result on the right side.

This variance finder will give you the number of samples, mean, standard deviation, and variance in one click. Using this calculator, you will get step-by-step results of standard deviation, mean, and variance.

Get Custom Built Calculator For Your Website

OR

Get Variance Calculator For Your Website

This variance finder will give you the number of samples, mean, standard deviation, and variance in one click. Using this variance calculator with steps, you will get step-by-step results of standard deviation, mean, and variance.

Variance calculator is an online free tool to calculate the variation of each number in a data set from the mean value of that data set. You can use this tool to understand and solve complex and lengthy variance problems.

## What is Variance?

In statistics, the variance of a random variable is the mean value of the squared distance from the mean. It shows the distribution of the random variable by the mean value.

A small variance indicates the distribution of the random variable close to the mean value. If the variance is greater, it shows that the random variable is far from the average value.

For example, the narrow bell curve has a small variance in the normal distribution, and the wide bell curve has a large variance.

## Variance Formula:

The population variance of a finite size N population is calculated using the following formula:

Population Variance $=\sigma^2 = \dfrac{1}{N}\displaystyle\sum_{i=1}^n (x_i - \mu)^2$

In this equation, σ2 refers to population variance, xi is the data set of population, μ is the mean of the population data set, and N refers to the size of the population data set.

The following formula is used to calculate the sample variance.

Sample Variance $=\ s^2 = \dfrac{1}{N-1} \displaystyle\sum_{i=1}^n (x_i - \bar{x})^2$

In this equation, s2 is the sample variance xi is the sample data set is the mean value of a sample set of values, and N refers to the size of the sample data set.

## Difference between population and sample:

The term "population" refers to the entire number of relevant observations. Analyzing Tokyo's residents' age, for example, would include the age of every Tokyo resident in the population.

A data sample is a collection of data from a population in statistics. The population is typically very large, making it impossible to list all the values in the population.

The solution is to collect a sample of the population and perform statistics on these samples. These samples then reflect the whole population.

## How to find the variance?

Calculating variance manually is a tedious task. You will need the mean of the data set, arithmetic difference, and many additions and subtractions to find variance.

You can also use the population variance calculator above to calculate variance for your set of data. The first example is of population variance and the second example is of sample variance.

### Example no 1:

Suppose there are exactly five guest rooms in a hotel. Every room is accommodating the following numbers of people:

$x_1 = 6, x_2 = 5, x_3 = 6, x_4 = 7, \text{and} x_5 = 4$

Find variance.

Solution:

Let's use the formula for the population variance given above.

Since there is all the information you need in a population, this formula gives you the exact population variance.

Follow these steps to measure the variance for the given data set using this formula.

• #### Find the mean of the data set

The symbol μ is the arithmetic mean when analyzing a population. To find the mean, sum up all the values in the data set and divide the sum by the total number of values in the data set.

You may think of mean as the average, but the average is considered differently in various fields.

Mean$(= M = \dfrac{\sum x}{n} = \Big({6 + 5 + 6 + 7 + 4}{5}\Big) = \dfrac{28}{5} = 5.6$

• #### Subtract the mean value from every number in data set

The near to mean data points lead to a difference nearer to zero. Repeat each data point's subtraction problem and you might begin to understand how the data are spread. It is also called arithmetic difference.

$x_1 - \mu = 6 - 5.6 = 0.4$

$x_2 - \mu = 5 - 5.6 = -0.6$

$x_3 - \mu = 6 - 5.6 = 0.4$

$x_4 - \mu = 7 - 5.6 = 1.4$

$x_5 - \mu = 4 - 5.6 = -1.6$

• #### Take the square of each arithmetic difference

Some of your numbers will be negative right now, and others will be positive. These two categories are numbers on the left of the mean and numbers on the right of the mean if your data is visualized in a number line.

For calculating variance, this is not good since both groups are mutually exclusive. Make them positive by taking the square of each value.

Get $(x_i - \mu)^2$ for each value.

$(x_i - \mu)^2$

$(0.4)^2 = 0.16$

$(-0.6)^2 = 0.36$

$(0.4)^2 = 0.16$

$(1.4)^2 = 1.96$

$(-1.6)^2 = 2.56$

• #### Find the mean value of all of these values or use formula

You now have an indirect value for each data point, related to the distance between that data point and the mean. Take the mean by adding all these values and dividing them by the number of values. Note that we have evaluated the terms which are in the formula step by step.

Variance = $\sigma^2 = \Big\{\dfrac{0.16 + 0.36 + 0.16 + 1.96 + 2.56}{5}\Big\} = \dfrac{5.2}{5} = 1.04$

### Example no 2:

The shopkeeper sold this number of apples every day for seven days: $42, 48, 30, 36, 46, 53, 62.$. Use this sample data to calculate the sample variance for the number of apples sold per day by a shopkeeper.

Let's use the formula for the sample variance given above.

• #### Write the formula for sample variance

The variance in a set of data shows how the data points are distributed. If the variance is closer to zero, it means that the points in a data set are close enough. Use the following formula to calculate sample variance when dealing with sample data sets.

We have explained all the terms in the formula above.

• #### Compute the mean value for the sample data

The mean of a sample is denoted by . Find the mean value of the sample taken from the shop by adding all values dividing it by the total number of days.

$\bar{x} = \dfrac{\sum x}{n} = \dfrac{42 + 48 + 30 + 36 + 46 + 53 + 62}{7} = \dfrac{317}{7} = 45.28$

The sample mean for the given values is 45.28 in this case. We will use this value in the next steps to complete the process. The mean can be considered as the central value of the sample data.

If the data is around the average value or the mean value, there is a minimal variation. If it is distributed far from the mean value, the variance will be high.

• #### Subtract the mean value from each number in the data set

Calculate $x_i - \bar{x}$, where xi represents the values in the data set. In our example, xi is the number of apples sold each day. Each result of this calculation will describe how far it is from the mean value of the data set.

$x_1 - \bar{x} = 42 - 45.28 = -3.8$

$x_2 - \bar{x} = 48 - 45.28 = 2.72$

$x_3 - \bar{x} = 30 - 45.28 = -15.8$

$x_4 - \bar{x} = 36 - 45.28 = -9.28$

$x_5 - \bar{x} = 46 - 45.28 = 0.72$

$x_6 - \bar{x} = 53 - 45.28 = 7.72$

$x_7 - \bar{x} = 62 - 45.28 = 16.72$

Your job is easy to check because your answers should be zero if you have these values. That is due to the concept of calculating average because the negative answers, which are the difference from average to smaller numbers, cancel precisely the positive answers.

• #### Take a square of each result from the previous step

As discussed above, the sum of all deviations will be zero because of the nature of the mean. This means that the mean deviation is always zero so that nothing tells how the results are distributed.

Find the square of each resulting deviation to resolve this problem. Making all the deviations positive will ensure that summing up will not result in zero.

$(x_1 - \bar{x})^2 = -3.8^2 = 14.44$

$(x_2 - \bar{x})^2 = 2.72^2 = 7.40$

$(x_3 - \bar{x})^2 = -15.8^2 = 249.64$

$(x_4 - \bar{x})^2 = -9.28^2 = 86.11$

$(x_5 - \bar{x})^2 = 0.72^2 = 0.52$

$(x_6 - \bar{x})^2 = 7.72^2 = 59.60$

$(x_7 - \bar{x})^2 = 16.72^2 = 279.56$

For each data point in your sample, now you have the value $(x_i - \bar{x}) 2$.

• #### Calculate the sum of all values of $(x_i - \bar{x}) 2$

In this step, we will evaluate the expression $\sum (x_i - \bar{x})^2$, which is the numerator in the formula for sample variance.

The \sum (upper case sigma) refers to the sum of the values. We have already calculated the $\sum (x_i - \bar{x})^2$ expression, now add all the values of $\sum (x_i - \bar{x})^2$ to get the sum.

$\sum (x_i - \bar{x})^2 = 14.44 + 7.40 + 249.64 + 86.11 + 0.52 + 59.60 + 279.56 = 697.27$

• #### Divide the $\dfrac{\sum (x_i - x)^2}{(n - 1)}$

There are seven values in the data set in the sample, so $n = 7$.

Variance of the sample $= s^2= \dfrac{697.27}{7 - 1} = 116.21$

Remember that because the exponent was present in the variation formula, a squared unit of original data reflects the variance.

### References:

Bhandari, P. (2020, October 12). Understanding and calculating variance | Scribbr
How to calculate variance | wikiHow
What is the Difference Between Population and Sample | Statistics Solutions
Related Calculators
Other Languages
User Ratings
• Total Reviews 0
• Overall Rating 0/5
• Stars
Reviews
No Review Yet