Re: [R] Standard Deviation Distribution

From: Duncan Murdoch <murdoch_at_stats.uwo.ca>
Date: Sun 18 Jun 2006 - 18:14:44 EST

davidr@rhotrading.com wrote:
> 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)
> }
>
>
Your initial factor looks a lot different from theirs. I think you believed your variable name (i.e. sig2 is sigma^2), but didn't define it that way.

Duncan Murdoch
> 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
>
> ______________________________________________
> R-help@stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
>



R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Received on Sun Jun 18 18:21:09 2006

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.1.8, at Sun 18 Jun 2006 - 22:12:09 EST.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.