R:我怎样才能找到一个点差与分布曲线的距离?

时间:2015-04-26 18:28:00

标签: r distance normal-distribution

我试图从我为数据X设置的分布中找到一个点(x)的距离

duration <- rpois(500, 10) # For duration data I assume Poisson distributed
hist(duration,
   probability = TRUE, # Instead of frequency
   breaks = "FD",      # For more breaks than the default
   col = "darkslategray4", border = "seashell3")
lines(density(duration - 0.5),   # Add the kernel density estimate (-.5 fix for the bins)
   col = "firebrick2", lwd = 3)

如果这是程序并且有一个x = 32,我怎么能看到它与R中分布的平均值有多远?

0 个答案:

没有答案