MathGroup Archive 1995

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

Search the Archive

Re: Random[BinomialDistribution[..]] wrong ?

  • To: mathgroup at christensen.cybernetics.net
  • Subject: [mg1082] Re: Random[BinomialDistribution[..]] wrong ?
  • From: Gennady <stupakov at slac.stanford.edu>
  • Date: Sun, 14 May 1995 19:41:26 -0400
  • Organization: SLAC

In article <3opku3$7h4 at news0.cybernetics.net> Paul A. Rubin,
rubin at msu.edu writes:
>In article <3olugl$ql4 at news0.cybernetics.net>,
>   bzbkowal at ZIB-Berlin.DE (Axel Kowald) wrote:
>->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 ?
>
>I pasted your input statements into version 2.2.2 for Windows and got 
>something different (and a lot more reasonable):
>
>  {9996, 9954, 9854, 10107, 9837}
>
>If another Mac user can reproduce the problem, then I would suspect it
to 
>be a bug in the Mac kernel.
>
>Paul


I got the same result:

Out[3]=
{9996, 9954, 9854, 10107, 9837}

on my PowerMAC with Mathematica version 2.2.2. 
Gennady


  • Prev by Date: Re: Re: how can I do this functionally?
  • Next by Date: Re: How to solve system of inequalities?
  • Previous by thread: Re: Random[BinomialDistribution[..]] wrong ?
  • Next by thread: Re: Random[BinomialDistribution[..]] wrong ?