Please note, I am still in secondary school so please keep your answers simple. A question on my homework states to calculate the standard deviation from a given frequency table with several class widths and frequencies. When calculating my variance, the result turned out to be a negative number, which means that the standard deviation cannot be a realistic number as you cannot square root a negative number.
I rechecked my calculations, asked my dad, looked online, back in my book, and in several text books and followed the instructions there; and even did some other standard deviation questions, albeit with the correct result in the other questions. My question is thus, what could have happened that would cause the variance to be a negative number?
I know I cannot be much help by displaying the actual data here because of problems with formatting, but here are the column names and what I named them as:
Price (y) (£) Frequency (f) Midpoint (x) f * x (fx) fx * x (fx^2)
My method to find the variance was as follows:
1) Total up the frequency column, and store the answer in Σf
2) Multiply each number in the frequency column by its corresponding number in the midpoint column, and store each of these answers in a column called fx.
3) Multiply each number in the fx column by its corresponding number in the frequency column, and store each of these answers in a column called fx^2.
4) Total up the fx and fx^2 columns, and store the answers in Σfx and Σfx^2, respectively.
5) Find the mean by diving Σfx by Σf and storing it in x̄.
6) Find the variance by doing:
Σfx^2/Σf - (Σfx/Σf)^2
The numbers I have are:
Σf = 28
Σfx = 119250
Σfx^2 = 669750
Could anybody possibly tell me what I am doing wrong here?
Thanks in advance, Leo
Requested table, sorry, this is my best attempt at a table, apologies for bad formatting:
Price (y) (£)
500 \< x < 1000 1000 \< x < 2000 2000 \< x < 4000 4000 \< x < 6000 6000 \< x < 8000 8000 \< x < 10000
3 4 6 8 5 2