A sample of 50 college students were asked how many exclusive relationships they’ve been in so far. The students in the sample had an average of 3.2 exclusive relationships, with a standard deviation of 1.74. In addition, the sample distribution was only slightly skewed to the right. Estimate the true average number of exclusive relationships based on this sample using a 95% confidence interval.
n=50
μ=3.2
sd=1.74
CI=.95
SE=sd/sqrt(n)
Z=round(qnorm(CI+(1-CI)/2),2)
estimate<-μ+c(-1,1)*Z*SE
print(round(estimate,1))
## [1] 2.7 3.7
Earlier we calculated a 95% confidence interval for the average number of exclusive relationships college students have been in to be (2.7, 3.7). Based on this confidence interval, do these data support the hypothesis that college students on average have been in more than 3 exclusive relationships.
Ho: μ=3
Ha: μ>3
n=50
μ=3.2
sd=1.74
CI=.95
SE=sd/sqrt(n)
Z=(μ-3)/SE
pvalue<-1-pnorm(Z)
print(round(pvalue,3))
## [1] 0.208
#Since pvalue is high, we do not reject Ho
#pvalue ≈ 0.21, bigger than .05