Ex 1. Is the hippocampal volume of healthy males greater than 6 cm\(^3\)? (Done)
Ex 2. Is the proportion of healthy adults with a right hippocampal volume > 3cm\(^3\) equal to 50%? (can be done by using the method for testing a proportion: z-test)
Ex 3. Do healthy men and women have the same mean left hippocampal volume?
Ex 4. Is the left hippocampal volume equal to the right hippocampal volume in humans?
Ex 5. Is having a large hippocampus (> 7 cm\(^3\)) associated with gender?
Ex 6. Is hippocampal volume correlated with age in healthy adults?
Ex 7. Does left hippocampal volume differ across diagnostic groups?
EXAMPLE 3: Two-Sample t-test
Ex 3. Do healthy men and women have the same mean left hippocampal volume?
Categorical (gender) and Numerical (Left Hippocampus) :
Side by Side Boxplot
Side by Side Violin
2 Histograms
Example 3: Visualization – boxplot
Code
ggplot(data= alzheimer_healthy,mapping=aes(x= female, y=lhippo,fill=female)) +geom_boxplot()+labs(title="Boxplot of lhippo by Gender",x="Gender",y="LHippo volume (cm^3)") +theme_minimal()
Example 3: Visualization – violin
Code
ggplot(data= alzheimer_healthy,mapping=aes(x= female, y=lhippo,fill=female)) +geom_violin()+labs(title="Violin of lhippo by Gender",x="Gender",y="LHippo volume (cm^3)") +theme_minimal()
Example 3: Visualization – histogram
Code
ggplot(data= alzheimer_healthy,mapping=aes(x=lhippo,fill=female)) +geom_histogram(bins=35)+labs(title="Histogram of Lhippo by Gender",x="LHippo volume (cm^3)",y="Count")
Welch Two Sample t-test
data: alzheimer_healthy$lhippo[alzheimer_healthy$female == 0] and alzheimer_healthy$lhippo[alzheimer_healthy$female == 1]
t = 11.756, df = 971.28, p-value < 2.2e-16
alternative hypothesis: true difference in means is not equal to 0
95 percent confidence interval:
0.2088777 0.2925882
sample estimates:
mean of x mean of y
3.345749 3.095016
Code
#alternative way to do the same testt.test(alzheimer_healthy$lhippo ~ alzheimer_healthy$female)
Welch Two Sample t-test
data: alzheimer_healthy$lhippo by alzheimer_healthy$female
t = 11.756, df = 971.28, p-value < 2.2e-16
alternative hypothesis: true difference in means between group 0 and group 1 is not equal to 0
95 percent confidence interval:
0.2088777 0.2925882
sample estimates:
mean in group 0 mean in group 1
3.345749 3.095016
Example 4
Research Question: Is the left hippocampal volume equal to the right hippocampal volume in humans?
Null Hypothesis: Human’s left hippocampus volume is the same as the right hippocampus volume.
Alternative Hypothesis: Human’s left hippocampus volume is not the same as the right hippocampus volume.
\[H_0: \mu_L = \mu_R \mbox{ vs } \mu_L \not= \mu_R\]
Method: paired t-test
Example 4
It is attempting to perform a two-sample t-test
However, one fundamental assumption in the two-sample problem is that the two samples should be independent, such as the female group vs the male group.
Here we are looking at two features (left vs right hippocampus) of the same subjects. The correct test is
paired t-test, which equivalent to perform a one-sample t-test using the differences
Paired t-test
data: alzheimer_data$rhippo and alzheimer_data$lhippo
t = 17, df = 2699, p-value < 2.2e-16
alternative hypothesis: true mean difference is not equal to 0
95 percent confidence interval:
0.07008463 0.08836085
sample estimates:
mean difference
0.07922274
One Sample t-test
data: alzheimer_data$rhippo - alzheimer_data$lhippo
t = 17, df = 2699, p-value < 2.2e-16
alternative hypothesis: true mean is not equal to 0
95 percent confidence interval:
0.07008463 0.08836085
sample estimates:
mean of x
0.07922274
Example 5
Research Question: Is having a large hippocampus (> 7 cm\(^3\)) associated with gender?
This is a category variable vs category variable problem