Roxie's Stats

So this is standard normal with mean =0 and sd=1…

Just cut and paste the code and delete the existing code into that R site…


# this is the first plot
x = seq(from = -0, to = 40, by = 0.01)
y = dnorm(x, mean = 20, sd = 3)
plot(x, y, type = "l", col = "blue", main = "Two Normals, same mean but different spread")

# this is the second plot
curve(dnorm(x, mean = 20, sd = 6), from = 0, to = 40, add = TRUE, 
    col = "red")

plot of chunk unnamed-chunk-1