In: Statistics and Probability
In a experiment on relaxation techniques, subject's brain signals were measured before and after the relaxation exercises with the following results:
Person | 1 | 2 | 3 | 4 | 5 |
Before | 42.2 | 42.4 | 38.8 | 41.6 | 38.6 |
After | 44.2 | 40.9 | 40.8 | 35.3 | 33.5 |
Is there sufficient evidence to suggest that the relaxation exercise slowed the brain waves? Assume the population is normally distributed. Select the test statistic, p-value, Decision to Reject (RH0) or Failure to Reject (FRH0)].
Explain how to do using RStudio, please
Solution:
Here, we have to use paired t test. The null and alternative hypotheses are given as below:
Null hypothesis: H0: The relaxation exercise does not slow the brain waves.
Alternative hypothesis: Ha: The relaxation exercise slowed the brain waves.
H0: µd = 0 versus Ha: µd < 0
(Lower tailed or left tailed (one tailed) test)
Test statistic for paired t test is given as below:
t = (Dbar - µd)/[Sd/sqrt(n)]
Required R commands and output are given as below:
> x = c(42.2, 42.4, 38.8, 41.6, 38.6)
> y = c(44.2, 40.9, 40.8, 35.3, 33.5)
> t.test(y,x,paired = TRUE, alternative = "less")
Paired t-test
data: y and x
t = -1.0268, df = 4, p-value = 0.1813
alternative hypothesis: true difference in means is less than 0
95 percent confidence interval:
-Inf 1.915789
sample estimates:
mean of the differences
-1.78
We get P-value = 0.1813
We assume α = 0.05
P-value > α = 0.05
So, we do not reject the null hypothesis
There is insufficient evidence to conclude that the relaxation exercise slowed the brain waves.