poisson

pymc3 : Multiple observed values

馋奶兔 提交于 2019-11-28 21:40:02
问题 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 a fixed one hour period. One observation is the total number of events that occur during the given hour. The other observation is the number of successes within that time period. So, for example, a data point might specify that in a given 1 hour

Simulating Poisson Waiting Times

◇◆丶佛笑我妖孽 提交于 2019-11-28 10:17:47
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 lambda) { double L = Math.exp(-lambda); double p = 1.0; int k = 0; do { k++; p *= rand.nextDouble(); p *= Math.random(); } while (p > L); return k - 1; } but that is for number of arrivals, not arrival times. Efficieny is preferred to accuracy, more because of power consumption than time. The language I am working in is Java, and it would be best if the

Java Generator for Poisson and Uniform Distributions?

末鹿安然 提交于 2019-11-28 06:35:32
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 the range of 0 - 999999. Simon Nickerson As David has pointed out, the supplied pseudo-random number generator uses the Uniform distribution. For the other two, I would use the Cern Colt library functions: Poisson Normal/Gaussian These library functions easily allow you to find a random number taken from each distribution, rather than giving you a

Algorithm to generate Poisson and binomial random numbers?

强颜欢笑 提交于 2019-11-27 07:00:28
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 x 1 , x 2 , ... is a sequence of random numbers with uniform distribution between zero and one, k is the first integer for which the product x 1 · x 2 · ... · x k+1 < e -λ i've found another page describing how to generate binomial numbers, but i think it is using an approximation of poisson generation, which doesn't help me. For example, consider binomial random numbers

Simulating Poisson Waiting Times

倖福魔咒の 提交于 2019-11-27 03:30:58
问题 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 lambda) { double L = Math.exp(-lambda); double p = 1.0; int k = 0; do { k++; p *= rand.nextDouble(); p *= Math.random(); } while (p > L); return k - 1; } but that is for number of arrivals, not arrival times. Efficieny is preferred to accuracy, more

Java Generator for Poisson and Uniform Distributions?

不想你离开。 提交于 2019-11-27 01:24:53
问题 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 the range of 0 - 999999. 回答1: As David has pointed out, the supplied pseudo-random number generator uses the Uniform distribution. For the other two, I would use the Cern Colt library functions: Poisson Normal/Gaussian These library functions