How to Calculate Sample Variance Using Elementary Algebra

  • Thread starter Abigail1997
  • Start date
  • Tags
    Variance
In summary: 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^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
Abigail1997
6
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
  • #2
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)
[itex] \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) = [/itex] the second form in the solution equation given that you can break apart the sums. ([itex] \sum(a+b) = \sum a + \sum b[/itex])
Now in these sums note that [itex]\bar{x}[/itex] is a constant with respect to the index variable i over which you are summing. You can thus factor it out giving...
[itex]\frac{1}{n-1}\left(\sum x_i^2 -2 \bar{x}\sum x_i + \bar{x}^2\sum 1\right) [/itex] 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:
[itex] \bar{x} =\tfrac{1}{n} \sum x_i[/itex] so [itex] \sum x_i = n\bar{x}[/itex]
Putting this into the middle term gives you...
[itex] -2 \bar{x}\sum x_i = -2\bar{x} n\bar{x} = - 2\bar{x}^2[/itex] it becomes a like term with the third term.. You get [itex] - 2n\bar{x}^2 + n\bar{x}^2= -n\bar{x}^2[/itex]

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

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

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 [itex] \tfrac{n-1}{n}S^2 = ...[/itex]
then its a matter of using the fact that the generalized bar notation (average) is a linear operation:
[tex] \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[/tex]
keeping in mind again that the mean [itex]\bar{x}[/itex] is a constant.
 
  • Like
Likes Abigail1997
  • #3
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 Abigail1997

1. What is sample variance?

Sample variance is a measurement of how spread out a set of data points are from their mean (average) value. It is calculated by taking the sum of the squared differences between each data point and the mean, divided by the total number of data points minus one.

2. How is sample variance different from population variance?

Sample variance is calculated using a subset of data points from a larger population, while population variance is calculated using all data points in the population. Sample variance is used to estimate the population variance and is typically a slightly larger value than the population variance.

3. Why is sample variance important?

Sample variance is important because it allows us to understand the variability of a dataset and make statistical inferences about the population. It is also used in many statistical tests and analyses, such as hypothesis testing and confidence interval calculations.

4. How do you interpret sample variance?

The sample variance can be interpreted as a measure of the spread or dispersion of the data points in a sample. A higher sample variance indicates a greater amount of variability in the data, while a lower sample variance indicates a more tightly clustered dataset.

5. How can you reduce sample variance?

There are a few ways to reduce sample variance, including increasing the sample size, removing outliers or influential data points, and using more precise measurement tools. Additionally, selecting a representative sample from the population can also help reduce sample variance.

Similar threads

  • Calculus and Beyond Homework Help
Replies
1
Views
1K
  • Calculus and Beyond Homework Help
Replies
1
Views
1K
  • Calculus and Beyond Homework Help
Replies
5
Views
1K
Replies
2
Views
1K
  • Calculus and Beyond Homework Help
Replies
2
Views
2K
  • Calculus and Beyond Homework Help
Replies
4
Views
1K
Replies
12
Views
2K
Replies
1
Views
18K
  • Set Theory, Logic, Probability, Statistics
Replies
6
Views
1K
  • Calculus and Beyond Homework Help
Replies
4
Views
4K
Back
Top