On 29/12/2008 4:25 PM, AbouEl-Makarim Aboueissa wrote:
Dear ALL:
How I show the area under the normal curve for example for the following example: Assume X has N(100,15). How to show the area corresponding to the probability: P(90<X<110) With many thanks

range <- c(70, 130)
x <- seq(min(range), max(range), len=200)
plot(x, dnorm(x, mean=100, sd=15), type="l")
x <- seq(90, 110, len=100)
y <- dnorm(x, mean=100, sd=15)
polygon(c(x, x[100], x[1]), c(y, 0,0), col="gray")

Duncan Murdoch

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to