So I've gotten my histogram and my normal curve to plot, however the curve appears much smaller than the histogram bars. What am I doing wrong that it is so much smaller than it should be?
As you can see in my code I've plotted the histogram and tried two methods of plotting that normal curve. I had already calculated the sd and mean of the data set so I just used the actual numbers. The lines do plot, just way lower than they should be.
g = read.csv("C:/Users/emkat/Documents/decave.txt",header=FALSE)
g
m <- lapply(g,mean)
std <- sqrt(var(g))
hist(g[,1],plot = TRUE)
x <- g[,1]
y <- dnorm(x,mean = 26.59138,sd = 5.046878)
curve(dnorm(x,mean = 26.59138,sd = 5.046878),col="darkblue",lwd=2,add = TRUE)
lines(density(g[,1]),col="blue")