Re: Second Opinion

• To: mathgroup at smc.vnet.net
• Subject: [mg26377] Re: [mg26373] Second Opinion
• From: Daniel Lichtblau <danl at wolfram.com>
• Date: Sat, 16 Dec 2000 02:40:09 -0500 (EST)
• References: <200012130741.CAA17254@smc.vnet.net>
• Sender: owner-wri-mathgroup at wolfram.com

```John Lai wrote:
>
> Hello all,
> I tried to calculate Poisson Distribution in a backdoor way and used
> mathematica to model it.  I could not get what I wanted.  I don't think it
> is mathematica problem and more than likely my method is flawed.  So I toss
> this out to see if some of you may spot my error.
>
> Poisson Distribution,P(n) =1-Summation [exp(-n)*(n^x)]/Factorial(x)  where x
> goes from 0 to N-1
>
> For given n and N, P(n) can be determined easily.  However, I want to
> determine N if P(n) and n are specified and I do not want to get access to
> Poisson lookup table.  My idea is to calculate P(n) with a series of n and N
> (essentially generating the tables).  Plot a surface curve whose variables
> are n, P(n) and N.  The idea was once this surface is obtained, with x-axis
> as n, y-axis as P(n) and z-axis as N, then for a given n and P(n) I can
> obtain N.
>
> I wrote a C program to generate P(n) and use mathematica to plot this
> surface.  I have 14 sets of n and in each set of n, I have 139 variables
> (i.e. N runs from 1 to 140 ), so there are 139 corresponding values of P(n)
> for each n.  When I tried to use the function Fit to estimate this surface,
> it took about ½ hr for my 500MHz desktop to calculate!  And the resultant
> expression is huge!
>
> Then, I cut down the dimension of my data set.  For each n, I generated 10
> values of N and repeated the process again.  However, no matter what
> combination of polynomial I used (x,x^-1,Exp(-x),Exp(-x^2),Exp(-x-y).), the
> resulting equation of the surface is meaningless.  It doesn't look right (at
> least I expected it to resemble some sort of Poisson or even Gaussian shape)
> and substituting P(n) and n back, I got garbage.  I have enclosed a .nb file
> for reference.  [Contact the author to obtain this file - moderator]
>
> So after all this, does it mean that my scheme of calculating Poisson
> Distribution is fundamentally wrong?
> Any suggestions are appreciated and thanks in advance.
>
> John Lai

I do not claim to have understood much of the above, but I think you may
be trying to replicate the Quantile function.

In[23]:= <<Statistics`;

In[24]:= Quantile[PoissonDistribution[1.8], .4]
Out[24]= 1

In[25]:= Quantile[PoissonDistribution[1.8], .1]
Out[25]= 0

In[26]:= Quantile[PoissonDistribution[1.8], .8]
Out[26]= 3

Daniel Lichtblau
Wolfram Research

```

• References:
• Prev by Date: Re: Bug in Package Graphics`Graphics` ?
• Next by Date: RE: Second Opinion
• Previous by thread: Second Opinion
• Next by thread: RE: Second Opinion