##PROBLEM 3
H0: mu=75
Ha: mu =/= 75
mu= 75 n= 10 population variance= 18 alpha= .05 X<-(65, 78, 88, 55, 48, 95, 66, 57, 79, 81)
X<-c(65, 78, 88, 55, 48, 95, 66, 57, 79, 81)
mean(X)
## [1] 71.2
(mean(X)-75)/(sqrt(18/10))
## [1] -2.832353
2*pnorm(-2.832353)
## [1] 0.004620681
Since the p-value of 0.0046 is less than our alpha level of 0.05, we reject the null hypothesis that the sample mean is the same as the population mean.
##PROBLEM 4
alpha=0.05 H0: mu = 45
Ha: mu =/= 45
d4 <- read.csv("C:/Users/kalis/Downloads/nlsy_HW4.csv")
t.test(d4$math9, mu=45)
##
## One Sample t-test
##
## data: d4$math9
## t = -3.7998, df = 199, p-value = 0.0001924
## alternative hypothesis: true mean is not equal to 45
## 95 percent confidence interval:
## 40.59502 43.60498
## sample estimates:
## mean of x
## 42.1
Since our p-value of 0.0002 is less than our alpha level of 0.05, we reject the null hypothesis that our sample mean math score is the same as the population mean math score.