[R] variance of discrete uniform distribution

casperyc casperyc at hotmail.co.uk
Tue Mar 9 00:13:02 CET 2010


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.



More information about the R-help mailing list