Hypothesis:

There is no difference in average tire tread depth (TIRETREAD) between top tire manufacturers (TIREMANUF) and all other manufacturers.

1) Load CSV

tire_data <- read.csv("tire_data.csv")
#remove missing data
clean_data <- subset(tire_data, TIRETREAD < 90)
summary(tire_data)
##   source_file        CASEID             PSU            CASENO      
##  Min.   :1.000   Min.   :  20282   Min.   :10.00   Min.   :  1.00  
##  1st Qu.:2.000   1st Qu.:  25329   1st Qu.:18.00   1st Qu.: 34.00  
##  Median :3.000   Median :  30301   Median :26.00   Median : 68.00  
##  Mean   :2.745   Mean   : 882262   Mean   :34.07   Mean   : 73.96  
##  3rd Qu.:4.000   3rd Qu.:2401844   3rd Qu.:52.00   3rd Qu.:106.00  
##  Max.   :4.000   Max.   :2406391   Max.   :82.00   Max.   :259.00  
##      CASENUMBER       CATEGORY          VEHNO           TIRELOC     
##  Length   :76640   Min.   : 1.000   Min.   :1.00   Length   :76640  
##  N.unique :14409   1st Qu.: 3.000   1st Qu.:1.00   N.unique :    4  
##  N.blank  :    0   Median : 4.000   Median :1.00   N.blank  :    0  
##  Min.nchar:   16   Mean   : 5.096   Mean   :1.41   Min.nchar:    2  
##  Max.nchar:   17   3rd Qu.: 7.000   3rd Qu.:2.00   Max.nchar:    2  
##                    Max.   :22.000   Max.   :7.00                    
##    TIREMANUF         TIREMODEL          TIRESIZE          TIRETIN     
##  Min.   :  1.0   Length   :76640   Length   :76640   Length   :76640  
##  1st Qu.: 59.0   N.unique : 7536   N.unique :  610   N.unique :34699  
##  Median :103.0   N.blank  :    0   N.blank  :    0   N.blank  :    0  
##  Mean   :277.7   Min.nchar:    2   Min.nchar:    7   Min.nchar:    4  
##  3rd Qu.:201.0   Max.nchar:   39   Max.nchar:   14   Max.nchar:   13  
##  Max.   :999.0                                                        
##    TIRETREAD       TIRERESTR      TIRESIZETYPE     CASEWGT         
##  Min.   : 0.00   Min.   :0.000   Min.   :1.00   Min.   :    4.139  
##  1st Qu.: 5.00   1st Qu.:0.000   1st Qu.:1.00   1st Qu.:   66.294  
##  Median : 6.00   Median :0.000   Median :1.00   Median :  164.057  
##  Mean   :21.04   Mean   :0.451   Mean   :2.18   Mean   :  617.972  
##  3rd Qu.: 9.00   3rd Qu.:0.000   3rd Qu.:1.00   3rd Qu.:  455.966  
##  Max.   :99.00   Max.   :9.000   Max.   :9.00   Max.   :24230.454  
##     PSUSTRAT         VERSION     
##  Min.   : 1.000   Min.   :6.000  
##  1st Qu.: 4.000   1st Qu.:7.000  
##  Median : 7.000   Median :8.000  
##  Mean   : 6.645   Mean   :7.745  
##  3rd Qu.: 9.000   3rd Qu.:9.000  
##  Max.   :12.000   Max.   :9.000

Boxplot of Tire Tread Depth vs Tire Location

boxplot(TIRETREAD ~ TIRELOC, data = clean_data,
        main = "Tire Tread Depth by Tire Location",
        xlab = "Tire Location (LF, RF, LR, RR)",
        ylab = "Tire Tread Depth")

Explanation: The tread depth distributions across all four tire positions look nearly identical, indicating that tire location alone does not create a dramatic difference in median tread depth across this dataset.

2) Statistical Calculations:

Separate tread depth into Top Manufacturer (70) vs. Other Manufacturers

70 is the the numerical manufacturing code for specific tires. It is the most common frequently occuring manufacturer in my dataset.

