In: Statistics and Probability
****MUST BE FAMILIAR WITH R STUDIO PROGRAMMING*****
Random 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 (in beats per minute) are given below:
Exercise group (sample from population 1): 62.4, 64.1, 66.8, 60.7, 68.2, 69.2, 64.9, 70.9, 67.7, 68, 58.5, 58.9, 64.7
No exercise group (sample from population 2): 79.3, 73.8, 75.3, 74.7, 76.9, 74.9, 73.2, 75.7, 75.2, 76.7, 78.7
Estimate the difference in mean resting heart rates between the two groups using a 9797% confidence interval.
Using a complete test of hypothesis at an α=0.03α=0.03 level of significance, is there evidence to conclude that those who exercise regularly have lower resting heart rates?
Use the approximate value for the degrees of freedom (the smallest between ?1 − 1 and ?2 − 1).
(a) Create two vectors to store the data. Find, store and display the mean, standard deviation and number of observations for each sample.
(b) Draw a properly labelled boxplot for each sample. Comment on the validity of the assumption of normality for these data.
(c) Construct a confidence interval for the difference in mean resting heart rates between the two groups. Assume normality, and use the level of confidence given to you in WW. Does the confidence interval support a difference between the two means? Explain.
(d) Test the claim that those who exercise regularly have lower resting heart rates than those who do not. Use the level of significance given to you in WW. You must include: i) null and alternative hypotheses; ii) test statistic; iii) P-value; iv) decision in term of the null hypothesis; v) decision in context.
(e) Create a properly labelled plot that includes the sampling distribution of the statistic under the null hypothesis, the value of the statistic as a vertical line, and the P-value.