[R] Standard Deviation Distribution

davidr at rhotrading.com davidr at rhotrading.com
Thu Jun 15 16:49:04 CEST 2006


I'm having trouble with the standard deviation distribution
as shown on http://mathworld.wolfram.com/StandardDeviationDistribution.html .
(Eric Weisstein references Kenney and Keeping 1951, which I can't check.)

I believe the graphs they show, but when I code the function in R, according to the listed formula,
I get very different graphs.

Would someone please point out my error or tell me where it's already implemented in R?

Here is my version:
> sddist
function(s,n) {
sig2 <- n*s*s/(n-1)
2*(n/(2*sig2))^((n-1)/2) / gamma((n-1)/2) * exp(-n*s*s/(2*sig2)) * s^(n-2)
}

Version 2.3.1 (2006-06-01) on Windows XP SP2

Thanks for any help.

David L. Reiner
Rho Trading Securities, LLC
Chicago  IL  60605
312-362-4963



More information about the R-help mailing list