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
7
votes
2 answers

Simulating Poisson Waiting Times

I need to simulate Poisson wait times. I've found many examples of simulating the number of arrivals, but I need to simulate the wait time for one arrival, given an average wait time. I keep finding code like this: public int getPoisson(double…
Alex
  • 73
  • 1
  • 3
7
votes
2 answers

Scipy poisson distribution with an upper limit

I am generating a random number using scipy stats. I used the Poisson distribution. Below is an example: import scipy.stats as sct A =2.5 Pos = sct.poisson.rvs(A,size = 20) When I print Pos, I got the following numbers: array([1, 3, 2, 3, 1, 2,…
Zephyr
  • 1,332
  • 2
  • 13
  • 31
7
votes
1 answer

examining residuals and visualizing zero-inflated poission r

I am running a zero-inflated model for CPUE data. This data has evidence of zero-inflation which I have confirmed with a Vuong test (in code below). The full model (zint) is better than the null according to AIC. I now want to: Examine the…
vermicellion
  • 338
  • 2
  • 14
7
votes
1 answer

Python Numpy Poisson Distribution

I am generating a Gaussian, for the sake of completeness, that's my implementation: from numpy import * x=linspace(0,1,1000) y=exp(-(x-0.5)**2/(2.0*(0.1/(2*sqrt(2*log(2))))**2)) with peak at 0.5 and fwhm=0.1. So far so not interesting. In the next…
famfop
  • 185
  • 1
  • 1
  • 9
7
votes
1 answer

How to sample inhomogeneous Poisson processes in Python faster than this?

I'm sampling a Poisson process at a millisecond time scale where the rate is not fixed. I discretise the sampling process by checking in each interval of size delta whether there is an event there or not based on the average rate in that interval.…
Haffi112
  • 553
  • 5
  • 18
7
votes
2 answers

Scheduling events at microsecond granularity in POSIX

I'm trying to determine the granularity I can accurately schedule tasks to occur in C/C++. At the moment I can reliably schedule tasks to occur every 5 microseconds, but I'm trying to see if I can lower this further. Any advice on how to achieve…
BSchlinker
  • 3,401
  • 11
  • 51
  • 82
7
votes
5 answers

Adding poisson noise to an image

I have some images that I need to add incremental amounts of Poisson noise to in order to more thoroughly analyze them. I know you can do this in MATLAB, but how do you go about doing it in Python? Searches have yielded nothing so far.
vdogsandman
  • 5,289
  • 8
  • 21
  • 21
7
votes
2 answers

Generating random integers within range with a probability distribution

I have a problem where I want to generate a set of random integer values between 1 and 5 inclusive using a probability distribution. Poisson and Inverse Gamma are two distributions that show the characteristics I am after (majority at mean, less…
jmc
  • 620
  • 14
  • 24
6
votes
4 answers

Generate Poisson Arrival in Java

I would like to create a function in Java that generates Poisson arrivals given the mean arrival rate (lambda) and the mean service rate (mu). In my example I have: 2,2 requests/day, in other words 2,2 arrivals/day and a mean service time of 108…
user1287257
  • 87
  • 1
  • 1
  • 2
6
votes
1 answer

Understanding the Poisson distribution of a random number generator

I'm working with the random number generator available within C++11. At the moment, I'm using a uniform distribution, which should give me an equal probability to get any number within the range A & B which I specify. However, I'm confused about…
BSchlinker
  • 3,401
  • 11
  • 51
  • 82
6
votes
1 answer

difficulty installing rpy2 using Python 3.8 via anaconda with R version 4.0.2 on Mac osx

I have never used R code in python before, but would like to do so in order to implement some Poisson regression models. The reason for this is efficiency (R code for poisson regression much more efficient). I have attempted to install rpy2 by…
6
votes
1 answer

Fitting a local level Poisson (State Space Model)

I am working through "Forecasting with Exponential Smoothing". I am stuck on exercise 16.4 on the part that states: The data set partx contains a history of monthly sales of an automobile part. Apply a local Poisson model. Parameters should be…
Alex
  • 2,603
  • 4
  • 40
  • 73
6
votes
2 answers

How to Generate a Homogeneous Poisson Point Process in a circle?

I would like to generate N points in a circle C of center (0,0) and of radius R=200. The points follow Poisson distribution. In other words, I would like to generate N homogeneous Poisson point process (HPPP) inside C. I found this paper Generating…
drzbir
  • 419
  • 1
  • 6
  • 15
6
votes
1 answer

Zero inflated poisson model fails to fit

Here's the data and set up: library(fitdistrplus) library(gamlss) finalVector <- dput(finalVector) c(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,…
user1357015
  • 11,168
  • 22
  • 66
  • 111
6
votes
1 answer

Python/Numpy/Scipy: Draw Poisson random values with different lambda

My problem is to extract in the most efficient way N Poisson random values (RV) each with a different mean/rate Lam. Basically the size(RV) == size(Lam). Here it is a naive (very slow) implementation: import numpy as NP def…
user2304916
  • 7,882
  • 5
  • 39
  • 53
1
2
3
46 47