3
$\begingroup$

I'm writing a program in which, in any given time step, a random number of messages is sent. The number of messages is always between $0$ and $n$. I want to be able to control the probability, so that I can cause more or fewer messages to be most probable.

It would be natural to model this with a Poisson distribution. We can think of the messages as generated by people who decide to talk at different moments within the time step. By changing the mean $\lambda$ of the Poisson distribution, I'm able to move the peak of the curve to lower or higher integers.

However, a Poisson distribution assigns a probability to every integer $\ge 0$, and in my model, integers $>n$ should have zero probability. At present, I'm using a Poisson distribution to generate random numbers of messages, with the additional rule that I return $n$ when the number returned by the Poisson function is $>n$. This is OK when $\lambda$ is small, but when $\lambda$ is near $n$, the resulting distribution is not very Poisson-ey.

Are there any distributions and parameter ranges that you would suggest that I consider? (Maybe some kind of beta binomial distribution? If so, I'd appreciate suggestions about parameter ranges.)

$\endgroup$
2
  • $\begingroup$ Truncated Poisson distribution? $\endgroup$
    – Alex
    Feb 5, 2015 at 22:44
  • 1
    $\begingroup$ Thanks Alex. I had looked at truncated Poisson distributions. The term seems to refer to a distribution that's truncated in the sense that zero is excluded. I don't see a way to transform that kind of truncated Poisson for my use. Is there a truncated Poisson distribution that truncates on the right? $\endgroup$
    – Mars
    Feb 5, 2015 at 23:37

3 Answers 3

3
$\begingroup$

You can design your own Poisson like distribution. $P(X=k)=C(\lambda) \frac{\lambda^k}{k!}$. You just have to choose $C(\lambda)$ so that $\sum^n_{k=0} {P(k)}=1$. Wolfram alpha gives $C(\lambda)=n!\exp(-\lambda) / \Gamma(n+1,\lambda)$. The incomplete gamma function makes it a bit nasty I admit.

$\endgroup$
1
  • $\begingroup$ Thanks. I had thought about that, but was just going to take the sum from 1 to n of the original Poisson probabilities, and then divide by that. I'll have to see whether it's fruitful to do it with the Gamma function in the software I'm using. $\endgroup$
    – Mars
    Feb 6, 2015 at 21:49
3
$\begingroup$

Binomial Distribution

I know the question is no longer relevant to the original poster, but I spent more time today trying to figure this out than I wanted to.

I was trying to answer a similar question, "what is the distribution of proteins with a particular degree of labeling, $k$, given the average degree of labeling, $\lambda$." My protein has 5 available sites ($N$ = 5) that can be chemically modified. If I average, say, $\lambda$ =2 modifications per protein, what percentage of my protein will have 0, 1, 2, 3, 4 or 5 modifications. Using the Poisson distribution with $\lambda > \sim 1.5$, I get a truncated distribution* that does not sum to 1.

Being a mediocre mathematician, I looked it up. In a 1972 paper, Use of Nonspecific Dye Labeling for Singlet Energy-Transfer Measurements in Complex Systems. A Simple Model, I found, "The Poisson distribution is an approximate form of the binomial distribution in the limit of small probability for an event (binding, in our case). The probability of binding maybe expressed as $\mu/M$, where $M$ is the number of possible binding sites on the protein."

"$\mu/M$" using the typical symbols would be "$\lambda/N$"

So the Poisson Distribution:

$$f(k;λ) = \frac{\lambda ^k e^{-\lambda}}{k!}$$

becomes the Binomial Distribution:

$$f(k;p,N) = \frac{N!}{k!(N-k)!}p^k(1-p)^{N-k} ;$$

here $p = \lambda/N$ for finite $N$. The distributions look quite similar to each other, but the Binomial distributions all sum to 1.

Here are some plots of the Poisson and Binomial distributions using $\lambda$ = 0.3, 0.5, 1, 1.5, & 3.37; and $N$ = 5: Poisson Distributions Binomial Distributions

*I see in the comments to the original question that "truncated Poisson distribution" refers to the exclusion of zero. I am using the term here to mean a truncation at high $k$ due to finite $N$.

$\endgroup$
2
  • $\begingroup$ Welcome to MSE. I tried to format things a little better. Are you sure about the link URLs? $\endgroup$
    – Integrand
    Aug 26, 2020 at 21:59
  • $\begingroup$ Oh hey, thanks the reformat looks a lot better! The links appear to be functioning. My now-deleted comment about not being able to add images came from a pop-up message that told me I wasn't here long enough to post images. $\endgroup$
    – Jeremy
    Aug 28, 2020 at 14:18
1
$\begingroup$

I think you had the right idea: beta-binomial is best. The following parameters match up mean and variance ($\mu=\sigma^2$) like the Poisson:

$$ 0 \lt \alpha = n - 1 - \mu $$ $$ 0 \lt \beta = \frac{\alpha(n-\mu)}{\mu} $$ $$ 1 \le \mu \le n-2 $$

Many other finite discrete distributions cannot support a variance anywhere near the mean value, especially as the mean approaches the maximum.

To support this answer, I define Poisson-like as a value judgment with the following conflicting priorities as measures of similarity between two distributions.

Target
      Similar mean.
Statistic
      Similar variance, skewness and kurtosis.
Process
      Similar constructive assumptions (i.e. like a Poisson process).
PMF-Shape
      Similar local maximums and similar girth at lower heights.
PMF-Proportion
      Similar PMF ratio across all matching outcomes.

I would call your initial approach the finite Poisson that does not distinguish the cap outcome from that of greater values or perhaps (the capped-tail Poisson for short) and arguably it immediately has the advantage of similarity in process, PMF-shape, and PMF-proportion as long as we ignore the exceptional point at the cap. The disadvantage (as you have observed) is as the expectation approaches maximum. Here, dissimilarity and control issues prevail such as a falling mean and an exceptionally large probability mass at the cap.

An alternative that removes this exceptional point is what I call the finite Poisson that ignores outcomes above the cap value (or the discounted-tail Poisson for short). Like the capped-tail, the code for a discounted-tail uses the Poisson with special treatment for being out-of-bounds. The only difference is, the program discards and retries until the result is in range. This does well in similarity of process and PMF-proportion, but (relative to the capped-finite Poisson) does worse in the other respects, including shifting the realized mean even lower (relative to a chosen Poisson).

Throwing PMF-shape and PMF-proportion to the back of the line now, (the most intuitive and direct measures of similarity) I can look for a better fit among several distributions by prioritizing similarity of target, statistic and process. Further simplifying, I'll just focus on a mean of 190 with a maximum of 200. In other words, what distributions can I find that looks most like Poisson($\lambda=190$)? Standard of comparison:

  • $(\mu, \sigma^2, \frac{\mu_3}{\sigma^3}, \frac{\mu_4}{\sigma^4})=(190, 190, 0.0725, 3.005)$ for the Poisson $(\lambda=190)$

After studying the binomial, the Poisson binomial, and the hypergeometric distributions, I find that the variance is severely limited by the following relation.

$$ \sigma^2 \le \mu \frac{n-\mu}{n}$$

So for comparison:

  • Given $n=200$ and mean $\mu=190$, $\sigma^2 \le 9.5$ for any of binomial, hypergeometric or Poisson binomial.

By contrast, the beta-binomial with parameters as mentioned can have identical variance:

  • $(\mu, \sigma^2, \frac{\mu_3}{\sigma^3}, \frac{\mu_4}{\sigma^4})=(190, 190.1, -2.329, 10.003)$ for the beta-binomial $(N=200, \alpha=9, \beta=0.474)$

Even with beta-binomial, the match is better for smaller means; see how skewness and kurtosis depart from Poisson as the mean grows.

$$(\mu, \sigma^2, \frac{\mu_3}{\sigma^3}, \frac{\mu_4}{\sigma^4}) = $$

5% mean

  • (10, 10, 0.314, 3.097) ⇐ beta-binomial(200, 189, 3591)
  • (10, 10, 0.316, 3.1) ⇐ poisson (10)

25% mean

  • (50, 50, 0.1178, 3.001) ⇐ beta-binomial(200, 149, 447)
  • (50, 50, 0.1414, 3.02) ⇐ poisson (50)

50% mean

  • (100, 100, 0, 2.967) ⇐ beta-binomial(200, 99, 99)
  • (100, 100, 0.1, 3.01) ⇐ poisson (100)

75% mean

  • (150.01, 149.99, -0.2822, 3.027) ⇐ beta-binomial(200, 49, 16.33)
  • (150, 150, 0.0816, 3.007) ⇐ poisson (150)

95% mean

  • (190, 190.01, -2.33, 10.008) ⇐ beta-binomial(200, 9, 0.4737)
  • (190, 190, 0.0725, 3.005) ⇐ poisson (190)

The last question and often most important I feel, is whether the distribution is a good fit for the underlying process of what is being simulated. To envision a process that matches, I look at how the beta distributions (that correspond to these beta-binomial distributions) have PDFs with a single peak at (about?) $\frac{\mu}{n}$ and that the peak gets sharper and taller as $\mu$ gets smaller. So the underlying process for this distribution is very similar to the binomial process,

except instead of weighted coins being flipped:

  • {0,1} outcome
  • weighted $\frac{\mu}{n}$ in favor of 1

it's like darts being thrown:

  • at range (0,1)
  • bulls-eye at $\frac{\mu}{n}$
  • player's precision decreases (~exponentially?) as $\mu$ increases.

AND THEN flipping a weighted coin for each dart:

  • {0,1} outcome
  • weighted in favor 1 according to where the corresponding dart hit

I made a pretty plot in Mathematica to visualize the clustering of darts. Slices from front to back show the PMF as $\mu \in \{10,20,\ldots,190\}$.

$\endgroup$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .