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=143/12 2- http://www.solvemymath.com/online_math_calculator/statistics/continuous_distributions/uniform/param_uniform.php here which used (12-1)^2/12=121/12 all different 3 answers!!! All I am looking for is the variance of a random variable from discrete uniform distribution. Can someone clearify that for me please? Thanks. -- View this message in context: http://n4.nabble.com/variance-of-discrete-uniform-distribution-tp1585328p1585328.html Sent from the R help mailing list archive at Nabble.com.
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 (b) Between discrete and continuous distributions. Given that you understand those differences you will see that all three answers are correct. cheers, Rolf Turner> > 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=143/12 > > 2- > http://www.solvemymath.com/online_math_calculator/statistics/continuous_distributions/uniform/param_uniform.php***LOOK*** at the above. Does it or does it not contain the string ``continuous_distributions''??? And doesn't your question involve the ***discrete*** uniform distribution??? R. T.> here > which used (12-1)^2/12=121/12 > > all different 3 answers!!! > > All I am looking for is the variance of a random variable from discrete > uniform distribution. > > Can someone clearify that for me please? > > Thanks.###################################################################### Attention: This e-mail message is privileged and confidential. If you are not the intended recipient please delete the message and notify the sender. Any views or opinions presented are solely those of the author. This e-mail has been scanned and cleared by MailMarshal www.marshalsoftware.com ######################################################################
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? Thanks! -- View this message in context: http://n4.nabble.com/variance-of-discrete-uniform-distribution-tp1585328p1585355.html Sent from the R help mailing list archive at Nabble.com.