Skip to content

DylanSteinhauer/MechaCar_Statistical_Analysis

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 

Repository files navigation

MechaCar_Statistical_Analysis

Purpose

The goal of this challenge was to use R to discover which variables predict the MPG for vehicle prototypes, collect summary statistics on the PSI of suspension coils, determine if manufacturing lots are statistically different from the mean population, and finally design a study to compare the MechaCar performance against vehicles from other manufacturers.

Linear Regression to Predict MPG

Deliverable1
-The variables in our dataset that show a non-random effect on the MPG of the MechaCar are the Vehicle Length and the Ground Clearance. A linear regression model run on these variables against figures for MPG, resulted in p-values of 2.6x10-12 and 5.21x10-8, respectively. In addition, the intercept was also statistically significant.
-The slope of the linear model can not be considered zero as the p-value of 5.35x10-11 is lower than even an extreme level of significance. Because of this, the null hypothesis must be rejected. This means that the relationship between our variables and the miles per gallon is subject to more than random chance.
-Although there are other factors, this model does predict the mpg of the MechaCar prototype with relative effectiveness. The r-squared value of 0.7149 indicates that the model is 71% accurate.

Summary Statistics on Suspension Coils

total_summary
lot_summary
While the overall variance is under 100 psi and meets specifications, the variance for lot 3 is well over the threshold at 170.28.

T-Test Results

coil_T_test
A review of the results of the T-test for the suspension coils across all manufacturing lots shows that they are not statistically different from the population mean, and the p-value is not low enough (0.0603) for us to reject the null hypothesis.
T_tests
-The results of the T-test for the suspension coils for Lot 1 shows that they are not statistically different from the population mean, and the p-value is not low enough (1) for us to reject the null hypothesis.
-The results of the T-test for the suspension coils for Lot 2 shows that they are not statistically different from the population mean, and the p-value is not low enough (0.6072) for us to reject the null hypothesis.
-The results of the T-test for the suspension coils for Lot 3 shows that they are slightly statistically different from the population mean, and the p-value is low enough (0.0417) for us to reject the null hypothesis. This lot may be need to be evaluated.

Study Design: Mechacar vs Competition

Metrics

I would design a study that analyzes the safety rating of Mechacar vehicles against their competition. While factors such as fuel efficiency and horse power matter, safety is ultimately most important.

Null Hypothesis

MechaCar vehicles do not have statistically significant higher safety ratings than that of vehicles from other manufacturers.

Alternate Hypothesis

MechaCar vehicles do have statistically significant higher safety ratings than that of vehicles from other manufacturers.

Statistical Test

I would use a two-tailed T-test to perform this analysis. When using two-tailed T-tests, regardless of the direction of the relationship you hypothesize, you are testing for the possibility of the relationship in both directions.

Data

The data needed to run the statistical test is a table of MechaCar vehicles and their respective safety ratings, along with various other manufacturers and their safety ratings.

About

Perform linear regression and T-tests on vehicle data

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages