In: Statistics and Probability
andom samples of resting heart rates are taken from two groups. Population 1 exercises regularly, and Population 2 does not. The data from these two samples is given below:
Population 1: 68, 73, 71, 72, 64, 70, 68
Population 2: 74, 82, 81, 72, 76, 75, 75, 72
Is there evidence, at an α=0.05 level of significance, to conclude that there those who exercise regularly have lower resting heart rates? (Use the conservative method for computing degrees of freedom). Carry out an appropriate hypothesis test, filling in the information requested.
A. The value of the standardized test statistic:
B. The p-value is
C. Your decision for
the hypothesis test:
A. Do Not Reject H1H1.
B. Do Not Reject H0H0.
C. Reject H1H1.
D. Reject H0H0.
Solution:
Ho:mu1=mu2
Ha:mu1<mu2
alpha=0.05
use R studio software
create vectors population 1 and population 2
use t.test function in R to get t stat and p value
Rcode is;
Population_1 <- c( 68, 73, 71, 72, 64, 70, 68)
Population_2 <- c(74, 82, 81, 72, 76, 75, 75, 72)
t.test(Population_1,Population_2,alternative = "less")
Output:
Welch Two Sample t-test
data: Population_1 and Population_2
t = -3.666, df = 12.945, p-value = 0.001434
alternative hypothesis: true difference in means is less than
0
95 percent confidence interval:
-Inf -3.331311
sample estimates:
mean of x mean of y
69.42857 75.87500
From output
A. The value of the standardized test statistic:
t=-3.666
B. The p-value is
p= 0.001434
C. Your decision for the hypothesis test:
p<alpha
alpha=0.05
p-value = 0.001434
p<alpha
Reject Ho.