Questions tagged [poisson]

The Poisson distribution is a statistical discrete distribution for describing events occurring at random intervals. It is defined on the non-negative integers that has the property in which the mean is equal to the variance.

The Poisson probability distribution is used to model the probability of a number of events occurring during a specified time interval.

The Poisson distribution is characterized by an expected arrival rate, usually designated by the Greek lower-case letter lambda.

A discrete random variable X has a Poisson distribution indexed by a parameter λ if it has probability mass function as following:

enter image description here

Useful links:

Wikipedia entry for the Poisson distribution.

How do I generate discrete random events with a Poisson distribution?

699 questions
4
votes
2 answers

Paralyzable systems model in python

As a part of a bigger model, I need to have couple of lines of code that could be implementing the Paralazable system model for me. The whole model is on a detector. This detector could record signals based on the elements that are arriving. The…
Nikki
  • 195
  • 9
4
votes
2 answers

How to draw a random sample from a Poisson distribution?

I have a number X of integers (very large) and a probability p with which I want to draw a sample s (a number) from X following a Poisson distribution. For example, if X = 10^8 and p=0.05, I expect s to be the number of heads we get. I was able to…
Joana
  • 49
  • 1
  • 3
4
votes
1 answer

statsmodel poisson prediction return floats instead of whole numbers

So I'm using statsmodel package to do a poisson regression on my data set, I made sure that my training y are indeed counts and integers. However, when I print the predicted values(testmodely below) they are floats. I'm super confused, I expect…
mani
  • 71
  • 3
4
votes
0 answers

Mixture of poisson distribution using flexmix in R

I am trying to fit mixture of 3 poisson distribution using flexmix package in R as per the code below: require(flexmix) freq<- c(222950,111682,72429,48126,34515,25801,19199,15033,11859, 9226, 7363, 5910, 4659, 3723, 2985, 2291,1907, 1447,…
4
votes
1 answer

Model to be choose if Poisson distribution mean and variance are not the same, say If mean is greater than variance or variance is greater than mean?

Model to be chosen if Poisson distribution mean and variance are not the same, say If mean is greater than variance or variance is greater than mean?
KARThik
  • 41
  • 2
4
votes
1 answer

Balls in Bins simulation for R

I would like to simulate the distribution for a fixed number of balls m in a fixed number of bins n in R. Up till now I have been using the Poisson approximation with rpois(). This is a decent approximation for a large number of balls in n…
Svencken
  • 479
  • 6
  • 14
4
votes
1 answer

How to fit a column of a dataframe into poisson distribution in Python

I have been trying to find a way to fit some of my columns (that contains user click data) to poisson distribution in python. These columns (e.g., click_website_1, click_website_2) may contain a value ranging from 1 to thousands. I am trying to do…
renakre
  • 8,001
  • 5
  • 46
  • 99
4
votes
1 answer

How can I offset exposures in a gbm model in R?

I am trying to fit a gradient boosting machine (GBM) to insurance claims. The observations have unequal exposure so I am trying to use an offset equal to the log of exposures. I tried two different ways: Put an offset term in the formula. This…
4
votes
3 answers

implementing Poisson distribution in c++

I'm trying to write a program to calculate probabilty mass function of a poisson distribution, P(x=n) with parameter lambda, using this formula: ( (e^-lambda)*(lambda^n))/n! This approach works well when I use small lambda and small numbers, but…
starrr
  • 1,013
  • 1
  • 17
  • 48
4
votes
1 answer

Generate positive real numbers from rpois()

I am trying to create a Poisson simulation using rpois(). I have a distribution of two decimal place interest rates and I want to find out if these have Poisson rather than a normal distribution. The rpois() function returns positive integers. I…
markthekoala
  • 1,065
  • 1
  • 11
  • 24
4
votes
1 answer

Finite mixture of tweedie

I'm trying to estimate a finite mixture of tweedie (or compound Poisson-gamma) distributions. I have scoured any resources I can think of, without finding any resources on how to do this. I am currently trying to use the flexmix package in R writing…
masher
  • 41
  • 2
4
votes
0 answers

ggplot Poisson density curve: why zigzag lines?

I would like to plot the density function of a Poisson distribution. I am not sure why I get a jaggy line (in blue). On the sample plot, the normal density curve (in red) looks smooth. It is because the reason the Poisson density function doesn't…
Polymerase
  • 6,311
  • 11
  • 47
  • 65
4
votes
0 answers

Trying to fit Poisson Distribution in R using fitdistr to Erdos.Reyni random graph constructed in Igraph

Using igraph in R, I was trying to confirm that the Erdos-Reyni method of constructing random networks would indeed end up with networks with degree distributions that are well fit by a Poisson distribution. So, I ran the R the…
4
votes
0 answers

Does Matlab offer robust standard errors for GLMs?

I'm trying to do Poisson regression with overdispersed data and so I believe I should be using huber-white robust standard errors. However, I don't see any option for that in glmfit. And from what I understand, robustfit is only for linear…
4
votes
1 answer

how to generate integer inter arrival times using random.expovariate() in python

In python random module, the expovariate() function generates floating point numbers which can be used to model inter-arrival times of a Poisson process. How do I make use of this to generate integer times between arrival instead of floating point…
okkhoy
  • 1,298
  • 3
  • 16
  • 29