Where the number of trees equals zero, the term disappears.
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.
 = )
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).
Now I take 3350.82 and divide that by the 140 and get 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)
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)