MathGroup Archive 1995

[Date Index] [Thread Index] [Author Index]

Search the Archive

Random[BinomialDistribution[..]] wrong ?


Hello

I'm using Mathematica 2.2 on a Macintosh and I got a problem generating binomially
distributed random numbers.

I have:

Needs["Statistics`DiscreteDistributions`"]
SeedRandom[17]
Table[Random[BinomialDistribution[10^6,0.01]],{5}]
Out-> {998486, 998486, 998486, 998486, 998486}

Not only that the random numbers are all the same, most importantly they are in a 
completely wrong range. One should get something around 10000 !
The problem seems to be 10^6, if I use something smaller, like 10000, everything works
fine. Furthermore the problem seems to be in the Random[] function since
PDF[BinomialDistribution[10^6,0.01],n] works okay (but takes a long time).

Any comments, hints, solutions ?

Many thanks

	Axel Kowald





  • Prev by Date: Re: Left eigenvectors?
  • Next by Date: In[1]:= Question
  • Previous by thread: Save animated graphics created using Do
  • Next by thread: Re: Random[BinomialDistribution[..]] wrong ?