Shortly after metric units of length were officially introduced in Australia in the 1970s, each of a group of 44 students was asked to guess, to the nearest meter, the width of the lecture hall in which they were sitting. Another group of 69 students in the same room was asked to guess the width in feet, to the nearest foot. The data are stored in the dataset roomwidth
of the HSAUR3
package.
library(HSAUR3)
DT::datatable(roomwidth)
The main question is whether estimation in feet and in meters gives different results. If we convert the estimates of the room width in meters into feet by multiplying each by 3.28084 then we would like to test the hypothesis that the mean of the population of meter
estimates is equal to the mean of the population of feet
estimates.
Use verbs
from dplyr
to create a new column estimate
that was the estimates in feet.
# Your Code Here
Start by checking the assumptions required to use a two-sample t-test.
# Your Code Here
# Use dplyr to find appropriate values for Mean, SD, and n
# Compute Rejection Regions
wilcox.test(estimate ~ unit, data = roomwidth)
# Code for permutation test here
Given \(\sigma_x = 10\), \(\sigma_y = 12\), \(n_x = 10\), \(n_y = 12\), and \(\alpha = 0.10\), find the power of the test if \(\mu_1(X, Y) = \mu_X - \mu_Y = 10\).
# Code to compute power here
# Draw this with base graphs now
\[\gamma = \frac{\mu_1(X, Y) - \mu_0(X, Y)}{\sigma_{\bar{X}-\bar{Y}}} = \frac{(10 - 0)}{\sqrt{\frac{10^2}{10} + \frac{12^2}{12}}}= 2.1320072\]
# Compute ncp, cv, and power here
Base graphics:
# Show using base graphs
# Estimate of nu, cv, and power here
roomwidth
Find \(\text{Power}(\mu_1(X, Y)) = 5\)
First compute the non-centrality parameter:
\[\gamma = \frac{\mu_1(X, Y) - \mu_0(X, Y)}{\sigma_{\bar{X}-\bar{Y}}} = \frac{(5 - 0)}{\sqrt{\frac{12.5^2}{69} + \frac{23.4^2}{44}}}= 1.3037006\]
# Compute ncp, cv, and power here