#normal distribution
#dnorm(x,mean,sd)
#create a sequence of no btw -10 and 10 incrementing by 0.1
x=seq(-10 ,10 ,by=0.1)
#chooisng mean as 2.5 and sd=0.5
y=dnorm(x,2.5,0.5)
plot(x,y,type="l",col="pink")

x=seq(-10,10,0.2)
y=pnorm(x,2,5,2)
plot(x,y,col="red")

#create seq of prob values incrementing by o.02
x=seq(0,1,0.02)
y=qnorm(x,2,1)
plot(x,y,col="yellow")

#create sample of 50 no,. which are normally distributed
 y=rnorm(50)
 
 hist(y,main="normal distribution ",col="red")
 
 x=seq(15,105,length=200)
 y=dnorm(x,60,15)
 plot(x,y)
 
 #shade the top 20 percentage area under normal density curve
 x=seq(15,105,length=200)
 y=dnorm(x,60,15)
 plot(x,y,type="l",col="blue")
 #for 20%
 x=seq(72.62,105,length=200)
 y=dnorm(x,60,15)
 polygon(c(72.62,x,105),c(0,y,0),col="red")

Embed on website

To embed this project on your website, copy the following code and paste it into your website's HTML: