[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
binomial_rnd
From: |
Dupuis |
Subject: |
binomial_rnd |
Date: |
Thu, 25 Feb 2010 03:32:31 -0800 (PST) |
Hello,
while looking at
http://en.wikipedia.org/wiki/Binomial_distribution#Mean_and_variance
it states that, for a Binomial distribution with parameters N and P,
mean = N*P
variance = N*P*(1-P)
but
z=binornd(40, .5, 1000, 1)
generates a discrete variable whose mean is far different from the expected
value of 20. Any idea ?
Regards
Pascal
--
View this message in context:
http://old.nabble.com/binomial_rnd-tp27714400p27714400.html
Sent from the Octave - General mailing list archive at Nabble.com.