DOC PREVIEW
UI STAT 5400 - Simulation Study For The Comparison of T-Test and the Wilcoxon-Test

This preview shows page 1-2-3 out of 10 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 10 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 10 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 10 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 10 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

Simulation Study For TheComparison of T-Test and theWilcoxon-TestVacide Avsar Guangming LiuDecember 8, 2008AbstractThis paper tries to figure out the differences between the results ofthe t-test and the Wilcoxon test in a simulation study.11 IntroductionIn this project, we are trying to compare the two statistical hypothesis tests,Student’s t-test and the Wilcoxon test by a simulation study.Student’s t-Test is any statistical hypothesis test in which the test statistichas a Student’s t distribution if the null hypothesis is true.Different hypothesis tests make different assumptions about the distri-bution of the random sample in the data. One of the assumptions for thet-test is that the data are independently sampled from a normally distributedpopulation. This assumption about the population distribution makes thet-test be a parametric statistical test. In some cases, the data within twocorrelated samples may fail to meet this assumption. When this happens,an appropriate non-parametric alternative test can be found. One of thesenon-parametric alternative tests is called the Wilcoxon Signed-Rank Test.Like the t-test, Wilcoxon test involves comparison of the differences be-tween measurements. On the other hand, it does not require assumptionsabout the form of the distribution of the measurements. It should thereforebe used whenever the distributional assumptions that underlie t-test cannotbe satisfied.In our simulation study, we’ll compare the size and the power of thesetwo tests in two different cases. For the first case, we’ll take the samplesfrom a normally distributed population and for the other case, we’ll havesamples from uniformly distributed population. Uniform distribution is theone which is not normal but symmetric.To see the effects clearly, we’ll keep sample size, n small and the numberof simulated datasets, S large enough:n = 10S = 10000For each case, we’ll test whether the means of the two samples are equalor not. We expect that the results for the size and power of tests will alterfor these two different cases. Comparison of the results will show us whichtest is more relevant and safer.Let’s start with the first case.22 Tests for Normally Distributed PopulationWe generate two sets of S datasets both from normal distribution. Thesignificance level is 0.05 .2.1 Means of the samples are equal (Case 1)First, we evaluate the size of the two tests. For this, we take means equal.So,µ1= µ2= 1The variances of two samples are different:(σ1)2=13(σ2)2=112Our null hypothesis is (Ho: µ1 = µ2)We use R to generate two samples. Then, under our null hypothesis, wecalculate the proportion of rejection of the test by determining the proportionof the p-value that are < 0.05 since we use α = 0.05 . If the proportion doesachieve the given significance level, we get a relevant size of the test. Aftercalculation, we get the size of the t-test as 0.0521 and the size of the Wilcox-test as 0.0507. (For the results and codes, please see Appendix part). Sincethey’re very close to significance level, they can be said as relevant tests.Then, we can calculate the power of the tests.2.2 Means are not equal (Case 2)Now, we will approximate the power of the two tests under an alternativehypothesis which says that µ1and µ3are not equal.We reuse the sample 1 with µ1= 1 from Case 1 and then generate anotherdata set sample 3 with µ2= 2. The variances are not equal:(σ1)2=13(σ2)2=343To get the power of the t-test and wilcoxon test, again we will calculatethe proportion of the p-value that were < 0.05.Calculations show that the power of the t-test is 0.8094 and the powerof the Wilcox-test is 0.7612. (See the appendix for the detailed R codes andcalculations) .3 Tests for Uniformly Distributed PopulationsNow, we generate two sets of S datasets both from uniform distribution. Thesignificance level is 0.05 again.3.1 Means are equal(Case 3)First, we evaluate the size of the two tests. For this case, we take meansequal. So,µ1= µ2= 1We let the first population follow from uniform distribution, (min =0,max = 2) and the second population follow uniform distribution, (min =0.5, max = 1.5 ). We can calculate the variance for both populations ac-cording to the definition of variance. So for this case, we have the variancesas:(σ1)2=13(σ2)2=112Our null hypothesis is (Ho: µ1 = µ2)Firstly, we use R to generate two samples from the uniform distributionwith(min = 0, max = 2) and the uniform distribution with (min = 0.5,max = 1.5). Then we evaluate the size of the t-test and the Wilcoxontest under the null hypothesis (Ho: µ1 = µ2). We calculate the proportionof rejections of Ho by determining the proportion of the p-value that were< 0.05. As a result of calculation, we get the size of the t-test as 0.0561 andthe size of the Wilcox-test as 0.0554. (For the results and codes, please seeAppendix part). The size of the tests are very close to significance level, andthus tests are relevant. Now, we can calculate the power of the test.43.2 Means are not equal (Case 4)Now, we approximate the power of the two tests under an alternative hy-pothesis which says that µ1and µ2are not equal.We reuse the first sample from uniform distribution of (min = 0, max =2) from Case 3 and let the second sample taken from uniform distribution of(min = 0.5, max = 3.5). Means are different. And also, the variances of thetwo populations are not equal. For this case, we have:µ1= 1µ3= 2(σ1)2=13(σ2)2=34To get the power of the t-test and Wilcox-test, we calculate the proportionof the p-value that were < 0.05 again. The results show that the power ofthe t-test is 0.8206 and the power of the Wilcox-test is 0.7179. (See theappendix for the detailed R codes and calculations) .4 ResultsTable 1 shows the results from the cases of normally distributed popula-tions. And Table 2 shows the results from the cases of uniformly distributedpopulations.normal distribution t-test Wilcoxon testMean equal(Case 1) µ1=1, µ2=1, (σ1)2=13, (σ1)2=112size 0.0521 0.0507Mean not equal(Case 2) µ=1, µ12=2, (σ1)2=13, (σ2)2=34power 0.8094 0.7612Table 1: Size and Power of t-test and Wilcoxon test for uniformdistribution populations5Uniform distribution t-test Wilcoxon testMean equal(Case 3) µ1=1, µ2=1, (σ1)2=13, (σ1)2=112size 0.0561 0.0554Mean not equal(case 4) µ=1, µ2=2, (σ1)2=13, (σ2)2=34power 0.8206 0.7179Table 2: Size and Power of t-test and Wilcoxon test for uniformdistribution populationsFrom the results of both tests,


View Full Document

UI STAT 5400 - Simulation Study For The Comparison of T-Test and the Wilcoxon-Test

Documents in this Course
Load more
Download Simulation Study For The Comparison of T-Test and the Wilcoxon-Test
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view Simulation Study For The Comparison of T-Test and the Wilcoxon-Test and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Simulation Study For The Comparison of T-Test and the Wilcoxon-Test 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?