how would I go about plotting this in R?
Here is the code I have already tried but it doesn't work!
x <- seq(-5, 5, length=200)
y <- dnorm(x, mean= -1, sd=1)
t = sqrt(0.5)
z <- seq(-5, 5, length=200)
a <- dnorm(z, mean=1, sd=t)
plot(z, a, type="l", lwd=2, col='red', xlim = c(-5,5), ylim = c(0,0.65), xlab = "Observed Value", ylab = "Probability Density")
lines(x,y, col='blue', lwd=2)
abline(v = 0, col = "darkgreen")
