Example: Analyzing the number of muffins sold each day at a cafeteria, you sample six days at random and get these results: 38, 37, 36, 28, 18, 14, 12, 11, 10. 7, 9. 9. This is a sample, not a population, since you don’t have data on every single day the cafeteria was open. If you have every data point in a population, skip down to the method below instead.

s2{\displaystyle s^{2}} = ∑[(xi{\displaystyle x_{i}} - x̅)2{\displaystyle ^{2}}]/(n - 1) s2{\displaystyle s^{2}} is the variance. Variance is always measured in squared units. xi{\displaystyle x_{i}} represents a term in your data set. ∑, meaning “sum,” tells you to calculate the following terms for each value of xi{\displaystyle x_{i}}, then add them together. x̅ is the mean of the sample. n is the number of data points.

Example: First, add your data points together: 17 + 15 + 23 + 7 + 9 + 13 = 84Next, divide your answer by the number of data points, in this case six: 84 ÷ 6 = 14. Sample mean = x̅ = 14. You can think of the mean as the “center-point” of the data. If the data clusters around the mean, variance is low. If it is spread out far from the mean, variance is high. [6] X Expert Source Mario Banuelos, PhDAssistant Professor of Mathematics Expert Interview. 11 December 2021.

Example:x1{\displaystyle x_{1}} - x̅ = 17 - 14 = 3x2{\displaystyle x_{2}} - x̅ = 15 - 14 = 1x3{\displaystyle x_{3}} - x̅ = 23 - 14 = 9x4{\displaystyle x_{4}} - x̅ = 7 - 14 = -7x5{\displaystyle x_{5}} - x̅ = 9 - 14 = -5x6{\displaystyle x_{6}} - x̅ = 13 - 14 = -1 It’s easy to check your work, as your answers should add up to zero. This is due to the definition of mean, since the negative answers (distance from mean to smaller numbers) exactly cancel out the positive answers (distance from mean to larger numbers).

Example:(x1{\displaystyle x_{1}} - x̅)2=32=9{\displaystyle ^{2}=3^{2}=9}(x2{\displaystyle (x_{2}} - x̅)2=12=1{\displaystyle ^{2}=1^{2}=1}92 = 81(-7)2 = 49(-5)2 = 25(-1)2 = 1 You now have the value (xi{\displaystyle x_{i}} - x̅)2{\displaystyle ^{2}} for each data point in your sample.

Example: 9 + 1 + 81 + 49 + 25 + 1 = 166.

Example: There are six data points in the sample, so n = 6. Variance of the sample = s2=1666−1={\displaystyle s^{2}={\frac {166}{6-1}}=} 33. 2

For example, the standard deviation of the sample above = s = √33. 2 = 5. 76.

Example: There are exactly six fish tanks in a room of the aquarium. The six tanks contain the following numbers of fish:x1=5{\displaystyle x_{1}=5}x2=5{\displaystyle x_{2}=5}x3=8{\displaystyle x_{3}=8}x4=12{\displaystyle x_{4}=12}x5=15{\displaystyle x_{5}=15}x6=18{\displaystyle x_{6}=18}

σ2{\displaystyle ^{2}} = (∑(xi{\displaystyle x_{i}} - μ)2{\displaystyle ^{2}})/n σ2{\displaystyle ^{2}} = population variance. This is a lower-case sigma, squared. Variance is measured in squared units. xi{\displaystyle x_{i}} represents a term in your data set. The terms inside ∑ will be calculated for each value of xi{\displaystyle x_{i}}, then summed. μ is the population mean n is the number of data points in the population

You can think of the mean as the “average,” but be careful, as that word has multiple definitions in mathematics. Example: mean = μ = 5+5+8+12+15+186{\displaystyle {\frac {5+5+8+12+15+18}{6}}} = 10. 5

Example:x1{\displaystyle x_{1}} - μ = 5 - 10. 5 = -5. 5x2{\displaystyle x_{2}} - μ = 5 - 10. 5 = -5. 5x3{\displaystyle x_{3}} - μ = 8 - 10. 5 = -2. 5x4{\displaystyle x_{4}} - μ = 12 - 10. 5 = 1. 5x5{\displaystyle x_{5}} - μ = 15 - 10. 5 = 4. 5x6{\displaystyle x_{6}} - μ = 18 - 10. 5 = 7. 5

Example:(xi{\displaystyle x_{i}} - μ)2{\displaystyle ^{2}} for each value of i from 1 to 6:(-5. 5)2{\displaystyle ^{2}} = 30. 25(-5. 5)2{\displaystyle ^{2}} = 30. 25(-2. 5)2{\displaystyle ^{2}} = 6. 25(1. 5)2{\displaystyle ^{2}} = 2. 25(4. 5)2{\displaystyle ^{2}} = 20. 25(7. 5)2{\displaystyle ^{2}} = 56. 25

Example:Variance of the population = 30. 25+30. 25+6. 25+2. 25+20. 25+56. 256=145. 56={\displaystyle {\frac {30. 25+30. 25+6. 25+2. 25+20. 25+56. 25}{6}}={\frac {145. 5}{6}}=} 24. 25

After finding the difference from the mean and squaring, you have the value (x1{\displaystyle x_{1}} - μ)2{\displaystyle ^{2}}, (x2{\displaystyle x_{2}} - μ)2{\displaystyle ^{2}}, and so on up to (xn{\displaystyle x_{n}} - μ)2{\displaystyle ^{2}}, where xn{\displaystyle x_{n}} is the last data point in the set. To find the mean of these values, you sum them up and divide by n: ( (x1{\displaystyle x_{1}} - μ)2{\displaystyle ^{2}} + (x2{\displaystyle x_{2}} - μ)2{\displaystyle ^{2}} + . . .

  • (xn{\displaystyle x_{n}} - μ)2{\displaystyle ^{2}} ) / n After rewriting the numerator in sigma notation, you have (∑(xi{\displaystyle x_{i}} - μ)2{\displaystyle ^{2}})/n, the formula for variance.