1 Problem taken from CHAPTER 2 of A Handbook of Statistical Analyses Using R

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

1.1 Discussion – Should we use a t-test?

1.2 Five-Step Procedure

# Use dplyr to find appropriate values for Mean, SD, and n
  1. Rejection Region
# Compute Rejection Regions
  1. Statistical Conclusion
  1. English Conclusion —

2 Other Tests

wilcox.test(estimate ~ unit, data = roomwidth)
# Code for permutation test here

3 Test for the Difference in Population Means When Sampling from Independent Normal Distributions with Known Variances

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

3.1 What Happens if We Use a t-test?

  • First compute the non-centrality parameter:

\[\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 

3.2 Power from 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