Professional Documents
Culture Documents
Module 6
Module 6
3. Removing nulls.
Output:
4. Checking the structure of the dataset.
Output:
PART 1
5. Creating a dummy variable for transmission column
Output:
13. Regression analysis between max power and mileage for manual cars.
Output:
Interpretation:
The regression analysis suggests a statistically significant relationship between the
maximum power of cars and their mileage per kilometer per liter per kilogram
(mileage_km_ltr_kg) for manual transmission cars.
For manual transmission cars, as the maximum power increases by one unit, the
predicted mileage_km_ltr_kg decreases by approximately 0.0526 units, holding all
other variables constant.
The model explains approximately 11.17% of the variability in mileage_km_ltr_kg
for manual transmission cars.
The overall model is statistically significant (p < 0.001), indicating that the predictors
(maximum power) are useful for predicting mileage_km_ltr_kg in this subset of cars.
Interpretation:
The regression analysis suggests a statistically significant relationship between the
maximum power of cars and their mileage_km_ltr_kg for automatic transmission
cars.
For automatic transmission cars, as the maximum power increases by one unit, the
predicted mileage_km_ltr_kg decreases by approximately 0.0314 units, holding all
other variables constant.
The model explains approximately 16.54% of the variability in mileage_km_ltr_kg
for automatic transmission cars.
The overall model is statistically significant (p < 0.001), indicating that the predictors
(maximum power) are useful for predicting mileage_km_ltr_kg in this subset of cars.
Fig 4. Regression line and scatter plot for automatic transmission.
15. Difference between a multiple linear regression plot and a single linear
regression plot.
A single linear regression plot, there's only one predictor variable used to
predict the dependent variable.
Regression line represents the best-fit line that minimizes the overall distance
between the observed data points and the predicted values generated by the
regression model.
In a multiple linear regression plot, there are multiple predictor variables
(independent variables) included in the regression analysis to predict the
dependent variable.
It depicts the relationship between the observed values of the dependent
variable and the predicted values generated by the multiple regression model,
allowing assessment of the overall model fit.
The multiple regression model considers the combined effect of all predictor
variables on the dependent variable, potentially capturing more complex
relationships compared to single linear regression.
In summary, while single linear regression plots focus on the relationship between one
predictor and the dependent variable, multiple linear regression plots incorporate multiple
predictors and may visualize their individual or combined effects on the dependent variable.
CONCLUSION:
Both single and multiple linear regression analyses reveal statistically significant
relationships between maximum power and mileage for both manual and automatic
transmission cars.The amount of variability explained by the models is relatively low, with R-
squared values ranging from 11.17% to 16.54%. This suggests that other factors beyond
maximum power may also influence mileage. In total, both single and multiple linear
regression analyses indicate significant relationships between maximum power and mileage
for manual and automatic transmission cars. However, the models' explanatory power is
limited, suggesting that other factors may also influence mileage, warranting further
investigation.
CITATION:
1. Kabacoff, R. I. (2021). R in Action (3rd ed.). Manning Publications.
2. Bluman, A. G. (2021). Elementary Statistics: A Step by Step Approach (8th ed.).
McGraw-Hill Education.