###################################################################### # Example with finding probabilities using CLT # # # ###################################################################### mu <- 24 sigma <- 2 n <- 36 #Approximate normal distribution for Ybar - not responsible for expression() part par(mar = c(5, 4.5, 4, 2) + 0.1) # Change margins a little on left side curve(expr = dnorm(x = x, mean = mu, sd = sigma/sqrt(n)), xlim = c(22, 26), col = "red", n = 1000, xlab = expression(bar(y)), ylab = expression(paste("f(", bar(y), ")"))) abline(h = 0) par(mar = c(5, 4, 4, 2) + 0.1) # Change back to default 1 - pnorm(q = 23, mean = mu, sd =sigma/sqrt(n)) pnorm(q = 25, mean = mu, sd =sigma/sqrt(n)) - pnorm(q = 23, mean = mu, sd =sigma/sqrt(n)) #