16 Linear Regression Practice
16.1 Your homework is to watch these videos which are posted under the linear regression header on Brightspace and then do the following homework:
16.2 Problems
Once you have watched these videos, and you can refer to them as often as you would like, please answer and do the following:
- Use linear regression to predict the weight of a woman who is 100 inches tall.
- Use linear regression to predict the height of the woman who weighs 200 pounds.
- Use linear regression to predict the height of a woman who weighs 5 pounds.
- Use linear regression to predict the weight of a woman who is 200 inches tall.
- Plot weight on the X axes and height on the y-axes and create a best fit line on your plot.
- Plot height on the y-axes and wait on the X axes and create a best fit line on your plot.
- Add a another column to the women dataframe called GPA which is these 15 numbers: 1.5,4,2,3.7,4,1, 3, 2.5, 3.8, 0.8, 2, 4, 1, 3, 2.
- Use GPA to predict height. Is GPA a significant predictor and how do you know? Draw a best fit line on this relationship.
- Use GPA to predict a weight. Is GPA a significant predictor and how do you know? Draw a bested line on this relationship, too.
- Predict the height of a person with a GPA of 4.0.
16.3 Multivariate Regression
I have posted a short video walking you through how to perform multiple linear regression – where you have more than one variable predicting another.
Using the data set mtcars data set:
- Which variable predicts miles per gallon better gear or qsec? How can you tell?
- Which two variables out of these four (qsec, vs, am, gear) together best predict miles per gallon?
- Using only the number of cylinders, displacement, and weight what would mpg you would you predict for a car with a displacement of 400 inches, eight cylinders, and weighing 2000 pounds?
- Be able to explain in a model which variables are significantly significant.
- Be able to explain what adjusted R squared means.