Description Usage Arguments Details Author(s) See Also Examples
Uses the method of moments to calculate the sample standard deviation.
1 | mmstdev(x)
|
x |
A number or vector of numbers |
Why would you want to do this? You wouldn't. You should use 'sd'.
This is just to document how to do it, so that the steps are available within the function definition. The steps are useful if you're trying to calculate stdev within a map reduce framework, apply a rolling standard deviation, or calculate a weighted standard deviation.
This function uses the form ( E[X] ^ 2 - E[X ^ 2] ) * (N / (N - 1))
Gene Leynes
sd
Standard deviation.
1 2 3 4 5 6 7 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.