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

Poisson variates, λ and arrival rate connection, Java network simulation

I'm developing a network simulator in which events for packet arrivals and transmission attempts are following a Poisson distribution. I have an adaptation of Knuth's algorithm: public class Poisson { private double λ; private Random…
2
votes
0 answers

I have a problem assessing my zero-inflated negative binomial model against a poisson model

I have replicated a zero-inflated negative binomial model (model 1, table 1) from the article: Scharpf, Adam. 2020. “Why Governments Have Their Troops Trained Abroad: Evidence from Latin America.” International Studies Quarterly 64 (3): 734–47.…
LauMadsen
  • 23
  • 3
2
votes
3 answers

How to Write Poisson CDF as Python Polars Expression

I have a collection of polars expressions being used to generate features for an ML model. I'd like to add a poission cdf feature to this collection whilst maintaining lazy execution (with benefits of speed, caching etc...). I so far have not found…
2
votes
0 answers

How to make poisson noise from uniform random numbers using central limit theorem?

Using the fact that Gaussian(λ=σ) is an approximation of Poisson(λ), I want to compute an approximation of Poisson noise using only uniform random numbers without using factorials. There are two things I have no clue. How to approximate gaussian…
nishi
  • 21
  • 1
2
votes
1 answer

Account for offset variables in plot_model() of sjPlot package

I am creating a Poisson-distributed generalized linear model using an offset variable (in my case, the number of seconds of roe deers displaying vigilant behaviors as the response variable and the total number of seconds stayed at the plot as the…
Ariel C
  • 25
  • 3
2
votes
1 answer

Negative binomial glm.nb : Different results with unbalanced variable and complete separation

I am fitting a negative binomial model using glm.nb from the MASS package of R with as output Y depending on variable y1, x, and z . The problem is that I get different estimated coefficients using the same model but with the following equivalent…
Ph.D.Student
  • 704
  • 6
  • 27
2
votes
1 answer

Using R while loop to generate random variables

I want to generate a random variable X by continuing generating U(0,1) random variables as long as their product falls below exp(-2). Then my random variable X would be equal to the number of U(0,1) random variables that was generated minus 1. I…
NganKD
  • 71
  • 6
2
votes
1 answer

How to recover fitted values from BSTS poisson model (in R)?

I am trying to recover in-sample predictions (fitted values) from a bsts model with a specified poisson response using the bsts package in R. The following results in an error: Prediction errors are not supported for Poisson or logit…
cmcrowley
  • 95
  • 6
2
votes
1 answer

How to pass multiple formulae in geom_smooth (facet_wrap) in R ggplot2?

I want to fit three different functions for each of these factors (var.test). I tried the following method but I get an error that reads Warning messages: 1: Computation failed in stat_smooth():invalid formula. Any other way to get multiple formulae…
Rspacer
  • 2,369
  • 1
  • 14
  • 40
2
votes
1 answer

How to extract confidence intervals from a poisson distribution in glm R?

I want to try and predict the confidence intervals for a glm poisson() distribution. I tried to use the predict function to extract the upper and lower limits..but it dosent' appear to work. Any suggestions on what I could change? temp <-…
Rspacer
  • 2,369
  • 1
  • 14
  • 40
2
votes
1 answer

How to plot the Poisson distribution graph with Python?

import numpy as np from scipy.stats import poisson import matplotlib.pyplot as plt #generate Poisson distribution with sample size 30000 x = poisson.rvs(mu=0.9, size=30000) #create plot of Poisson distribution plt.hist(x, density=True,…
john chong
  • 35
  • 3
2
votes
2 answers

Poisson delay formula/function for VB?

I have a requirement where in I need to sleep for a Poisson duration before sending the next packet. The current formula I can think of is ( e^(-lambda) X lambda^t ) / fact(t) However, for time steps 280 and more the fact(t) would become obsolete…
Aditya369
  • 545
  • 1
  • 7
  • 27
2
votes
1 answer

Why is predict not ignoring my offset from a Poisson model in R no matter how I enter the offset into the model?

I am working in R but have been validating my results in Stata and through doing so have observed that predict in R is not ignoring my offset from my Poisson model. Let me explain: I have fitted the following model in R - to model excess mortality…
Dr Vicki
  • 115
  • 1
  • 1
  • 6
2
votes
1 answer

Understanding where the link function is computed in Poisson regression

From Poisson Regression by hand this 'manual' Poisson coefficient function is provided: LogLike <- function(y,x, par) { beta <- par # the deterministic part of the model: lambda <- exp(beta%*%t(x)) # and here comes the negative…
MariusJ
  • 71
  • 6
2
votes
1 answer

Does the function multinom() from R's nnet package fit a multinomial logistic regression, or a Poisson regression?

The documentation for the multinom() function from the nnet package in R says that it "[f]its multinomial log-linear models via neural networks" and that "[t]he response should be a factor or a matrix with K columns, which will be interpreted as…
AJV
  • 153
  • 8