Suppose that you want to build a regression model that predicts the price of cars using a data set named cars.
Q1. Per the scatter plot and the computed correlation coefficient, describe relationships between the two variables - price and weight.
as wieght goes up price increases respectivly
Make sure to interpret the direction and the magnitude of the relationship. In addition, keep in mind that correlation (or regression) coefficients do not show causation but only association.
Create scatterplots 
Interpretation
- There is a strong (the coefficient’s absolute value > 0.5) positive (its sign) association between weight and height.
Run a regression model for price with one explanatory variable, weight, and answer Q2 through Q5.
Q2. Is the coefficient of weight statistically significant at 5%? Interpret the coefficient.
no because at the coeficiant there is no Signif code attributed to the 0.05 value, the coeficants signif code of *** indicate it is only signifigant at 0%
Q3. What price does the model predict for a car that weighs 4000 pounds?
Hint: Check the units of the variables in the openintro manual. the model pridicts that the price for a 4000lb car would be around $47,000
Q4. What is the reported residual standard error? What does it mean?
the reported risidual standard error is 5.169 this is the estimated amount the model could be off by, The typical difference between the actual weight and the weight predicted by the model is about 5.1 kg. In other words, the model estimated weight misses the actual weight by about 5.1 kg.
Q5. What is the reported adjusted R squared? What does it mean?
the reported adjusted r squared is 0.5666 this means The R^2 of 0.5666 means that 56% of the variability in weight can be explained by height.
Run a second regression model for price with two explanatory variables: weight and passengers, and answer Q6.
Q6. Which of the two models better fits the data? Discuss your answer by comparing the residual standard error and the adjusted R squared between the two models.
i woukd say the standard risidual error better fits since it has a lower value than the adjusted R squared
Build regression model
Interpretation
- significance of coefficients *** at the end of the coefficient of height indicates that the coefficient is significant at 0.1% signficance level (low p-values). In other words, changes in the height are highly likely meaningful in explaining changes in the weight. The same can be said for the y-intercept.
- coefficient of height An one-centimeter increase in the height of a person is associated with an increase of 1.018 kg in the weight.
- intercept When a person is 0 centimeter tall, his/her weight is -105.011 kg. Obviously, the intercept is meaningless in this case.
- residual standard error The typical difference between the actual weight and the weight predicted by the model is about 9.3 kg. In other words, the model estimated weight misses the actual weight by about 9.3 kg.
- Adjusted R-squared The R^2 of 0.5136 means that 51.36% of the variability in weight can be explained by height.
- Making predictions Ben is predicted to be 81 Kg based on his his height while his actual weight is 74.8 kg. The model overestimated Ben’s weight 6.2 kg.