######################################################################
# Grading with a bell curve #
# #
######################################################################
#####################################################################
# Example #1
curve(expr = dnorm(x = x, mean = 73, sd = 8), n = 1000,
from = 50, to = 100, col = "darkgreen", lwd = 2, ylab = "f(y)", xlab = "y")
abline(h = 0)
segments(x0 = 90, y0 = 0, x1 = 90, y1 = dnorm(x = 90, mean = 73, sd = 8),
col = "red", lwd = 5)
1 - pnorm(q = 90, mean = 73, sd = 8)
#####################################################################
# Example #2
curve(expr = dnorm(x = x, mean = 73, sd = 8), n = 1000,
from = 50, to = 100, col = "darkgreen", lwd = 2, ylab = "f(y)", xlab = "y")
abline(h = 0)
segments(x0 = 90, y0 = 0, x1 = 90, y1 = dnorm(x = 90, mean = 73, sd = 8),
col = "red", lwd = 5)
segments(x0 = 70, y0 = 0, x1 = 70, y1 = dnorm(x = 70, mean = 73, sd = 8),
col = "red", lwd = 5)
pnorm(q = 90, mean = 73, sd = 8) - pnorm(q = 70, mean = 73, sd = 8)
#####################################################################
# Example #3
curve(expr = dnorm(x = x, mean = 73, sd = 8), n = 1000,
from = 50, to = 100, col = "darkgreen", lwd = 2, ylab = "f(y)", xlab = "y",
ylim = c(0,0.14))
curve(expr = dnorm(x = x, mean = 62, sd = 3), n = 1000,
from = 50, to = 100, col = "blue", lwd = 2, ylab = "f(y)", xlab = "y",
add = TRUE)
abline(h = 0)
legend(x = 70, y = 0.12, legend = c("mu = 73, sigma = 8", "mu = 62, sigma = 3"),
lty = c(1,1), col = c("darkgreen", "blue"), bty = "n", lwd = c(2,2))
qnorm(p = 0.90, mean = 73, sd = 8)
qnorm(p = 0.90, mean = 62, sd = 3)
#