我发现使用的可能性
pnorm(176, 135, 10, lower.tail=TRUE) - pnorm(146, 135, 10, lower.tail=TRUE)
结果为0.1356,约为14%。
我必须使用dnorm和多边形函数来创建一个图,在该图中以正态分布显示阴影区域(基于以上百分比)。
有人知道怎么做吗?
像这样:
library(ggplot2) x=seq(80,190,1) dat = data.frame(x, dens=dnorm(x,135,10)) ggplot(dat, aes(x,dens)) + geom_line() + geom_area(data=dat[dat$x >= 146 & dat$x <= 176,], fill="red")
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
点击生成二维码
我来说两句