Compound Poisson simulation

benchmarks several versions of code for generating Compound Poisson random variables

您现在正在关注此提交

Compound Poisson random variables are of the form S=X1+...+XN where the Xj are iid random variables and N is random with the Poisson distribution. Compound Poisson variables have many applications in physics and finance.

This file benchmarks several codes for generating 1 million random samples from a Compound Poisson distribution where the terms are Lognormal with mu=0 and sigma=1 and the Poisson frequency is 10.

The run times vary by a factor of more than 200 between the fastest and slowest versions (in R2009b). Interestingly, the fastest code is 10 times faster than the neat 1-liner that uses ARRAYFUN.

Requires POISSRND (Statistics Toolbox) and RANDRAW (FEX #7309).

引用格式

Ben Petschel (2026). Compound Poisson simulation (https://ww2.mathworks.cn/matlabcentral/fileexchange/26042-compound-poisson-simulation), MATLAB Central File Exchange. 检索时间: .

致谢

参考作品: RANDRAW

一般信息

MATLAB 版本兼容性

  • 兼容任何版本

平台兼容性

  • Windows
  • macOS
  • Linux
版本 已发布 发行说明 Action
1.1.0.0

updated comments

1.0.0.0