How do I generate a Poisson Process?

后端 未结 8 2047
被撕碎了的回忆
被撕碎了的回忆 2021-02-20 06:07

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

8条回答
  •  庸人自扰
    2021-02-20 07:12

    In python, you can try below code.

    If you want to generate 20 random readings in 60 seconds. ie (20 is the lambda)

     def poisson_job_generator():
        rateParameter = 1.0/float(60/20) 
        while True:
            sl = random.expovariate(rateParameter)
    

提交回复
热议问题