Presentation is loading. Please wait.

Presentation is loading. Please wait.

Some Nonparametric Methods

Similar presentations


Presentation on theme: "Some Nonparametric Methods"— Presentation transcript:

1 Some Nonparametric Methods
stat120C UCI

2 Introduction: Why use nonparametric methods?
A statistical model usually has several assumptions. Parametric models make more assumptions than nonparametric models As an example, consider one-sample t-test. What would happen if The normality assumption does not hold? There are several outliers?

3 Parametric vs Nonparametric
Nonparametric methods are usually more robust to violations of assumptions and outliers When assumptions hold, parametric methods are usually more powerful Nonparametric methods do not assume that the data follow any particular distribution In many tests, data values are replaced by ranks. The results are invariant under any monotonic transformation

4 A nonparametric test for comparing paired samples – Wilcoxon signed rank test
An example: measurements before and after a treatment Before: After: Question: is this treatment efficient? If normality can be assumed, we can consider paired t-test. What if the distributional assumptions underlying t-test cannot be satisfied?

5 The Wilcoxon signed rank test
An example: measurements before and after a treatment Before: After: Step 1: calculate Di Step 2: Rank |Di| Step 3: Calculate W+, which is defined as Step 4: make statistical inference Based on exact distributions Based on asymptotic distributions (for large n)

6 The example W+=2+4=6 Under the null, the sign is random and W+
W+=2+4=6 Under the null, the sign is random and W+ should not be too large or too small.

7 Based on exact distributions
Probabilities under the null hypothesis: signed ranks w+ prob (observed) Evidence of positive change P-value = 0.875 Evidence of positive change

8 What is the null hypothesis
H0: the random sample is drawn from a distribution with zero median H1: the random sample is drawn from a distribution whose median is not zero

9 Inference based on exact distribution
We can use the R function “wilcox.test” to obtain p-values > wilcox.test(c(2,-4,-1,10)) Wilcoxon signed rank test data: c(2, -4, -1, 10) V = 6, p-value = 0.875 alternative hypothesis: true location is not equal to 0

10 Inference based on asymptotic distributions
The asymptotic distribution of W+ under the null hypothesis of zero median

11 Proof

12 Asymptotic Wilcoxon signed rank test

13 A nonparametric test for comparing two samples: the Mann-Whitney-Wilcoxon test
In a study of four subjects, two are randomly assigned to the treatment group and two to the control group. The following values are observed When sample size is small (such as the above example) or the normality assumption does not hold, the two-sample t-test is not accurate

14 An example

15 An example Two-sided p-value= 1/6+1/6+1/6+1/6=2/3

16 The null hypothesis of the Mann-Whitney-Wilcoxon test
The null hypothesis for the two-sample t-test says that the two populations means are the same The null hypothesis for the Mann-Whitney-Wilcoxon test says that the two random samples were drawn from the same distribution

17 A nonparametric test for comparing two samples: the Mann-Whitney-Wilcoxon test

18 Asymptotic Mann-Whitney-Wilcoxon test

19 Asymptotic Mann-Whitney-Wilcoxon test

20

21


Download ppt "Some Nonparametric Methods"

Similar presentations


Ads by Google