Homework 5 (Data Analysis Using R) Solution

$30.00

Description

Instructions:

  1. Copy your answer to each question AND the R code by which you reached your answer to a document. The answers should be correctly ordered.

Problem 1 (10 pts): The table shows the amounts of shoe wear in an experiment reported by Box, Hunter, and Hunter (2005). There were two materials (A and B) that were randomly assigned to the left and right shoes of 10 boys. This data set can also be obtained in R by running library(MASS); and typing shoes.

boy A B

  • 13.2 14.0

2 8.2 8.8

  • 10.9 11.2

4 14.3 14.2

5 10.7 11.8

6

6.6

6.4

7

9.5

9.8

  • 10.8 11.3

9

8.8

9.3

10

13.3

13.6

Let A and B be the mean shoe wear of material A and mean shoe wear of material B respectively. Please answer the following questions:

  1. (2 pt) Perform the hypothesis test H0 : A = 10 vs. Ha : A > 10 at signi cance level 0.05. Find the test statistic and make your nal conclusion based on the p-value.

  1. (2 pt) Find the 95% con dence interval of A.

3. (2 pt) Perform the two sample t test H0 : A B = 0 vs. Ha : A B 6= 0 at signi cance level 0.05. Can we assume the two populations have the equal variance? Find the test statistic and make your nal conclusion based on the p-value.

  1. (2 pt) Perform the paired t test H0 : d = 0 vs. Ha : d 6= 0 at signi cance level 0.05. Find the test statistic and make your nal conclusion based on the p-value.

  1. (2 pt) Compare two testing procedures in part 3 and part 4, which one is more appropriate? Why?

1