data<-read.csv("https://raw.githubusercontent.com/tmatis12/datafiles/main/US_Japanese_Cars.csv")
Uscars<-(data$USCars)
Japcars<-(data$JapaneseCars)
Japcars<-data[1:28,2]
qqnorm(Japcars)
qqline(Japcars)

qqnorm(Uscars)
qqline(Uscars)

?boxplot
boxplot(Uscars,Japcars, main= "Boxplot of MPG (Untransformed)", col = c("blue", "red"), names=c("US", "Japanese")) 

log_Uscars<-log(Uscars)
log_Japcars<-log(Japcars)
qqnorm(log_Japcars)
qqline(log_Japcars)

qqnorm(log_Uscars)
qqline(log_Uscars)

boxplot(log_Uscars,log_Japcars, main= "Boxplot of MPG (Transformed)", col= c("blue","red"),names=c("US","Japanese"))

?t.test
t.test(log_Uscars,log_Japcars, alternative = "less", var.equal=TRUE)
## 
##  Two Sample t-test
## 
## data:  log_Uscars and log_Japcars
## t = -9.4828, df = 61, p-value = 6.528e-14
## alternative hypothesis: true difference in means is less than 0
## 95 percent confidence interval:
##        -Inf -0.4366143
## sample estimates:
## mean of x mean of y 
##  2.741001  3.270957

1 Description of the data:

The Plots look normal for the Japanse cars for the untransformed and the US cars does not look normal but the tranformed plots for both look normal.

For the t-test, since the value of p is very less than the alpha=0.05 so we reject the H0 hypothesis of equal mean and we deduce that the alternative is true.

2 Complete R Code

data<-read.csv("https://raw.githubusercontent.com/tmatis12/datafiles/main/US_Japanese_Cars.csv")
Uscars<-(data$USCars)
Japcars<-(data$JapaneseCars)
Japcars<-data[1:28,2]
qqnorm(Japcars)
qqline(Japcars)
qqnorm(Uscars)
qqline(Uscars)
?boxplot
boxplot(Uscars,Japcars, main= "Boxplot of MPG (Untransformed)", col = c("blue", "red"), names=c("US", "Japanese")) 
log_Uscars<-log(Uscars)
log_Japcars<-log(Japcars)
qqnorm(log_Japcars)
qqline(log_Japcars)
qqnorm(log_Uscars)
qqline(log_Uscars)
boxplot(log_Uscars,log_Japcars, main= "Boxplot of MPG (Transformed)", col= c("blue","red"),names=c("US","Japanese"))
?t.test
t.test(log_Uscars,log_Japcars, alternative = "less", var.equal=TRUE)