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

Is random.expovariate equivalent to a Poisson Process

I read somewhere that the python library function random.expovariate produces intervals equivalent to Poisson Process events. Is that really the case or should I impose some other function on the results?
hizki
  • 709
  • 1
  • 8
  • 19
5
votes
1 answer

Python: endog has evaluated to an array with multiple columns

I'm trying to run a Poisson model, like this: poisson_model_xg = smf.glm(formula="xG ~ home + team + opponent", data=xg_model_data, family=sm.families.Poisson()).fit() I'm getting the following error: ValueError: endog has…
Rodrigo Salvador
  • 163
  • 1
  • 1
  • 8
5
votes
5 answers

generating poisson variables in c++

I implemented this function to generate a poisson random variable typedef long unsigned int luint; luint poisson(luint lambda) { double L = exp(-double(lambda)); luint k = 0; double p = 1; do { k++; p *=…
Bob
  • 10,741
  • 27
  • 89
  • 143
5
votes
1 answer

zeroinfl "system is computationally singular" whereas no correlation in predictors

I am trying to model count data on the number of absence days by worker in a year (dependant variable). I have a set of predictors, including information about workers, about their job, etc..., and most of them are categorical variables.…
Rcoffee
  • 51
  • 1
  • 3
5
votes
1 answer

Opposite directions of exponential hazard model coefficients ( with survreg and glm poisson)

I want to estimate an exponential hazards model with one predictor in R. For some reason, I am getting coefficients with opposite signs when I estimate it using a glm poisson with offset log t and when I just use the survreg function from the…
fmerhout
  • 164
  • 2
  • 11
5
votes
2 answers

Removing the Water Tight-ness property from the mesh constructed by poisson reconstruction using Point Cloud Library

I would like to generate visually appealing surface reconstruction from the the point clouds. I am using point cloud library. I tried creating a mesh using poisson reconstruction method but later found that it gives a water tight reconstruction. For…
Sai
  • 377
  • 2
  • 7
  • 18
5
votes
1 answer

Regression for a Rate variable in R

I was tasked with developing a regression model looking at student enrollment in different programs. This is a very nice, clean data set where the enrollment counts follow a Poisson distribution well. I fit a model in R (using both GLM and Zero…
Noah
  • 567
  • 8
  • 19
4
votes
1 answer

Numpy power returns negative value

I want to plot the Poisson distribution and get negative probabilities for lambda >= 9. This code generates plots for different lambdas: import numpy as np import matplotlib.pyplot as plt from scipy.special import factorial for lambda_val in…
DerDressing
  • 315
  • 1
  • 4
  • 19
4
votes
2 answers

Generate Poisson process using R

I want to generate a process where in every step there is a realisation of a Poisson random variable, this realisation should be saved and then it should be realize the next Poisson random variable and add it to the sum of all realisations before.…
user734124
  • 489
  • 8
  • 20
4
votes
1 answer

PyMC3 - coal mining disaster example - questions re: adding a second mine

I'm playing around with PyMC3, trying to fit a modified version of the mining disaster switchpoint model in the PyMC3 documentation. Suppose you had two coal-mines (mine1 and mine2), each with similar disaster counts for the same range of…
Sham Doran
  • 41
  • 2
4
votes
3 answers

Inverse CDF of Poisson dist in Excel

I want to know is there a function to calculate the inverse cdf of poisson distribution? So that I can use inverse CDF of poisson to generate a set of poisson distributed random number.
whateverlx
  • 57
  • 1
  • 1
  • 6
4
votes
1 answer

Generate a random number within a range using a poisson distribution

I need a Poisson distribution. Currently I have the following code: public static int getPoisson(double lambda) { double l = Math.exp(-lambda); double p = 1.0; int k = 0; do { k++; p *= Math.random(); } while (p…
Dan
  • 75
  • 6
4
votes
0 answers

random-poisson value for entire list in netlogo

I have agents called 'orders' Within these agents there is a number of devices as an attribute. Depending on the age of each of the devices, a certain number of devices will break in accordance with a random-poisson process. For example: Orders have…
DvB09
  • 41
  • 2
4
votes
3 answers

How to simulate Poisson arrival?

I want to generate events that "arrive" with "t" seconds as mean inter-arrival delay? Starting at time 0, how do I generate the times when the event occurs? Basically, I want to generate sequence of times such as t1, t2, t3, ... when the event…
Vijay
  • 481
  • 3
  • 5
  • 13
4
votes
8 answers

Sum of residuals of scipy regression model

I am going through a stats workbook with python, there is a practice hands on question on which i am stuck. Its related to Poisson regression and here is the problem statement:- Perform the following tasks: Load the R data set Insurance from MASS…
AlphaBetaGamma
  • 1,910
  • 16
  • 21
1 2
3
46 47