11.07.2015 Views

Preface to First Edition - lib

Preface to First Edition - lib

Preface to First Edition - lib

SHOW MORE
SHOW LESS
  • No tags were found...

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

72 CONDITIONAL INFERENCEThe distribution of the test statistic T under the null hypothesis of independenceof room width estimates and groups is depicted in Figure 4.1. Now, thevalue of the test statistic T for the original unshuffled data can be comparedwith the distribution of T under the null hypothesis (the vertical lines in Figure4.1). The p-value, i.e., the proportion of test statistics T larger than 8.859or smaller than -8.859, isR> greater abs(T)R> mean(greater)[1] 0.0080008with a confidence interval ofR> binom.test(sum(greater), length(greater))$conf.int[1] 0.006349087 0.009947933attr(,"conf.level")[1] 0.95Note that the approximated conditional p-value is roughly the same as thep-value reported by the t-test in Chapter 3.R> <strong>lib</strong>rary("coin")R> independence_test(y ~ unit, data = roomwidth,+ distribution = exact())Exact General Independence Testdata: y by unit (feet, metres)Z = -2.5491, p-value = 0.008492alternative hypothesis: two.sidedFigure 4.2R output of the exact permutation test applied <strong>to</strong> the roomwidth data.For some situations, including the analysis shown here, it is possible <strong>to</strong> computethe exact p-value, i.e., the p-value based on the distribution evaluated onall possible randomisations of the y values. The function independence_test(package coin, Hothorn et al., 2006a, 2008b) can be used <strong>to</strong> compute the exactp-value as shown in Figure 4.2. Similarly, the exact conditional distribution ofthe Wilcoxon Mann-Whitney rank sum test can be computed by a functionimplemented in package coin as shown in Figure 4.3.One should note that the p-values of the permutation test and the t-testcoincide rather well and that the p-values of the Wilcoxon Mann-Whitneyrank sum tests in their conditional and unconditional version are roughlythree times as large due <strong>to</strong> the loss of information induced by taking only theranking of the measurements in<strong>to</strong> account. However, based on the results ofthe permutation test applied <strong>to</strong> the roomwidth data we can conclude that theestimates in metres are, on average, larger than the estimates in feet.© 2010 by Taylor and Francis Group, LLC

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!