# HW2 - Homework 2 Solutions 2.b&amp;amp 3 Permutation...

This preview shows pages 1–4. Sign up to view the full content.

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Homework 2 Solutions 2.b. &amp;amp; 3. Permutation distribution of the differences of means and medians H : F 1 ( x ) = F 2 ( x ) H a : F 1 ( x ) &amp;lt; F 2 ( x ) or F 1 ( x ) &amp;gt; F 2 ( x ) For the p-value calculation, p value mean diff = 1 N N summationdisplay i =1 I ( | D i | | D obs | ) p value sum trt1 = 2 1 N N summationdisplay i =1 I ( S i S obs ) p value med diff = 1 N N summationdisplay i =1 I ( | M i | | M obs | )---------------------------------------------------- Permutation Test of Mean Difference: p-value= 0.9 Permutation Test of Sum of Trt 1: p-value= 0.9 Permutation Test of Median Difference: p-value= 1---------------------------------------------------- Histogram of the permutation distirbution of the Mean Differences Mean Difference Frequency-20-10 10 20 1 2 3 4 5 6 7 Histogram of the permutation distribution of the Sum of Trt 1 Sum of Trt1 Frequency 15 20 25 30 1 2 3 4 5 Histogram of the permutation distribution of the Median Differences Median Difference Frequency-5 5 1 2 3 4 We fail to reject H for all three tests. 1 4. Permutation distribution of the differences of means and the Wilcoxon rank-sum test H : F 1 ( x ) = F 2 ( x ) H a : F 1 ( x ) &amp;lt; F 2 ( x ) or F 1 ( x ) &amp;gt; F 2 ( x )---------------------------------------------------- Permutation Test of Mean Difference: p-value= 0.02380952 Wilcoxon Rank-Sum Test: Exact Wilcoxon rank sum test data: Sec1 and Sec2 W = 3, p-value = 0.03030 alternative hypothesis: true mu is not equal to 0---------------------------------------------------- At = 0 . 01, we fail to reject H , but at = 0 . 05, we reject H for permutation test of the mean difference and Wilcoxon rank-sum test. 5. Wilcoxon rank-sum test H : F 1 ( x ) = F 2 ( x ) H a : F 1 ( x ) &amp;lt; F 2 ( x ) or F 1 ( x ) &amp;gt; F 2 ( x )---------------------------------------------------- Wilcoxon Rank-Sum Test: H_a: F1(x) &amp;gt; F2(x) or F1(x) &amp;lt; F2(x) Exact Wilcoxon rank sum test data: SpeA and SpeB W = 22, p-value = 0.05556 alternative hypothesis: true mu is not equal to 0 H_a: F1(x) &amp;gt; F2(x) Exact Wilcoxon rank sum test data: SpeA and SpeB W = 22, p-value = 0.02778 alternative hypothesis: true mu is greater than 0 2 H_a: F1(x) &amp;lt; F2(x) Exact Wilcoxon rank sum test data: SpeA and SpeB W = 22, p-value = 0.9841 alternative hypothesis: true mu is less than 0---------------------------------------------------- At = 0 . 05, we fail to reject H : F 1 ( x ) &amp;lt; F 2 ( x ) or F 1 ( x ) &amp;gt; F 2 ( x ). However, the p-value is closed to given = 0 . 05, thus we can try to do test with more specific alternative hypothesis. From one-sided test, we find out that F 1 ( x ) &amp;gt; F 2 ( x ) at the significant level = 0 . 05. 7. &amp;amp; 8. Wilcoxon rank-sum test vs. two-sample t-test H : F 1 ( x ) = F 2 ( x ) H a : F 1 ( x ) &amp;lt; F 2 ( x ) or F 1 ( x ) &amp;gt; F 2 ( x )---------------------------------------------------- Exact Wilcoxon rank sum test data: Rural and Urban W = 314.5, p-value = 0.0008783 alternative hypothesis: true mu is not equal to 0 Two Sample t-test...
View Full Document

## This note was uploaded on 07/22/2011 for the course STA 4502 taught by Professor Staff during the Spring '08 term at University of Florida.

### Page1 / 9

HW2 - Homework 2 Solutions 2.b&amp;amp 3 Permutation...

This preview shows document pages 1 - 4. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online