Use the Mireault and Bond (1992)’s data from the first lab session (mireault.xlsx. See the data description in the conference 1 material) on parental death during childhood that includes psychological and perceived vulnerability measures.
Since the anxiety score (anxiety_t) is standardized to the population mean, we know that the average anxiety level of the general population is 50. Follow the steps below to perform a hypothesis test of whether the mean anxiety level of young adults who lost their parents is higher than 50 using a one-sided α=0.05.
Define the outcome and population parameter of interest.
We are not making any distributional assumptions about the population, instead we are interested in the median anxiety level of the general population.
State the null hypothesis and alternative hypothesis.
\(H_0\): the median anxiety level
<= 50
\(H_1\): the median anxiety level >
50
Estimate the mean anxiety score and corresponding 95% confidence interval.
If we’re not making distributional assumptions about the data, there’s no good way to calculate a confidence interval.
library("readxl")
x = read_xlsx("mireault.xlsx")
summary(x$anxiety_t)
## Min. 1st Qu. Median Mean 3rd Qu. Max. NA's
## 38.00 55.00 60.00 60.15 68.00 80.00 6
m1 = median(x$anxiety_t, na.rm=T)
hist(x$anxiety_t)
The median of the sample is 60.
Perform a statistical test of the hypothesis, check any relevant assumptions, and report the p-value.
We’re going to use the one sample Wilcoxen Rank Sum test to test the hypothesis that the median is greater that the proposed value. The assumptions for one sample test is that the data should be symmetric about its center. The histogram plotted above does not suggest skewness and the assumption seem reasonable.
res = wilcox.test(x$anxiety_t, mu=50, alternative="greater")
res
##
## Wilcoxon signed rank test with continuity correction
##
## data: x$anxiety_t
## V = 65528, p-value < 2.2e-16
## alternative hypothesis: true location is greater than 50
The p-value is 1.7125206^{-47}.
Write a brief conclusion based on your results.
The p-value from the one sample Wilcoxen Rank Sum Test is far below the significance level 0.05. We reject the null in favor of the alternative and conclude that the median anxiety level is higher than 50.