Hi /sci/,
Can you tell me the easiest way to calculate the standard deviation within a collection of numbers?
>>8110215
calculate the sum of the squares of every number and then subtract the square of the mean from that as many times as you have numbers.
>>8110219
Thank you!
>>8110245
forgot to add: when you've done all that you need to then take the square root
>>8110219
That's not stdev
ffs. google.com
en.wikipedia.org/wiki/Standard_deviation
Just apply this
[math]\mu = \frac {\sum (x)}{n}\\
\sigma = \sqrt {\frac {\sum \left (x^{2} \right )}{n} - \mu^{2}}[/math]
where x represents your numbers.
>>8110593
variance = (1/n)sum((x-a)^2)
(1/n)sum((x-a)^2) =? sum(x^2) - na^2
(1/n)sum(x^2 + a^2 - 2ax) =? sum(x^2) - na^2
(1/n)sum(x^2) + a^2 - (2a/n)sum(x) =? sum(x^2) - na^2
(1 - 1/n)sum(x^2) - (2a/n)sum(x) + (n+1)a^2 =? 0
So if we have two numbers A and B
(1 - 1/2)(A^2+B^2) - (2(A+B)/4)(A+B) + (2+1)(A+B)^2/4 =? 0
(1/2)(A^2+B^2) + (1/4)(A+B)^2 =? 0
3A^2 + 2AB + 3B^2 =? 0
This only has imaginary solutions, so it's wrong.
>>8110613
That's wrong also. Jesus /sci/.
[eqn]\sigma =\sqrt{ \frac{\sum(x-\mu)^2}{n}}[/eqn]
>>8110907
what an idiot
>>8110925
this
alternatively, 1/n*sum(x^2f(x))-ยต^2