Skip to content

benpeyton76/MechaCar_Statistical_Analysis

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 

Repository files navigation

MechaCar Statistical Analysis

Linear Regression to Predict MPG:

Deliverable_1

1. Which variables/coefficients provided a non-random amount of variance to the mpg values in the dataset?

  • The p-value should be measured at 0.05 due to the confidence level being set at 0.95. If any coefficients are greater than or equal to 0.05 then the variable is deemed to be a non-random amount of variance. If one of the coefficients are less than 0.05, they are considered to be random. As shown above, the variables that appear to be non-random are vehicle_length (2.60e-12) and ground_clearance (5.21e-08). The other coefficients: vehicle_weight (0.0776), spoiler_angle (0.3069) and AWD (0.1852) have p-values greater than 0.05, therefore they are considered to be random.

2. Is the slope of the linear model considered to be zero? Why or why not?

  • The slope of the linear model is considered to be non-zero because no coefficients are equal to zero.

Deliverable 1

3. Does this linear model predict mpg of MechaCar prototypes effectively? Why or why not?

  • This linear model effectively predicts the MPG of MechaCar's prototypes. The model has an r-squared value of 0.7149, which means that the prediction of this model can be determined approximately 72% of the time.

Screen Shot 2021-12-23 at 2 49 40 PM

Summary Statistics on Suspension Coils:

Total Summary:

Deliverable 2a

The variance of PSI (Var_PSI) column of the total_summary dataframes, shows that the suspension coils' design specifications (maximum 100psi) have been met. Total variance of the manufactoring lot is 62.2936. However:

Lot Summary:

Deliverable 2b

Based on the lot_summary dataframe, individual lots 1 and 2 meet specifications with their variance being 0.9796 and 7.469 respectively. Lot 3 did not because the variance = 170.286.

T-Tests on Suspension Coils:

T-Test for All Lots:

Deliverable 3a

The t-test for all lots population mean (mu) = 1500. P-value is 1.0 which is greater than 0.05. The mean falls within the 95 percentile and its distribution is normal.

T-Test for Individual Lots 1-3:

Deliverable 3b

Lot 1, with mu = 1500 and p-value = 1.0, falls within the 95 percentile and has normal distribution.

Lot 2, with mu = 1500 and p-value = 0.6072, falls within the 95 percentile and has normal distribution.

Lot 3, with mu = 1500 and p-value = 0.04168, falls within the 95 perentile, however since 0.04168<0.05, it does not have normal distribution.

All lots, and lots 1 and 2 both show normal distribution and falls within the 95 percentile. Because of their simularities in mean (Lot 1 = 1500, Lot 2 = 1500.2) there is not enough evidence to reject the null hypothesis.

Study Design: MechaCar vs Competition:

Other metrics can be considered when stacking MechaCar against its competitors. Variables such as maintenace cost, highway fuel efficiency, engine size, model, and horsepower.

1. What metric or metrics are you going to test?

Because general costs of owning and maintaning a car is important to a potential client, using the maintenance cost, highway fuel efficiency, engine size, MPG and horsepower metrics would be ideal to use.

2. What is the null hypothesis or alternative hypothesis?

The null hypothesis is that the mean of general costs of car ownership has an annual cost of 500 per year. The alternative hypothesis is that general costs of car ownershipt does not equal 500 per year. Based on MechaCar and its competition.

3. What statistical test would you use to test the hypothesis? And why?

A multipule linear regression statistial summary would show the metrics would affect total annual cost of owning a MechaCar vehicle vs the competitors.

4. What data is needed to run the statistical test?

Data from the tested metrics would be needed for all vehicles that were included in the study.

About

Introduction to the R programming language.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages