(Statistical Sleuth) - The textbook requires to use R studio. I will appreciate
ID: 3203309 • Letter: #
Question
(Statistical Sleuth) - The textbook requires to use R studio.
I will appreciate if you provide R code.
* Researchers studied 15 pairs of identical twins where only one twin was schizophrenic (‘Affected’). They measured the volume of the left hippocampus region of each twin’s brain. This data is available as ‘case0202’ in the ‘Sleuth3’ library.
1. Is this paired data or two independent samples? Explain.
2. Use the ‘t.test()’ function in R to find 90%, 95%, and 99% confidence intervals for the difference in mean left hippocampus volume (Unaffected – Affected). Report each interval.
3. Would a null hypothesis that the mean difference in volume is 0.35 cm3 be rejected at level = 0.1 vs. the alternative that the mean difference in volume is not 0.35 cm3? What about at level = 0.05? What about at level = 0.01? (You should be able to answer this using your results from part b. without doing any more computations.)
Explanation / Answer
This is an independent sample t test as 15 pairs of twins would have 30 people , where each group is different
There is no data provided in the question However , i shall show you how to conduct the t test in R , you can replace the data with any other dataset . The complete R snippet is as follows
set.seed(1234)
x<- runif(10,1,10)
y<- runif(10,1,7)
# 95% CI
t.test(x,y,conf.level = 0.95)
# 90% CI
t.test(x,y,conf.level = 0.90)
# 99% CI
t.test(x,y,conf.level = 0.99)
The results are
> t.test(x,y,conf.level = 0.95)
Welch Two Sample t-test
data: x and y
t = 1.7849, df = 15.629, p-value = 0.0937
alternative hypothesis: true difference in means is not equal to 0
95 percent confidence interval:
-0.318316 3.668787
sample estimates:
mean of x mean of y
5.403038 3.727802
>
> # 90% CI
> t.test(x,y,conf.level = 0.90)
Welch Two Sample t-test
data: x and y
t = 1.7849, df = 15.629, p-value = 0.0937
alternative hypothesis: true difference in means is not equal to 0
90 percent confidence interval:
0.03419125 3.31627929
sample estimates:
mean of x mean of y
5.403038 3.727802
>
> # 99% CI
> t.test(x,y,conf.level = 0.99)
Welch Two Sample t-test
data: x and y
t = 1.7849, df = 15.629, p-value = 0.0937
alternative hypothesis: true difference in means is not equal to 0
99 percent confidence interval:
-1.074785 4.425255
sample estimates:
mean of x mean of y
5.403038 3.727802
Now the thumb rule to reject or accept a null hypothesis is to check for the p value and then compare it with the alpha , if the p value is less than alpha level then you can reject the null hypothesis in favor of alternate hypothesis , if it is greater than alpha then you cant reject the null hypothesis
eg
data: x and y
t = 1.7849, df = 15.629, p-value = 0.0937
the p value is 0.09 which is not less than 0.05 alpha , hence you would fail to reject the null hypothesis , but if the same results are compared at alpha=0.1 , you might reject the null hypothesis as 0.09 is less than 0.1
Hope this helps !!
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.