help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: binomial_rnd


From: Richardson, Anthony
Subject: RE: binomial_rnd
Date: Thu, 25 Feb 2010 07:08:16 -0600

It works fine for me:
$ z = binorand(40, .5, 1000, 1);
$ mean(z)
ans = 19.944

Tony

> Dupuis [mailto:Pascal dot Dupuis at worldonline dot be] wrote:
> Subject: binomial_rnd
> 
> 
> 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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]