       Re:PoissonDistribution

• To: mathgroup at smc.vnet.net
• Subject: [mg17043] Re:[mg16949] PoissonDistribution
• From: "Tomas Garza" <tgarza at mail.internet.com.mx>
• Date: Wed, 14 Apr 1999 02:11:55 -0400
• Sender: owner-wri-mathgroup at wolfram.com

```Bernd Kaestner [b.kaestner1 at physics.ox.ac.uk] wrote:

> I have a problem using the Statistics`DiscreteDistributions`
> package and was
> wondering if anybody sees the same strange effekt, or even better, has a
> solution to it.
>
> The following command should produce a list of 10000 poisson distributed
> numbers with mean <n>=100 :
>
> <<Statistics`DiscreteDistributions`
> poissonList=RandomArray[PoissonDistribution,10000];
>
> For a poison distribution one should have <n>=<(n-<n>)^2> which also
> Mathematica knows:
>
> In:=psList=PoissonDistribution
> Out=PoissonDistribution
>
> In:=Mean[psList]
> Out=100
>
> In:=Variance[psList]
> Out=100
>
> However, when plotting the simulated values poissonList :
>
> <<Statistics`DataManipulation`
> freq=Frequencies[poissonList]
> ListPlot[Table[{freq[[i,2]],freq[[i,1]]},{i,Length[freq]}],PlotRange->All]
>
> Mathematica cuts off the lower half of the distribution, and produces
> instead over 4000 (out of 10000) times the value 99.
>
> Just in case it makes a difference: I have an IBM ThinkPad 1400, intel
> pentium MMX 300MHz and tried it also on another pentium computer.
>
> I would be glad some of you could try this as well, or provide a solution
> for how to use this command.

Hi Bernd!

results were as expected (i.e., a list of values going from 62 to 137, and a
plot exhibiting the usual properties of a large sample). Please examine the
numerical results of the RandomArray and of Frequencies, since ListPlot has
no business changing the data provided to it for plotting. Make a direct
grouping of the data (e.g. using Count} and see if the observed frequencies
correspond to those produced by the function Frequencies. Also, use
and check if the valued obtained behave as they should. I have used all
these functions intensively without any hitch.

Good luck,

Tomas Garza
Mexico City

```

• Prev by Date: Re(2): Re: Eigenvalue Problem
• Next by Date: RE: Problems with Solve
• Previous by thread: Re: PoissonDistribution
• Next by thread: Expand Exp[a(b-c)]