top_manuf <- subset(clean_data, TIREMANUF == 70)$TIRETREAD
other_manuf <- subset(clean_data, TIREMANUF != 70)$TIRETREAD

Mean and Standard Deviation calculations

mean_top <- mean(top_manuf)
sd_top <- sd(top_manuf)

mean_other <- mean(other_manuf)
sd_other <- sd(other_manuf)

Simple barplot comparing means

means_vector <- c(mean_top, mean_other)
barplot(means_vector,
        names.arg = c("Top Manufacturer", "Others"),
        main = "Average Tire Tread Depth by Manufacturer Group",
        ylab = "Mean Tread Depth")

Explanation: The top manufacturer group has a slightly higher average tread depth (6.21) than all other manufacturers (6.09). This small mean difference of 0.12 units suggests similar average wear levels between the two groups.

3) Test 1:

Correlation test between Tire Size Type and Tire Tread Depth

cor.test(clean_data$TIRESIZETYPE, clean_data$TIRETREAD)
## 
##  Pearson's product-moment correlation
## 
## data:  clean_data$TIRESIZETYPE and clean_data$TIRETREAD
## t = 27.864, df = 64317, p-value < 2.2e-16
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  0.1015704 0.1168425
## sample estimates:
##       cor 
## 0.1092129

Linear Regression Model

model <- lm(TIRETREAD ~ TIRESIZETYPE, data = clean_data)
model_summary <- summary(model)
model_summary
## 
## Call:
## lm(formula = TIRETREAD ~ TIRESIZETYPE, data = clean_data)
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -9.3939 -2.0533 -0.0533  0.9467 16.9467 
## 
## Coefficients:
##              Estimate Std. Error t value Pr(>|t|)    
## (Intercept)   5.63575    0.01950  289.06   <2e-16 ***
## TIRESIZETYPE  0.41757    0.01499   27.86   <2e-16 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 2.462 on 64317 degrees of freedom
## Multiple R-squared:  0.01193,    Adjusted R-squared:  0.01191 
## F-statistic: 776.4 on 1 and 64317 DF,  p-value: < 2.2e-16

Extract R-squared and p-value

r_squared <- model_summary$r.squared
p_val <- model_summary$coefficients[2, 4]

cat("R-squared:", r_squared, "\n")
## R-squared: 0.01192746
cat("p-value:", p_val, "\n")
## p-value: 7.50917e-170

Scatter plot with fitted regression line

plot(clean_data$TIRESIZETYPE, clean_data$TIRETREAD,
     main = "Regression: Tire Tread Depth by Tire Size Type",
     xlab = "Tire Size Type",
     ylab = "Tire Tread Depth",
     )

Explanation: Although the p-value is extremely small because the dataset is so large (indicating a statistically significant relationship), the R^2 value is very close to zero (0.0119). This shows that tire size type alone does not practically explain or predict tire tread depth.

Test 2:

Plot histogram of numerical column TIRETREAD

hist(clean_data$TIRETREAD,
     main = "Histogram of Tire Tread Depth",
     xlab = "Tire Tread Depth",
     ylab = "Frequency",
    )

Explanation: The histogram shows a right-skewed distribution for tire tread depth (TIRETREAD). Most recorded values cluster heavily around typical wear levels between 4 and 8, with fewer instances extending toward higher values.

5) T.Test:

Divide data into two groups based on Manufacturer (Top vs Other)

group_top <- subset(clean_data, TIREMANUF == 70)$TIRETREAD
group_other <- subset(clean_data, TIREMANUF != 70)$TIRETREAD

Apply two-sample t-test

t_test_result <- t.test(group_top, group_other)
t_test_result
## 
##  Welch Two Sample t-test
## 
## data:  group_top and group_other
## t = 3.4621, df = 8617.9, p-value = 0.0005385
## alternative hypothesis: true difference in means is not equal to 0
## 95 percent confidence interval:
##  0.04835913 0.17459278
## sample estimates:
## mean of x mean of y 
##  6.206326  6.094850

Explanation of Results: Even though the practical difference in tread depth is small (6.21 vs 6.09), the dataset’s large sample size gives the test high statistical power to confirm that the minor difference between manufacturer groups is statistically significant rather than being random.