Skip to content

This project uses R for a statistical analysis of car data to predict performance using multiple metrics

Notifications You must be signed in to change notification settings

JeffZimmerman/MechaCar_Statistical_Analysis

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 

Repository files navigation

MechaCar_Statistical_Analysis

Linear Regression to Predict MPG

The analysis draws on test results for 50 prototype MechaCars to identify factors that predict vehicle performance measured in mpg. Multiple metrics were considered, including vehicle length, vehicle weight, spoiler angle, drivetrain, and ground clearance.

  • Two variables provide a non-random amount of variance to the mpg values in the dataset: vehicle length and ground clearance.
  • The slope of the linear model is not considered to be zero. The p-value of 5.35e-11 is much smaller than the significance level, leading to a rejection of the null hypothesis.
  • The linear model predicts the mpg of prototypes effectively. The r-squared is 0.715, meaning there is a roughly 72% chance that future predictions will fit this model.

Output from the linear regression:

Screen Shot 2022-02-05 at 9 02 59 PM

Summary Statistics on Suspension Coils

The design specifications for the MechaCar suspension coils dictate that the variance of the suspension coils must not exceed 100 pounds per square inch.

  • The variance for all manufacturing lots in total is 62.3 PSI, which is not negligable but does meet the specifications.
  • Examining individual lots shows that Lot 3 exceeds the limit, at 170.3 PSI, while Lot 1 has a variance of only 1 PSI, and Lot 2 has a variance of 7.5 PSI. As both Lot 1 and Lot 2 easily meet the specifications, the failure of Lot 3 explains the relatively high variance of all manufacturing lots in total.

Total Summary:

Screen Shot 2022-02-05 at 9 40 08 PM

Lot Summary:

Screen Shot 2022-02-05 at 9 41 06 PM

T-Tests on Suspension Coils

The analysis draws on t-tests of all manufacturing lots and each lot individually to see if they are statistically different from the population mean of 1,500 pounds per square inch.

  • The p-value for all lots was 0.06, indicating not enough statistical difference from the population mean to reject the null hypothesis.
  • Similarly, Lot 1 had a p-value of 1, and lot 2 had a p-value of 0.60, so neither is statistically different.
  • Only lot 3 showed statistical difference from the population mean, with a p-value of 0.04.

T-Test for all manufacturing lots:

Screen Shot 2022-02-05 at 10 04 51 PM

T-Test for lot 1:

Screen Shot 2022-02-05 at 10 07 12 PM

T-Test for lot 2:

Screen Shot 2022-02-05 at 10 07 30 PM

T-Test for lot 3:

Screen Shot 2022-02-05 at 10 07 52 PM

Study Design: MechaCar vs. Competition

The success of MechaCar depends on its performance against competitors, and since consumers are interested in a package of variables in choosing one car over another, further study could benefit from an ANOVA test. This will potentially provide insight as to whether there is a statistical difference between the distribution means from multiple samples.

Considering a specific type of consumer means that certain metrics will be more prominent in their decision-making process. For a young family with children living in an urban area, the most important metrics might be city fuel efficiency, maintenance cost, and safety rating.

The null hypothesis is that MechaCar will not score significantly differently from competitors in these categories. If the alternative hypothesis is true, the study will be able to identify where MechaCar scores significantly worse than the competition, and thus suggest areas needing improvement, or areas where MechaCar outpaces the competition that could be the basis for a new advertising campaign touting these advantages.

About

This project uses R for a statistical analysis of car data to predict performance using multiple metrics

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages