df<- read.csv("https://raw.githubusercontent.com/tmatis12/datafiles/main/US_Japanese_Cars.csv")
Generally, for the central limit theorem to be applied, there should be between 30-40 samples of data. The first population has 35 samples, so the central limit theorem holds. However, the second population has 28 samples, which is slightly less than the recommended number of samples. But, this is not a significant deviation, so the central limit theorem should still hold in this second case
USCars<- df[,1]
JapaneseCars<- df[1:28,2]
qqnorm(USCars, main = "Normal Q-Q Plot of US Cars")
qqnorm(JapaneseCars,main = "Normal Q-Q Plot of Japanese Cars")
boxplot(USCars, JapaneseCars, main ="US Cars vs. Japanese Cars Box Plots" ,names=c("US Cars","Japanese Cars"))
USCars <- log(USCars)
JapaneseCars <- log(JapaneseCars)
qqnorm(USCars, main = "Normal Q-Q Plot of US Cars")
qqnorm(JapaneseCars,main = "Normal Q-Q Plot of Japanese Cars")
boxplot(USCars, JapaneseCars, main ="US Cars vs. Japanese Cars Box Plots" ,names=c("US Cars","Japanese Cars"))
t.test(USCars,JapaneseCars,var.equal=TRUE,alternative="less")
##
## Two Sample t-test
##
## data: USCars and JapaneseCars
## 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
# All R code used in document
df<- read.csv("https://raw.githubusercontent.com/tmatis12/datafiles/main/US_Japanese_Cars.csv")
USCars<- df[,1]
JapaneseCars<- df[1:28,2]
qqnorm(USCars, main = "Normal Q-Q Plot of US Cars")
qqnorm(JapaneseCars,main = "Normal Q-Q Plot of Japanese Cars")
boxplot(USCars, JapaneseCars, main ="US Cars vs. Japanese Cars Box Plots" ,names=c("US Cars","Japanese Cars"))
USCars <- log(USCars)
JapaneseCars <- log(JapaneseCars)
qqnorm(USCars, main = "Normal Q-Q Plot of US Cars")
qqnorm(JapaneseCars,main = "Normal Q-Q Plot of Japanese Cars")
boxplot(USCars, JapaneseCars, main ="US Cars vs. Japanese Cars Box Plots" ,names=c("US Cars","Japanese Cars"))
t.test(USCars,JapaneseCars,var.equal=TRUE,alternative="less")
head(df)