STAT597A Homework 7

1.  In a weight loss drug development study 12 rats were administered an excremental weight loss drug. The rats were weighed before the administration of the drug and after a period of 1 week were reweighed to see if the drug has any effect of their weight. During the week all the other environmental variables were controlled. The table below summarizes the results.

Rat Number / Weight Before / Weight After / Difference
1 / 689 / 657 / 32
2 / 656 / 623 / 33
3 / 668 / 652 / 16
4 / 660 / 654 / 6
5 / 663 / 646 / 17
6 / 664 / 600 / 64
7 / 647 / 640 / 7
8 / 694 / 605 / 89
9 / 633 / 645 / -12
10 / 653 / 642 / 11
11 / 630 / 650 / -20
12 / 640 / 648 / -8

You are asked to test the null hypothesis that the drug has no effect on the weight of the rat against two sided alternative hypothesis

Part 1) Use the paired t-test to calculate the level of significance of the null hypothesis. The paired t-test uses the difference data and test if the mean of the difference is zero. By looking at the differences only, the paired t-test essentially a one-sample t-test.

Part 2) Since you are now a statistical analyst you decide to design a distribution free permutation test. You are asked to write an R program to calculate the p-value using the Fisher’s

paired permutation test. If the experimental treatment has no effect, then the Before weight is just as likely to be larger than the After weight as it is to be smaller. In other words, if the null hypothesis is true, a permutation within any pair of weights is as likely as the reverse. That simple idea forms the basis of the paired permutation test.

So under the null hypothesis, the permutated samples are obtained by the 2^12 equally likely possible differences obtained by changing the signs of the differences. That is, permutation of the weight differences of

+/-32, +/-33, +/-16, +/-6, +/-17, +/-64, +/-7, +/-89, +/-12, +/-11, +/-20, +/-8 gives the permutated samples under the null hypothesis.

Using R to enumerate all possible 4096 permutations of the weight differences of the rats. For each of the permutations calculate the t-statistics. Plot the histogram of the calculated t-statistics. Compare the t-statistics of the actual weighing to calculate the exact distribution free p-value. What conclusion can you draw from this?

2.  Comparing confidence interval methods.

Generate 100 random samples of size 20 from an exponential distribution exp(1). The true mean is 1. Compute 100 standard t confidence interval, and bootstrap percentile intervals, and describe their coverage behavior: how often does 1 fall below the lower limit, how often above the upper? Explain your results.