> attach(RED.Wine.14MARCH)
> summary(fixed.acidity) Min. 1st Qu. Median Mean 3rd Qu. Max. 4.60 7.10 7.90 8.32 9.20 15.90 > VAR1 <- fixed.acidity h<-hist(VAR1,breaks=72,col="yellow", xlab=" Fixed.Acidity",main="Histogram of Fixed.Acidity - with a Normal Distribution Curve and Box ") ### - Defined two more Variables - VAR1fit & yfit - ### VAR1fit<-seq(min(VAR1), max(VAR1), length=40) yfit<-dnorm(VAR1fit, mean=mean(VAR1), sd=sd(VAR1)) yfit <- yfit*diff(h$mids[1:2])*length(VAR1) lines(VAR1fit, yfit, col="red", lwd=2) box() ![]() |
R Code and Graphs >