[R] Normal Curve
Duncan Murdoch
murdoch at stats.uwo.ca
Tue Dec 30 01:18:50 CET 2008
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
More information about the R-help
mailing list