PDA

View Full Version : How do you calculate standard devidation


forester4
Dec 17, 2009, 07:07 PM
How do you determine standard deviation?

Problem: This is a sample problem right out of the book (1949 edition). My difficulty is understanding the formulas. I am having to relearn stuff that was taught in college 40 years ago. Test is Dec 21.

Tree Number
Diameter of Trees
2 2
3 3
4 6
5 7
6 9
7 13
8 10
9 16
10 12
11 12
12 9
13 9
14 8
15 9
16 3
17 0
18 2
19 2
20 1
21 2
22 0
23 1
24 2
25 1
26 0
27 0
28 0
29 0
30 1
Total 140

gnahcd
Dec 17, 2009, 08:18 PM
Learn Standard Deviation tutorial, definition, example, formula (http://easycalculation.com/statistics/learn-standard-deviation.php)

Unknown008
Dec 17, 2009, 11:10 PM
Basically, for this one, the formula is:

\sqrt{\frac{\Sigma f(x-\bar{x})^2}{\Sigma f}}

EDIT: oops, I missed a 'square' :o

forester4
Dec 17, 2009, 11:53 PM
I have the formula. It's in the book. That's easy.
The problem I have is working through the symbols.

Unknown008
Dec 18, 2009, 12:06 AM
Ok, if you want to have it the long way, without a calculator, you need to have a table with more than two columns.

Out of the table, work out the mean. That is \frac{\Sigma f(x)}{\Sigma f} which means you multiply each diameter by it's corresponding number.

That is:
{(2x2) + (3x3) + (4x6) +... + (1x30)}/(2+3+6+... +1)

Sigma is summation, f(x) is the amount multiplied by the value, and sigma f(x) means you add each f(x).
Sigma f is only the summation of all the amount.

In the third column, put all the values of f(x).

Then, you in the forth column of your table, you add as heading f(x - \bar x). X bar is the symbol for mean. In the first row of that column, you'll therefore have 4-\bar x, in the forth column, in the third one, 9-\bar x, etc.

Finally, in the 5th column, you add as heading f(x-\bar x)^2 and you square all the values you obtained from the forth column.

Now, you can use the formula to find the standard deviation. \Sigma f(x-\bar x)^2 is adding up all the values you have in the 5th column and you already know sigma f now. Try it out, and post your answer. :)

forester4
Dec 19, 2009, 10:57 AM
col 2 x col. 3 col 4
Tree Number col 1 minus squared
Diameter of Trees mean
2 2 4 -6.5357 42.72
3 3 9 -1.5357 2.36
4 6 24 13.4643 181.29
5 7 35 24.4643 598.50
6 9 54 43.4643 1889.15
7 13 91 80.4643 6474.50
8 10 80 69.4643 4825.29
9 16 144 133.4643 17812.72
10 12 120 109.4643 11982.43
11 12 132 121.4643 14753.58
12 9 108 97.4643 9499.29
13 9 117 106.4643 11334.65
14 8 112 101.4643 10295.00
15 9 135 124.4643 15491.36
16 3 48 37.4643 1403.57
17 0 0
18 2 36 25.4643 648.43
19 2 38 27.4643 754.29
20 1 20 9.4643 89.57
21 2 42 31.4643 990.00
22 0 0
23 1 23 12.4643 155.36
24 2 48 37.4643 1403.57
25 1 25 14.4643 209.22
26 0 0
27 0 0
28 0 0
29 0 0
30 1 30 19.4643 378.86
Total 140 1475 111215.70741327

ARITHMETIC MEAN = 1475/140 = 10.5357

Why doesn't the "111215" look right?

forester4
Dec 19, 2009, 11:03 AM
column 1 column 2 column 3 column4 column 5
col 2 x col. 3 col 4
Tree Number col 1 minus squared
Diameter of Trees mean
2 2 4 -7 43
3 3 9 -2 2
4 6 24 13 181
5 7 35 24 599
6 9 54 43 1889
7 13 91 80 6475
8 10 80 69 4825
9 16 144 133 17813
10 12 120 109 11982
11 12 132 121 14754
12 9 108 97 9499
13 9 117 106 11335
14 8 112 101 10295
15 9 135 124 15491
16 3 48 37 1404
17 0 0
18 2 36 25 648
19 2 38 27 754
20 1 20 9 90
21 2 42 31 990
22 0 0
23 1 23 12 155
24 2 48 37 1404
25 1 25 14 209
26 0 0
27 0 0
28 0 0
29 0 0
30 1 30 19 379
Total 140 1475 111216

ARITHMETIC MEAN = 1475/140 = 10.5357


I tried to clean this up a little from the previous post.

Perito
Dec 19, 2009, 11:15 AM
Basically, for this one, the formula is:

\sqrt{\frac{\Sigma f(x-\bar{x})^2}{\Sigma f}}



I didn't go over your response, and you probably did it right. But, since you seem to be confused, look at it this way. Don't get confused by the tree diameter and the number of trees. Basically, all you're doing is averaging trees:

Let's do it just for the two-foot, the three-foot and the four-foot trees.

You have two 2-foot trees, so think "two 2s". You have three 3-foot trees, so think "three 3s". You have six four-foot trees so think "six 4s".

So, 2 x 2 + 3 x 3 + 6 x 4 = 37. But that's 11 trees.

The average of these 11 trees is 37/11 = 3.36 feet/tree

The standard deviation is given by Unknown008's formula. For \bar{x}, you use the average you calculated (3.36). For "x", you'll use the list of tree diameters. You perform one calculation for each TREE. Finally, for Sigma-f, you use the total number of trees that you have. In this example, you use 11. You'll sum this (just for the 2, 3, and 4 foot trees:

(2 - 3.36)^2 + (2-3.36)^2 + (3 - 3.36)^2 + (3-3.36)^2 + (3-3.36)^2 + (4-3.36)^2 + (4-3.36)^2 + (4-3.36)^2 + (4-3.36)^2 + (4-3.36)^2 + (4-3.36)^2 + (4-3.36)^2

or we can simplify this (that's why you have the number of trees of each diameter)

2\,(2 - 3.36)^2 + 3\, (3 - 3.36)^2 + 6\, (4-3.36)^2

When you're all finished with that, you divide the sum by 11, \left( \Sigma f \right), and then take the square root of the whole shebang.

forester4
Dec 19, 2009, 12:45 PM
OK, on the first line:

diameter of trees x((number of trees - arithmetic mean)squared) =

2 x ((2 - 10.53)squared = -73.1

when all the lines are added together
they equal 1601.8
That number includes 6 lines where the number of trees = 0 (the answer on those lines is 111.3)
1601.8 divided by 140 = 11.44
sqare root of 11.44 is 3.38

From the text book:
S = Sigma(X - Xbar)squared /(n-1)
S squared = 3326.89/139
= 23.9345
= 4.89
where S = standard deviation

So who's wrong?

Perito
Dec 19, 2009, 01:28 PM
Where the number of trees equals zero, the term disappears.

n \, \times \, (x - \bar{x}) = 0\, when\, n=0

Your first column is the diameter of the trees, not the number. It wouldn't be laid out that way (sequential incrementing of values) if it were.

Your average is 10.53. I'll assume that's correct without checking it. You also added up 140 trees. I'll assume that's accurate, without checking, also.

n \, \times \, (x - \bar{x}^2) =
2 x (2-10.53)^2 = 145.69
3 x (3-10.53)^2 = 170.33
6 x (4-10.53)^2 = 256.24
7 x (5-10.53)^2 = 214.45
9 x (6-10.53)^2 = 185.10
13 x (7-10.53)^2 = 162.45
10 x (8-10.53)^2 = 64.26
16 x (9-10.53)^2 = 37.70
12 x (10-10.53)^2 = 3.43
12 x (11-10.53)^2 = 2.59
9 x (12-10.53)^2 = 19.32
9 x (13-10.53)^2 = 54.69
8 x (14-10.53)^2 = 96.05
9 x (15-10.53)^2 = 179.43
3 x (16-10.53)^2 = 89.60
0 x (17-10.53)^2 = 0
2 x (18-10.53)^2 = 111.45
2 x (19-10.53)^2 = 143.31
1 x (20-10.53)^2 = 89.59
2 x (21-10.53)^2 = 219.03
0 x (22-10.53)^2 = 0
1 x (23-10.53)^2 = 155.38
2 x (24-10.53)^2 = 362.61
1 x (25-10.53)^2 = 209.24
0 x (26-10.53)^2 = 0
0 x (27-10.53)^2 = 0
0 x (28-10.53)^2 = 0
0 x (29-10.53)^2 = 0
1 x (30-10.53)^2 = 378.89

Adding all of the values, I get (if I didn't mistype something in my calculator) 3350.82
(I didn't round anything off before adding them together. It was easier that way).

\sum_{n=1}^{30} \left( n \, \times \, (x - \bar{x}^2) \right) = 3350.82

Now I take 3350.82 and divide that by the 140 and get 23.93.

\sum_{n=1}^{30} \left (\frac {n \, (x - \bar{x}^2)}{N} \right) = 23.93

where N is the total number of samples.

Finally, I take the square root of 23.93 and get the standard deviation (4.89)

\sqrt {\sum_{n=1}^{30} \left (\frac {n \, (x - \bar{x}^2)}{N} \right)} = 4.89

So, the average diameter is 10.53 ± 4.89.
Since the diameters are only given to the nearest foot,
it would be better to round off to the nearest foot and write it as 11 ± 5 feet.

In some formula for standard deviation, they indicate to use N-1.
In that case, we get ±4.91 which isn't very different.
That's because we have lots of samples.
Remember that this is just an estimate of the true standard deviation
(theoretically, in an infinite population, our estimate of the mean might be in error.
We're only calculating the mean of a finite sample)

Unknown008
Dec 20, 2009, 09:06 AM
Thanks Perito. Had to spread the rep... :(

Yes, the answer is indeed 4.892...

Sorry forester, I was not very well the day I posted my second post in this thread :o
The forth column is x-\bar x, hence, you have to put 2-10.53, then 3-10.53, then 4-10.53, etc.

Then the 5th column, you multiply f by the value in the 4th column to the square.

Sorry again for the confusion. I'm myself not quite used to statistics fully yet. I prefer using my calculator for these :o