Question
Part 1. Paired t-tests A sleep disorder specialist claims that herbal medicines will increase the number of hours of REM sleep per night. The specialist
Part 1. Paired t-tests
A sleep disorder specialist claims that herbal medicines will increase the number of hours of REM sleep per night. The specialist randomly selects 27 patients, and records the number of hours of REM sleep per night before and after taking the herbal medicines. Below are the data, ordered by patient. Assume the data are normally distributed.
Hours of REM sleep before taking the herbal medicines:
4.6, 3.1, 3.7, 3.3, 3.4, 3.4, 3.7, 5.1, 4.5, 3.2, 4.6, 6.7, 3.0, 3.7, 4.8, 4.1, 3.3, 3.7, 4.5, 3.1, 3.3, 3.8, 3.2, 3.9, 3.9, 5.1, 3.1
Hours of REM sleep after taking the herbal medicines:
4.7, 3.9, 4.1, 4.4, 4.3, 4.1, 3.4, 4.6, 3.8, 4.9, 4.4, 5.2, 3.9, 4.7, 5.7, 3.9, 3.5, 4.3, 4.7, 4.7, 3.6, 3.2, 4.2, 4.6, 4.4, 5.3, 2.1
(1a) Write the null and alternative hypotheses given the claim and with respect to D-bar and when considering pre-post. State whether this is a right-, left-, or two-tailed test. (3 points)
(1b) What is the mean, median, standard deviation of the hours of REM sleep in patients before and after taking the herbal medicines? Round your answer to one decimal place. (6 points)
(1c) Copy and paste your R code you used to test the claim using the appropriate t-test, and your output. (4 points)
(1d) What are the values of the test statistic and the p-value from (1c)? 4 points
(1e) Using alpha = 0.05 and alpha = 0.01, state the statistical decision and interpretation. (8 points)
Part 2. Two-sample t-tests
A research group is investigating phytoremediation, which involves the use of plants to clean-up pollutants from the environment. Some species of plants have an ability to tolerate and accumulate heavy metals in their tissues, which consequently removes the pollutants from the environment. One toxin of major concern is arsenic due it is toxicity at very low concentrations and the fact that it does not biodegrade.
This research group claims that a newly developed variety of willow accumulates higher levels of arsenic (measured as mg of arsenic per kg of plant dry weight) than a local species of poplar that is currently used in phytoremediation efforts. The research group conducts an experiment using 21 randomly selected trees from each species that are growing in arsenic contaminated soils. At the end of the experiment, the amount of arsenic (mg/kg) in each tree was measured. Below are the data; assume the data are normally distributed.
Measurements taken from the willow trees:
57.848, 54.176, 54.555, 55.366, 55.903, 56.582, 57.355, 54.426, 55.850, 53.640, 55.385, 55.739, 55.155, 56.428, 55.703, 56.497, 56.035, 53.008, 54.214, 55.200, 58.103
Measurements taken from the poplar trees:
54.604, 54.533, 54.931, 54.612, 54.427, 56.033, 53.895, 54.476, 54.378, 54.404, 56.039, 56.168, 55.215, 53.510, 53.945, 53.184, 55.091, 54.288, 56.052, 54.507, 55.314
(2a) Find the variance of the levels of arsenic accumulated in the willow and poplar trees. Round your answer to three decimal places. (2 points)
(2b) Write the null and alternative hypotheses for a test of variance equality between willow and poplar, and state whether this is a right-, left-, or two-tailed test. (3 points)
(2c) Conduct a test of variance equality using var.test() in R/RStudio. Paste your code and output below. (4 points)
(2d) Using alpha = 0.05, state the statistical decision and interpretation for the test of variance equality. (4 points)
(2e) Given your result in (2d), conduct the appropriate two-sample t-test to test the claim from the research group that a newly developed variety of willow accumulates higher levels of arsenic than a local species of poplar that is currently used in phytoremediation efforts. Paste your code and output below (4 points)
(2f) Using alpha = 0.05 and alpha = 0.01, state the statistical decision and interpretation for your two-sample t-test from (2e). (8 points)
Part 3. ANOVA
In this part, use the dataset Oats.csv available on Canvas (Files\Lab dataset). In this dataset, agricultural researchers tested the yield of three new varieties of oat (Golden Rain, Marvellous, and Victory). Use the read.csv command to import the dataset (as you previously did in Lab 4):
Oat.data <- read.csv("Oats.csv", head=TRUE)
Enter the following command to see the header and the first few rows:
head(Oat.data)
Note that the variety is in the first column, and yield is in the second column.
In Lab 4, you learned that you can call the data from a column using $:
Oat.data$Variety
We can also attach the data from the dataset to our working space in R/RStudio using the attach() command:
attach(Oat.data)
In doing so, we can now enter just the name of the column to call the data:
Variety
Yield
Now you are ready to complete Part 3 of the lab.
(3a) The agricultural researchers want to determine if the yields are different among the three new varieties of oat. In such a test, which variable is the independent variable and which variable is the dependent variable? (2 points)
(3b) In an ANOVA, what are the null and alternative hypotheses? (2 points)
(3c) Test your hypothesis from (3b). Paste your code and output below. (4 points)
(3d) Examine the values of the degrees of freedom (Df) for the first and second rows. How are these values calculated? Show your work below. (2 points)
(3e) Using alpha=0.01, what is your statistical conclusion and interpretation when testing the hypothesis in (3b)? (4 points)
(3f) Now, let's use R/RStudio to make a box-and-whiskers plot of the yield for the oat varieties. In a box-and-whiskers plot, the "boxes" for each group represent the IQR, and the solid line through each box is the median. The "whiskers" are the dashed lines below and above each box and represent the range over which approximately 95% of the data are contained. To make a box-and-whiskers plot, use the following command:
boxplot(Yield ~ Variety, xlab="?", ylab="?", main="?", col="?")
Complete the code above by adding in the appropriate x and y axis labels, title, and color of your choice. Paste your box-and-whiskers plot below. (8 points)
(3g) Based on your box-and-whiskers plot, which oat variety(ies), if any, are most likely to have different yields? (2 points)
(3h) Now let's see if your visual assessment from (3g) is accurate. To do this, we will conduct a post hoc test using Tukey's HSD test and the default level of alpha, which is 0.05. To run a Tukey's HSD post hoc test, use the following commands:
TukeyHSD(myANOVA)
Paste your results below. (2 points)
(3i) Examine your output from the TukeyHSD post hoc test. Using alpha=0.05, which pairs of oat varieties have significantly different yields? Which pairs of oat varieties do not have significantly different yields? (6 points)
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started