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

Algorithm to generate Poisson and binomial random numbers?

i've been looking around, but i'm not sure how to do it. i've found this page which, in the last paragraph, says: A simple generator for random numbers taken from a Poisson distribution is obtained using this simple recipe: if x1, x2, ... is a…
snap
21
votes
7 answers

Generating a gaussian distribution with only positive numbers

Is there any way to randomly generate a set of positive numbers such that they have a desired mean and standard deviation? I have an algorithm to generate numbers with a gaussian distribution, but I don't know how to deal with negative numbers in…
Whatsit
  • 10,227
  • 11
  • 42
  • 41
18
votes
2 answers

Estimating rate of occurrence of an event with exponential smoothing and irregular events

Imagine that I have a set of measurements of x that are taken by many processes x0 ... xN at times t0 ... tN. Let's assume that at time t I want to make an estimate of the current value of x, based on the assumption that there is no long term trend…
abligh
  • 24,573
  • 4
  • 47
  • 84
16
votes
3 answers

Calculate poisson probability percentage

When you use the POISSON function in Excel (or in OpenOffice Calc), it takes two arguments: an integer an 'average' number and returns a float. In Python (I tried RandomArray and NumPy) it returns an array of random poisson numbers. What I really…
Jon
15
votes
3 answers

Random Forest Regressor using a custom objective/ loss function (Python/ Sklearn)

I want to build a Random Forest Regressor to model count data (Poisson distribution). The default 'mse' loss function is not suited to this problem. Is there a way to define a custom loss function and pass it to the random forest regressor in Python…
vishmay
  • 386
  • 2
  • 4
  • 15
15
votes
2 answers

Can't understand Poisson part of Hash tables from Sun documentation

I am trying to understand how HashMap is implemented in Java. I decided that I will try to understand every line (of code and comments) from that class and obviously I faced resistance very soon. The following snippet is from HashMap class and talks…
Asif
  • 1,288
  • 1
  • 16
  • 27
14
votes
8 answers

How do I generate a Poisson Process?

Original Question: I want to generate a Poisson process. If the number of arrivals by time t is N(t) and I have a Poisson distribution with parameter λ how do I generate N(t)? How would I do this in C++? Clarification: I originally wanted to…
bias
  • 1,467
  • 3
  • 19
  • 39
12
votes
2 answers

Bivariate Poisson Regression in R?

I found a package 'bivpois' for R which evaluates a model for two related poisson processes (for example, the number of goals by the home and the away team in a soccer game). However, this package seems to no longer be useable in newer versions of…
Millsy11
  • 121
  • 1
  • 4
11
votes
2 answers

Return a dynamic vector from C to R

I am writing some code in C to be called dynamically from R. This code generates a path of a random Poisson process up to a desired time T. So at every call to my C function, the length of the returned vector will be different depending on the…
Alberto Contador
  • 263
  • 1
  • 13
11
votes
2 answers

pymc3 : Multiple observed values

I have some observational data for which I would like to estimate parameters, and I thought it would be a good opportunity to try out PYMC3. My data is structured as a series of records. Each record contains a pair of observations that relate to…
sozen
  • 125
  • 1
  • 5
10
votes
4 answers

Java Generator for Poisson and Uniform Distributions?

From what I understand, the standard generator is for the Normal Distribution. I have to generate random numbers according to the Normal, Uniform and Poisson Distributions, but I can't seem to find a class for the last 2. I have to generate them in…
master cheif
9
votes
1 answer

How to fit a poisson distribution with seaborn?

I try to fit my data to a poisson distribution: import seaborn as sns import scipy.stats as stats sns.distplot(x, kde = False, fit = stats.poisson) But I get this error: AttributeError: 'poisson_gen' object has no attribute 'fit' Other…
benjello
  • 164
  • 1
  • 8
9
votes
2 answers

XGBoost - Poisson distribution with varying exposure / offset

I am trying to use XGBoost to model claims frequency of data generated from unequal length exposure periods, but have been unable to get the model to treat the exposure correctly. I would normally do this by setting log(exposure) as an offset - are…
Pete Lowth
  • 171
  • 1
  • 7
8
votes
2 answers

Poisson Point Process in Python 3 with numpy, without scipy

I need to write a function in Python 3 which returns an array of positions (x,y) on a rectangular field (e.g. 100x100 points) that are scattered according to a homogenous spatial Poisson process. So far I have found this resource with Python code,…
GeckStar
  • 1,136
  • 1
  • 14
  • 22
8
votes
2 answers

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

I'm aware of Knuth's algorithm for generating random Poisson distributed numbers (below in Java) but how do I translate that into calling a method, generateEvent(), randomly over time? int poissonRandomNumber(int lambda) { double L =…
blank
  • 17,852
  • 20
  • 105
  • 159
1
2 3
46 47