【发布时间】:2019-08-08 03:44:59
【问题描述】:
基本上,我无法绘制相对频率直方图,因为当我绘制数据时,我的 y 轴总是大于 1。我还想在顶部叠加一个正态分布,但它似乎永远不会起作用。
到目前为止我制作的:https://imgur.com/H9lWBVg
我尝试了多种方法来绘制直方图,例如hist()、truehist() 和plot() 等。
truehist(aest,freq=TRUE, xlab = "Average Est", col="blue")
curve(dnorm(x,mean(aest),sd(aest)),col="red", add=TRUE, lwd=2)
legend("topright",legend=c(paste("median = ",toString(mean(aest))),paste("mean = ",toString(median(aest))),paste("SD = ",toString(sd(aest)))), cex=0.65)
【问题讨论】:
标签: r histogram normal-distribution