Re: [R] variance of discrete uniform distribution

2010-03-08 Thread Michael Erickson
On Mon, Mar 8, 2010 at 3:44 PM, casperyc wrote: > > Hi Rolf Turner , > > God, it directed to the wrong page. > > I firstly find the formula in wiki, than tried to verify the answer in R, > now, given that 143/12 ((n^2-1)/12 ) is the correct answer for a discrete > uniform random variable, > I am s

Re: [R] variance of discrete uniform distribution

2010-03-08 Thread casperyc
Hi Rolf Turner , God, it directed to the wrong page. I firstly find the formula in wiki, than tried to verify the answer in R, now, given that 143/12 ((n^2-1)/12 ) is the correct answer for a discrete uniform random variable, I am still not sure what R is calculating there? why it gives me 13?

Re: [R] variance of discrete uniform distribution

2010-03-08 Thread Rolf Turner
On 9/03/2010, at 12:13 PM, casperyc wrote: > > Hi all, > > I am REALLY confused with the variance right now. You need to learn the difference (a) Between sample variance (*estimate* of population variance) and population variance. and

[R] variance of discrete uniform distribution

2010-03-08 Thread casperyc
Hi all, I am REALLY confused with the variance right now. for a discrete uniform distribution on [1,12] the mean is (1+12)/2=6.5 which is ok. y=1:12 mean(y) then var(y) gives me 13 1- on http://en.wikipedia.org/wiki/Uniform_distribution_%28discrete%29 wiki the variance is (12^2-1)/12=