My mind is being blown with a problem that for the life of me I can't understand - maths was never my strong point at school. As part of my Masters degree we are doing quantitative methods which involves statistical analysis. While reading through an example in Kellstedt and Whitten's text "The Fundamentals of Political Science Research", they provide an example about calculating the sample standard deviation for a sample regarding a president's approval ratings. 1 = favourable, 0 = neutral/unfavourable.
Somehow, as part of the formula, they got an answer of 336.8096 from part of the equation that is:
331 (1 - 0.33)squared + 673 (0 - 0.33)squared.
you then divide the answer by n - 1 (1004 - 1 = 1003) and square-root it, thus meaning the sample standard deviation is 0.58 - near bang on the majority view where 59 percent of respondents disapproved the president.
How on earth, from that part of the equation, did they get 336.8096? If anyone can answer this, I don't know what I'd give other than a cookie. I'll try and upload a picture of the equation if you need more detail - I've tried everything by playing around with the formula, calculating in different orders - heck - my room mate does maths at university and he, like me, is still convinced that the answer to that top line is 221.something (can't remember off the top of my head).