aded notes and new answers to hw 1

This commit is contained in:
caes 2017-01-24 23:08:33 -05:00
parent 439f7abca7
commit edbf4ab7af
2 changed files with 29 additions and 2 deletions

View File

@ -252,11 +252,32 @@ remains?
scatterplots or other tools of your choice. Create some plots highlighting scatterplots or other tools of your choice. Create some plots highlighting
the relationships among the predictors. Comment on your findings. the relationships among the predictors. Comment on your findings.
I'll just make all the graphs, included at auto_pairs.png. There are a number of uncorrelated predictors, it seems, but many relationships can also be discerned. Mpg and cylinders; mpg and displacement; mpg and horsepower; mpg and weight; mpg and year, even; horsepower and displacement; really, there are many relationships, but the interesting ones are probably with the mpg. The strong linear relationships between horsepower, weight, and displacement make sense because they're pretty much correlated by design, as engineers make larger engines to handle more weight and so on. The relationships between this overall trend, is that as they increase, mpg decreases. We also see that mpg increases as the year increases, i.e., as we develop more sophisticated technology. I'll just make all the graphs, included at auto_pairs.png. There are a
number of uncorrelated predictors, it seems, but many relationships can
also be discerned. Mpg and cylinders; mpg and displacement; mpg and
horsepower; mpg and weight; mpg and year, even; horsepower and
displacement; really, there are many relationships, but the interesting
ones are probably with the mpg. The strong linear relationships between
horsepower, weight, and displacement make sense because they're pretty
much correlated by design, as engineers make larger engines to handle
more weight and so on. The relationships between this overall trend, is
that as they increase, mpg decreases. We also see that mpg increases as
the year increases, i.e., as we develop more sophisticated technology.
(f) Suppose that we wish to predict gas mileage ( mpg ) on the basis of the (f) Suppose that we wish to predict gas mileage ( mpg ) on the basis of the
other variables. Do your plots suggest that any of the other variables other variables. Do your plots suggest that any of the other variables
might be useful in predicting mpg ? Justify your answer. might be useful in predicting mpg ? Justify your answer.
Well, I pretty much just answered that. The year is a great predictor: it appears we will likely continue to improve mpg slowly and in a linear fashion with time. There is a non-linear relationship that gives a strong mpg response as weight/displacement/horsepower decrease, so it's quite clear that these are a strong predictor of mpg. There's also a relationship with cylinders, but again, this is really just part of the trend of vehicles with more weight being designed with larger engines. Finally, it also seems that origin "3" makes cars with slightly better gas mileage than origin "2" and again 2 makes cars with better mpg than origin "1". I can't find it in the text, but I assume origin 3 is Japan, 2 is Europe, and 1 is US, just based on my own personal bias about society. Well, I pretty much just answered that. The year is a great predictor:
it appears we will likely continue to improve mpg slowly and in a
linear fashion with time. There is a non-linear relationship that gives
a strong mpg response as weight/displacement/horsepower decrease, so
it's quite clear that these are a strong predictor of mpg. There's also
a relationship with cylinders, but again, this is really just part of
the trend of vehicles with more weight being designed with larger
engines. Finally, it also seems that origin "3" makes cars with
slightly better gas mileage than origin "2" and again 2 makes cars with
better mpg than origin "1". I can't find it in the text, but I assume
origin 3 is Japan, 2 is Europe, and 1 is US, just based on my own
personal bias about society.

View File

@ -1,3 +1,9 @@
https://cran.r-project.org/web/packages/corrplot/vignettes/corrplot-intro.html
https://rpubs.com/toleafar/210620
https://www.r-bloggers.com/using-apply-sapply-lapply-in-r/
1. (a) 1. (a)
To test the quality of a regression fit use mean squared error. To test the quality of a regression fit use mean squared error.