Team Name
Rahul Lamba
Robert Adams
cardat<-read.csv("https://raw.githubusercontent.com/tmatis12/datafiles/main/US_Japanese_Cars.csv")
uscarmpg<-cardat$USCars
japancarmpg<-cardat$JapaneseCars
str(cardat)
## 'data.frame': 35 obs. of 2 variables:
## $ USCars : int 18 15 18 16 17 15 14 14 14 15 ...
## $ JapaneseCars: int 24 27 27 25 31 35 24 19 28 23 ...
US Car
qqnorm(uscarmpg)
qqline(uscarmpg)
Japan Car
qqnorm(japancarmpg)
qqline(japancarmpg)
boxplot(uscarmpg,japancarmpg,names=c('uscar','japancar'),main='Boxplot of Cars',ylab='Mpg')
Comment
Variance does not appear to be constant.
tranuscarmpg<-log(uscarmpg)
tranjapancarmpg<-log(japancarmpg)
boxplot(tranuscarmpg,tranjapancarmpg,names=c('uscar','japancar'),main='Boxplot of Cars',ylab='Mpg')
US Car
qqnorm(tranuscarmpg)
qqline(tranuscarmpg)
Japan Car
qqnorm(tranjapancarmpg)
qqline(tranjapancarmpg)
Comment
There in no significant change in transformed data, so data is not fit for T Test.
Null Hypotheses: \[H_{0}:\mu US car = \mu Japan Cae \]
\[ H_{0}: \mu US Car - \mu Japan Car = 0 \]
Alternative Hypotheses :\[H_{a}: \mu US Car \neq \mu Japan Car \]
\[ H_{a}: \mu US Car - \mu Japan Car \neq 0 \]
t.test(tranuscarmpg,tranjapancarmpg,var.equal=TRUE, alternative = "two.sided")
##
## Two Sample t-test
##
## data: tranuscarmpg and tranjapancarmpg
## t = -9.4828, df = 61, p-value = 1.306e-13
## alternative hypothesis: true difference in means is not equal to 0
## 95 percent confidence interval:
## -0.6417062 -0.4182053
## sample estimates:
## mean of x mean of y
## 2.741001 3.270957
What are the sample averages for the log of the mpg of US and Japanese cars?
US Car Average 2.74 MPG
State your conclusions
As Shown in early Box Plot of Data, there variance is not equal so there is no significant of performing Pooled Variance T Test.
We are going to fail reject Null Hypothesis that mean we select Null Hypothesis.