The code chunk below reads in resting heart rate data that was
collected from a sample of Gustavus students via a Google form..The data
is stored in a data set called hr_data. The data set
contains a single variable named heart_rate.
heart_rate is measured in beats per minute (bpm). The
summary statistics for heart rate are displayed below.
| min | Q1 | median | Q3 | max | mean | sd | n | missing | |
|---|---|---|---|---|---|---|---|---|---|
| 38 | 61.5 | 68 | 80.25 | 100 | 69.77 | 14.17 | 26 | 0 |
ANSWER: Normally Distributed
ANSWER: I would use the mean and standard deviation as the data set is normally distributed
ANSWER: 69.77
ANSWER: Yes as although the data set is less than 30 there is no extreme outliers and it appears to be normally distributed.
ANSWER: 2.060
t.test() function will do this calculation for you.t.test(hr_data$heart_rate, conf.level=.95)
##
## One Sample t-test
##
## data: hr_data$heart_rate
## t = 25.114, df = 25, p-value < 2.2e-16
## alternative hypothesis: true mean is not equal to 0
## 95 percent confidence interval:
## 64.04762 75.49085
## sample estimates:
## mean of x
## 69.76923
ANSWER: (64.048, 75.49)
ANSWER: We are 95% confident that the true average resting heart rate of all gusties is contained within the interval 64.05 and 75.49.
According to netfit (“Your definitive guide to health and fitness.”), average men between 18 and 25 years old should have a resting heart rate between 70 and 73 bpm. Average women from 18-25 years old have resting heart rates between 74 and 78 bpm. Suppose we wanted to test the following hypotheses.
\(H_0 \space \mu = 72\)
\(H_a \space \mu \ne 72\)
ANSWER: The average person does not have a resting heart rate equal to 72 bpm
t.test(hr_data$heart_rate, mu = 72, alternative = "two.sided")
##
## One Sample t-test
##
## data: hr_data$heart_rate
## t = -0.80298, df = 25, p-value = 0.4296
## alternative hypothesis: true mean is not equal to 72
## 95 percent confidence interval:
## 64.04762 75.49085
## sample estimates:
## mean of x
## 69.76923
ANSWER: We fail to reject the null hypothesis as the p value of .4296 is larger than the alpha value of .05. Therefore there is convincing evidence that the average resting heartbeat rate for Gustavus students does lie around 72 bpm.
ANSWER: Normal Distribution
ANSWER: Approximately 72 BPM
ANSWER: It is very likely as the standard deviation of this distribution is 14.16. As 66% of all data is within one standard deviations of the mean, this implies that anywhere from approximately 58 to 86 can be expected to appear with some regularity. Since we are asking for 69.77 or smaller and that is above the 58 BPM number that means that it is very likely to appear.
Completed: Mon Nov 14 09:32:17 2022