Re: [R] population variance and sample variance

2010-02-04 Thread Greg Snow
: r-help-boun...@r-project.org [mailto:r-help-boun...@r- project.org] On Behalf Of Ista Zahn Sent: Tuesday, February 02, 2010 12:03 PM To: Peng Yu Cc: r-h...@stat.math.ethz.ch Subject: Re: [R] population variance and sample variance Probably a simple typo, but just to keep things straight

Re: [R] population variance and sample variance

2010-02-04 Thread Ista Zahn
To: Peng Yu Cc: r-h...@stat.math.ethz.ch Subject: Re: [R] population variance and sample variance Probably a simple typo, but just to keep things straight: you want to divide by n when describing the standard deviation of a sample, and divide by n-1 when estimating a population standard deviation

Re: [R] population variance and sample variance

2010-02-04 Thread Gabor Grothendieck
Zahn Sent: Tuesday, February 02, 2010 12:03 PM To: Peng Yu Cc: r-h...@stat.math.ethz.ch Subject: Re: [R] population variance and sample variance Probably a simple typo, but just to keep things straight: you want to divide by n when describing the standard deviation of a sample, and divide by n

Re: [R] population variance and sample variance

2010-02-04 Thread Peng Yu
on wiki for easy access of some simple terms. -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r- project.org] On Behalf Of Ista Zahn Sent: Tuesday, February 02, 2010 12:03 PM To: Peng Yu Cc: r-h...@stat.math.ethz.ch Subject: Re: [R] population variance

Re: [R] population variance and sample variance

2010-02-04 Thread Bert Gunter
, 2010 9:59 AM To: Ista Zahn; Peng Yu Cc: r-h...@stat.math.ethz.ch Subject: Re: [R] population variance and sample variance Probably not a typo, but a different textbook used originally. Statistics is still a relatively young science, so we have not settled on a single set of notation/symbols/jargon

Re: [R] population variance and sample variance

2010-02-04 Thread Kingsford Jones
On Tue, Feb 2, 2010 at 10:25 AM, Peng Yu pengyu...@gmail.com wrote: On Mon, Oct 19, 2009 at 12:53 PM, Kingsford Jones kingsfordjo...@gmail.com wrote: sum((x-mean(x))^2)/(n) [1] 0.4894708 ((n-1)/n) * var(x) [1] 0.4894708 But this is not a built-in function in R to do so, right? No because

Re: [R] population variance and sample variance

2010-02-04 Thread Kingsford Jones
the definition is context dependent. Kingsford -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r- project.org] On Behalf Of Ista Zahn Sent: Tuesday, February 02, 2010 12:03 PM To: Peng Yu Cc: r-h...@stat.math.ethz.ch Subject: Re: [R] population variance

Re: [R] population variance and sample variance

2010-02-02 Thread Peng Yu
On Mon, Oct 19, 2009 at 12:53 PM, Kingsford Jones kingsfordjo...@gmail.com wrote: sum((x-mean(x))^2)/(n) [1] 0.4894708 ((n-1)/n) * var(x) [1] 0.4894708 But this is not a built-in function in R to do so, right? hth, Kingsford On Mon, Oct 19, 2009 at 9:30 AM, Peng Yu pengyu...@gmail.com

Re: [R] population variance and sample variance

2010-02-02 Thread Ista Zahn
Probably a simple typo, but just to keep things straight: you want to divide by n when describing the standard deviation of a sample, and divide by n-1 when estimating a population standard deviation (your initial description had it backwards I think). On Tue, Feb 2, 2010 at 5:25 PM, Peng Yu

[R] population variance and sample variance

2009-10-19 Thread Peng Yu
It seems that var() computes sample variance. It is straight forward to compute population variance from sample variance. However, I feel that it is still convenient to have a function that can compute population variance. Is there a population variance function available in R? $ Rscript var.R

Re: [R] population variance and sample variance

2009-10-19 Thread Kingsford Jones
sum((x-mean(x))^2)/(n) [1] 0.4894708 ((n-1)/n) * var(x) [1] 0.4894708 hth, Kingsford On Mon, Oct 19, 2009 at 9:30 AM, Peng Yu pengyu...@gmail.com wrote: It seems that var() computes sample variance. It is straight forward to compute population variance from sample variance. However, I feel