mislam Math 6820 Blog

Another amazing bgsu blog

Is Horsepower of a Car Related to Its Mileage?

Posted by mislam on January 7, 2013

Motor Trend magazine collected the horsepower and mileage for 32 cars in the 1973-74 model year.  To see if there is any relationship between horsepower and mileage, I construct a scatter plot of the two variables.

 

 

From this scatter plot,  it is clear that the horsepower and mileage are negatively related. The mileage decreases as HP increases.

R code

png("cargraph.png")

with(mtcars, plot(hp, mpg ,pch=19, col="red"))

dev.off()

Leave a Reply

Your email address will not be published. Required fields are marked *