MathGroup Archive 1999

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

Search the Archive

Re: PoissonDistribution

  • To: mathgroup at
  • Subject: [mg16990] Re: [mg16949] PoissonDistribution
  • From: BobHanlon at
  • Date: Sat, 10 Apr 1999 02:13:30 -0400
  • Sender: owner-wri-mathgroup at

In a message dated 4/8/99 1:57:53 PM, b.kaestner1 at writes:

>I have a problem using the Statistics`DiscreteDistributions` package and
>wondering if anybody sees the same strange effekt, or even better, has
>solution to it.
>The following command should produce a list of 10000 poisson distributed
>numbers with mean <n>=100 :
>For a poison distribution one should have <n>=<(n-<n>)^2> which also
>Mathematica knows:
>However, when plotting the simulated values poissonList :
>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.



Your name for your distribution is misleading. PoissonDistribution[mu] 
is not a list, it is the definition of the distribution.  

psDist = PoissonDistribution[mu];

{PDF[psDist, n], Mean[psDist], Variance[psDist]}

{(Exp[-mu]*mu^n)/n!, mu, mu}


{Mean[poissonList], Variance[poissonList]}//N



freq = Frequencies[poissonList];

I don't understand what you mean by "Mathematica cuts off the 
lower half of the distribution".  With a mean of 100 and a 
standard deviation of 10, you would not expect to see values 
below around three sigma (3*10=30) from the mean, i.e.,  below 
70.  I don't have a problem plotting using your function 
(I only used 500 data values).


However, I would recommend using a bar chart.

BarChart[freq,PlotLabel -> 
"Poisson Distribution (mu = 100)"];

To make the x-axis legible

BarChart[freq,Ticks -> {Table[{k-Min[Transpose[freq][[2]]],k}, 
				{k, 80, 120, 5}], Automatic}, 
	PlotLabel -> "Poisson Distribution (mu = 100)"];

If you bin the data, it is easier to see

freq = BinCounts[poissonList, {72.5, 132.5, 5}];
midPoints = Table[k, {k,75, 130, 5}];
BarChart[Transpose[{freq, midPoints}],  PlotLabel -> 
"Poisson Distribution (mu = 100)"];

Bob Hanlon

  • Prev by Date: Re: Multiple Axes
  • Next by Date: Re: HELP HOW TO DO...
  • Previous by thread: PoissonDistribution
  • Next by thread: Re:PoissonDistribution