How to Calculate Sample Variance Using Elementary Algebra

  • Thread starter Thread starter Abigail1997
  • Start date Start date
  • Tags Tags
    Variance
Click For Summary
SUMMARY

This discussion focuses on calculating sample variance using elementary algebra, specifically through the formula \( S^2 = \frac{1}{n-1} \sum (x_i - \bar{x})^2 \). Participants emphasize the importance of breaking down the algebraic steps, including the manipulation of sums and the application of the mean \( \bar{x} \). Key transformations involve rewriting sums in terms of the mean and recognizing that the mean is a constant during summation. The final expression derived is \( S^2 = \frac{n}{n-1} \overline{x^2} - \bar{x}^2 \).

PREREQUISITES
  • Understanding of sample variance and its formula
  • Familiarity with summation notation and properties
  • Basic knowledge of algebraic manipulation
  • Concept of mean and its calculation
NEXT STEPS
  • Study the derivation of the sample variance formula in detail
  • Learn about the properties of summation and how to manipulate them
  • Explore the concept of generalized bar notation in statistics
  • Practice problems involving variance calculations using different datasets
USEFUL FOR

Students studying statistics, educators teaching algebra and statistics, and anyone looking to deepen their understanding of variance calculations in data analysis.

Abigail1997
Messages
6
Reaction score
0
Screen Shot 2016-07-27 at 12.02.02.png
1. Homework Statement

Not sure if this is the right place to post this, but I'm really confused about what is going on here. Any sort of breakdown of the mathematical operations for each step would be incredibly helpful.

Homework Equations


The ones given in the photo, not sure how to type them out in a readable way.

The Attempt at a Solution


No clue, the answer is there but I can't make head or tail of it.
 
Physics news on Phys.org
It is a matter of carrying through the algebra. Some missing steps in the answer are: (with all sums implicitly indexed by i from 1 to n)
\sum \frac{(x_i - \bar{x})^2}{n-1} = \frac{1}{n-1}\sum (x_i^2 -2 x_i \bar{x} + \bar{x}^2) = the second form in the solution equation given that you can break apart the sums. (\sum(a+b) = \sum a + \sum b)
Now in these sums note that \bar{x} is a constant with respect to the index variable i over which you are summing. You can thus factor it out giving...
\frac{1}{n-1}\left(\sum x_i^2 -2 \bar{x}\sum x_i + \bar{x}^2\sum 1\right) or the third form in the solution equation.
(the sum of 1 over the range of the index gives you n since there are n terms.)

Now the "trick" is to realize the definition of the mean and rewrite the sum of x's in terms of their mean:
\bar{x} =\tfrac{1}{n} \sum x_i so \sum x_i = n\bar{x}
Putting this into the middle term gives you...
-2 \bar{x}\sum x_i = -2\bar{x} n\bar{x} = - 2\bar{x}^2 it becomes a like term with the third term.. You get - 2n\bar{x}^2 + n\bar{x}^2= -n\bar{x}^2

Now when I show this formula I prefer to work with generalized bar notation:
\overline{f(x)} = \tfrac{1}{n}\sum f(x_i)

Then rewrite the original formula and the alternative formula as:
S^2 = \tfrac{n}{n-1} \overline{(x-\bar{x})} = \tfrac{n}{n-1} \overline{x^2} - \bar{x}^2

I then work with means instead of sums and things make a bit more sense along the way (once you get used to the bar notation). In particular you can immediately rescale the expression to \tfrac{n-1}{n}S^2 = ...
then its a matter of using the fact that the generalized bar notation (average) is a linear operation:
\overline{(x-\bar{x})^2 } = \overline{ x^2 -2\bar{x} x + \bar{x}^2}= \overline{x^2} - 2\bar{x}\bar{x} + \bar{x}^2 = \overline{x^2} - \bar{x}^2
keeping in mind again that the mean \bar{x} is a constant.
 
  • Like
Likes   Reactions: Abigail1997
Abigail1997 said:
View attachment 103866 1. Homework Statement
Not sure if this is the right place to post this, but I'm really confused about what is going on here. Any sort of breakdown of the mathematical operations for each step would be incredibly helpful.

Homework Equations


The ones given in the photo, not sure how to type them out in a readable way.

The Attempt at a Solution


No clue, the answer is there but I can't make head or tail of it.

It is just elementary algebra: ##(a-b)^2 = a^2 - 2 a b + b^2##. Apply that to ##a = x_i##, ##b = \bar{x}##. Do that for each term ##i = 1,2, \ldots, n##, then add them up. Remember that ##\sum_{i=1}^n x_i = n \bar{x}##.
 
  • Like
Likes   Reactions: Abigail1997

Similar threads

  • · Replies 5 ·
Replies
5
Views
1K
Replies
1
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 5 ·
Replies
5
Views
2K
  • · Replies 2 ·
Replies
2
Views
3K
Replies
4
Views
1K
Replies
1
Views
19K
Replies
12
Views
2K
  • · Replies 3 ·
Replies
3
Views
2K