Data for Exercise 7.83

Cabinets

Format

A data frame/tibble with 20 observations on three variables

home

a numeric vector

supplA

estimate for kitchen cabinets from supplier A (in dollars)

supplB

estimate for kitchen cabinets from supplier A (in dollars)

References

Kitchens, L. J. (2003) Basic Statistics and Data Analysis. Pacific Grove, CA: Brooks/Cole, a division of Thomson Learning.

Examples


DIF <- Cabinets$supplA - Cabinets$supplB
qqnorm(DIF)
qqline(DIF)

shapiro.test(DIF)
#> 
#> 	Shapiro-Wilk normality test
#> 
#> data:  DIF
#> W = 0.94331, p-value = 0.2767
#> 
with(data = Cabinets, 
     t.test(supplA, supplB, paired = TRUE)
)
#> 
#> 	Paired t-test
#> 
#> data:  supplA and supplB
#> t = 2.7159, df = 19, p-value = 0.01371
#> alternative hypothesis: true mean difference is not equal to 0
#> 95 percent confidence interval:
#>   3.967879 30.632121
#> sample estimates:
#> mean difference 
#>            17.3 
#> 
with(data = Cabinets,
     wilcox.test(supplA, supplB, paired = TRUE)
)
#> Warning: cannot compute exact p-value with ties
#> 
#> 	Wilcoxon signed rank test with continuity correction
#> 
#> data:  supplA and supplB
#> V = 168, p-value = 0.01953
#> alternative hypothesis: true location shift is not equal to 0
#> 
rm(DIF)