Poisson 分布的密度
在本练习中,您将通过模拟并使用能给出精确结果的 dpois() 函数,求出 Poisson 随机变量等于 0 的概率。
本练习是课程的一部分
R 中的概率基础
练习说明
- 从均值为 2 的 Poisson 分布中模拟 100,000 次抽样。
- 用这次模拟来估计该 Poisson 分布一次抽样为 0 的概率。
- 使用
dpois()函数,求出 Poisson(2) 分布取值为 0 的精确概率。
交互式实操练习
通过完成这段示例代码来试试这个练习。
# Simulate 100,000 draws from Poisson(2)
poisson_sample <-
# Find the percentage of simulated values that are 0
# Use dpois to find the exact probability that a draw is 0