Use the R program to do 4 questions

degrees female96.3
96.4
96.7
96.7
96.8
96.9
97
97.1
97.1
97.1
97.2
97.2
97.2
97.3
97.4
97.4
97.4
97.4
97.4
97.5
97.5
97.6
97.6
97.6
97.6
97.7
97.7
97.7
97.8
97.8
97.8
97.8
97.8
97.8
97.8
97.9
97.9
97.9
97.9
97.9
98
98
98
98
98
98
0
1
0
1
1
0
0
0
0
0
0
1
1
0
0
0
0
0
1
0
0
0
0
0
1
0
1
1
0
0
0
0
1
1
1
0
0
1
1
1
0
0
0
0
0
0
98
98
98
98
98
98.1
98.1
98.1
98.2
98.2
98.2
98.2
98.2
98.2
98.2
98.2
98.2
98.2
98.3
98.3
98.3
98.3
98.3
98.4
98.4
98.4
98.4
98.4
98.4
98.4
98.4
98.4
98.5
98.5
98.5
98.6
98.6
98.6
98.6
98.6
98.6
98.6
98.6
98.6
98.6
98.7
98.7
1
1
1
1
1
0
0
1
0
0
0
0
1
1
1
1
1
1
0
0
1
1
1
0
0
0
0
1
1
1
1
1
0
0
1
0
0
0
0
0
0
1
1
1
1
0
0
98.7
98.7
98.7
98.7
98.7
98.7
98.8
98.8
98.8
98.8
98.8
98.8
98.8
98.8
98.8
98.8
98.9
98.9
99
99
99
99
99
99.1
99.1
99.1
99.2
99.2
99.2
99.3
99.3
99.4
99.4
99.5
99.9
100
100.8
1
1
1
1
1
1
0
0
0
1
1
1
1
1
1
1
0
1
0
0
0
1
1
0
1
1
0
1
1
0
1
0
1
0
1
1
1
The data for this lab exercise are from an article in the Journal of the American Medical
Association entitled “A Critical Appraisal of 98.6 Degrees F, the Upper Limit of the
Normal Body Temperature, and Other Legacies of Carl Reinhold August Wunderlich”
(Mackowiak, Wasserman, and Levine 1992). The data are contained in a Microsoft
Excel spreadsheet called temps.xlsx.
1. Import the data into R to create a R data frame called temps.
Recall that you can use the edit (temps) command to open up a spreadsheet in
R to see if you have imported the data correctly or use head (temps) to see the
first six rows of the data frame, but I would delete these command from your R
script after you’ve checked to make sure that it imported correctly. You can use
the rio package to import an Excel file into R with the import () command as
shown in “Getting Started with R.”
2.
Use R and the entire sample (n = 130) to test whether the true population mean
for human body temperatures is 98.6 degrees Fahrenheit.
Ho: μ = 98.6
H: μ # 98.6
Test the null and alternative hypotheses above at the 1-percent level of
significance using the critical value approach, the p-value approach, and the
confidence interval approach.
What can you conclude with each approach and why? Intuitively explain how
you made your decisions for all three approaches. No credit will be given
without an explanation.
13.
Use R to test whether there is a difference in the population variances of body
temperatures by gender. That is, use an F-test to test this hypothesis as a one-
tailed (right-tailed) test:
Ho: 0 ≤ 0
H₁: o2 > 0²
Groups A and B in this case are males and females, or vice versa. Recall to put
the larger sample variance in the numerator when conducting the F-test.
Test the null hypothesis at the 5-percent level of significance. What can you
conclude and why? No credit will be given without an explanation.
The first step is to create two separate data frames in R from the original data
frame: one data frame with the 65 female observations which includes the
variable degrees and another data frame with the 65 male observations which
includes the variable degrees. This can be done with the subset () command
as shown below with the edit () command added to check that it was done
correctly:
tempsfemale

Save Time On Research and Writing
Hire a Pro to Write You a 100% Plagiarism-Free Paper.
Get My Paper
Order your essay today and save 25% with the discount code: STUDYSAVE

Order a unique copy of this paper

600 words
We'll send you the first draft for approval by September 11, 2018 at 10:52 AM
Total price:
$26
Top Academic Writers Ready to Help
with Your Research Proposal

Order your essay today and save 25% with the discount code GREEN