是random.expovariate等同于泊松过程 [英] Is random.expovariate equivalent to a Poisson Process
问题描述
我在某处读到python库函数random.expovariate产生的间隔等于泊松过程事件.
真的是这样吗?还是应该在结果上加上其他功能?
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?
推荐答案
严格地阅读您的问题,是的,这就是random.expovariate的作用.
On a strict reading of your question, yes, that is what random.expovariate does.
expovariate为您提供指数分布的随机浮点数.在泊松过程中,连续事件之间的时间间隔的大小是指数的.
expovariate gives you random floating point numbers, exponentially distributed. In a Poisson process the size of the interval between consecutive events is exponential.
但是,我可以通过两种其他方式来想象对泊松过程进行建模
However, there are two other ways I could imagine modelling poisson processes
- 只需生成随机数,均匀分布并对其进行排序即可.
- 生成具有泊松分布的整数(即,它们以泊松过程中固定间隔内的事件数的形式分布).使用numpy.random.poisson可以做到这一点.
当然,所有三件事都是完全不同的.正确的选择取决于您的应用程序.
Of course all three things are quite different. The right choice depends on your application.
这篇关于是random.expovariate等同于泊松过程的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!