eastern mediterranean university faculty of medicine...

23
Eastern Mediterranean University Faculty of Medicine Biostatistics course Non-parametric methods March 4&7, 2016 Instructor: Dr. Nimet İlke Akçay ([email protected])

Upload: others

Post on 18-Apr-2020

5 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Eastern Mediterranean University Faculty of Medicine ...brahms.emu.edu.tr/icetin/mdcnbiostat16-nonparametric-tests.pdf · Eastern Mediterranean University Faculty of Medicine Biostatistics

Eastern Mediterranean University Faculty of Medicine Biostatistics course

Non-parametric methods March 4&7, 2016

Instructor: Dr. Nimet İlke Akçay ([email protected])

Page 2: Eastern Mediterranean University Faculty of Medicine ...brahms.emu.edu.tr/icetin/mdcnbiostat16-nonparametric-tests.pdf · Eastern Mediterranean University Faculty of Medicine Biostatistics

Learning Objectives

1. Distinguish Parametric & Nonparametric Test Methods

2. Explain commonly used Nonparametric Test Methods

3. Perform Hypothesis Tests Using Nonparametric Procedures

Page 3: Eastern Mediterranean University Faculty of Medicine ...brahms.emu.edu.tr/icetin/mdcnbiostat16-nonparametric-tests.pdf · Eastern Mediterranean University Faculty of Medicine Biostatistics

Nonparametric Statistics Introduction to nonparametric methods

• Parametric tests (t-test, z-test, etc.)

involve estimating population parameters such as the mean

are based on the assumptions of normality or known variances (stringent assumptions)

• What if data does not follow a Normal distribution?

• Non-parametric tests

were developed for these situations where no (or fewer) assumptions have to be made

are also called as Distribution-free tests

Still have assumptions but they are less stringent

Can be applied for a normally distributed data, but Parametric tests have greater power IF the assumptions met

Page 4: Eastern Mediterranean University Faculty of Medicine ...brahms.emu.edu.tr/icetin/mdcnbiostat16-nonparametric-tests.pdf · Eastern Mediterranean University Faculty of Medicine Biostatistics

Parametric vs. Nonparametric test procedures Parametric

• Involve population parameters Example: Population mean

• Require interval scale or ratio scale Whole numbers or fractions

Example: height in inches

(72, 60.5, 54.7)

• Have stringent assumptions Example: Normal dist.

• Examples: z-test, t-test, F-test

Nonparametric

• Do not involve population parameters Example: Probability

distributions, indepedence

• Data measured on any scale Ratio or Interval

Ordinal Example: good-better-best

Nominal Example: male-female

• Have no stringent assumptions

• Examples: Sign test, Mann-Whitney U test, Wilcoxon test

Page 5: Eastern Mediterranean University Faculty of Medicine ...brahms.emu.edu.tr/icetin/mdcnbiostat16-nonparametric-tests.pdf · Eastern Mediterranean University Faculty of Medicine Biostatistics

Advantages and Disadvantages of Non-parametric tests Advantages

• Used with all measurement scales Analysis possible for ranked

or categorical data

• Distribution-free: may be used when the form of the sampled population is unknown

• Easy to compute

• Make fewer assumptions

• No need to involve population parameters

• Results may be as exact as parametric procedures

Disadvantages

• May waste information, if data and assumptions permit using parametric procedures Example: converting data

from ratio to ordinal scale

E.g. Height values -> short-average-tall

• Difficult to compute by hand for large samples

• Tables not widely available

Page 6: Eastern Mediterranean University Faculty of Medicine ...brahms.emu.edu.tr/icetin/mdcnbiostat16-nonparametric-tests.pdf · Eastern Mediterranean University Faculty of Medicine Biostatistics

Determination: Parametric or Non-parametric?

Page 7: Eastern Mediterranean University Faculty of Medicine ...brahms.emu.edu.tr/icetin/mdcnbiostat16-nonparametric-tests.pdf · Eastern Mediterranean University Faculty of Medicine Biostatistics

Hypothesis Testing Procedures

Type of Design Parametric

Test

Nonparametric

Test

One sample One-sample t-

test

Sign Test

Two indepent

samples

Independent-

samples t-test

Wilcoxon Rank

Sum test

Mann Whitney U

test

Two paired

sample

Paired-samples

t-test

Wilcoxon Signed

Ranks test

.

.

.

.

.

.

.

.

.

Page 8: Eastern Mediterranean University Faculty of Medicine ...brahms.emu.edu.tr/icetin/mdcnbiostat16-nonparametric-tests.pdf · Eastern Mediterranean University Faculty of Medicine Biostatistics

One sample hypothesis testing design: Sign Test

Page 9: Eastern Mediterranean University Faculty of Medicine ...brahms.emu.edu.tr/icetin/mdcnbiostat16-nonparametric-tests.pdf · Eastern Mediterranean University Faculty of Medicine Biostatistics

Sign Test • This test is used as an alternative to one sample t-test,

when normality assumption is not met

• The only assumption is that the distribution of the underlying variable (data) is continuous.

• Test focuses on median rather than mean.

• The test is based on signs, plus and minuses

• Test is used for one sample as well as for two samples

Page 10: Eastern Mediterranean University Faculty of Medicine ...brahms.emu.edu.tr/icetin/mdcnbiostat16-nonparametric-tests.pdf · Eastern Mediterranean University Faculty of Medicine Biostatistics

Test Statistic in Sign Test • Test Statistic: The test statistic for the sign test is

either the observed number of plus signs or the observed number of minus signs.

• The nature of the alternative hypothesis determines which of these test statistics is appropriate. In a given test, any one of the following alternative hypotheses is possible:

• HA: P(+) > P(-) one-sided alternative

• HA: P(+) < P(-) one-sided alternative

• HA: P(+) ≠ P(-) two-sided alternative

Page 11: Eastern Mediterranean University Faculty of Medicine ...brahms.emu.edu.tr/icetin/mdcnbiostat16-nonparametric-tests.pdf · Eastern Mediterranean University Faculty of Medicine Biostatistics

Test Statistic in Sign Test • If the alternative hypothesis is HA: P(+) > P(-) a

sufficiently small number of minus signs causes rejection of H0. The test statistic is the number of minus signs.

• If the alternative hypothesis is HA: P(+) < P(-) a sufficiently small number of plus signs causes rejection of H0. The test statistic is the number of plus signs.

• If the alternative hypothesis is HA: P(+) ≠ P(-) either a sufficiently small number of plus signs or a sufficiently small number of minus signs causes rejection of the null hypothesis. We may take as the test statistic the less frequently occurring sign.

• Calculation of test statistic:

P (X ≤ k | n, p) =

qpCxnxk

x

n

x

0

Page 12: Eastern Mediterranean University Faculty of Medicine ...brahms.emu.edu.tr/icetin/mdcnbiostat16-nonparametric-tests.pdf · Eastern Mediterranean University Faculty of Medicine Biostatistics

Sign Test – Example • 7 patients were asked to rate the

services in a private hospital on a 5-point scale (1=terrible,..., 5=excellent)

• The obtained ratings are given in the table

• At the α=0.05 level, is there evidence that the median rating is at least 3?

Patient Rating Sign

1

2

3

4

5

6

7

2

5

3

4

1

4

5

-

+

+

+

-

+

+

Page 13: Eastern Mediterranean University Faculty of Medicine ...brahms.emu.edu.tr/icetin/mdcnbiostat16-nonparametric-tests.pdf · Eastern Mediterranean University Faculty of Medicine Biostatistics

Sign Test – Example (cont’d) Hypotheses:

H0: = 3

Ha: < 3

Significance Level:

= .05

Test Statistic:

P-Value:

Decision:

Conclusion:

Do Not Reject at = .05

There is No evidence

for Median < 3

P(x 2) = 1 - P(x 1)

= 0.9375

(Binomial Table, n = 7, p = 0.50)

Or calculate from the formula

S = 2

(Ratings 1 & 2

are < = 3:

2, 5, 3, 4, 1, 4, 5)

Page 14: Eastern Mediterranean University Faculty of Medicine ...brahms.emu.edu.tr/icetin/mdcnbiostat16-nonparametric-tests.pdf · Eastern Mediterranean University Faculty of Medicine Biostatistics

Comparing Two Populations: Independent Samples Wilcoxon Rank Sum test

Page 15: Eastern Mediterranean University Faculty of Medicine ...brahms.emu.edu.tr/icetin/mdcnbiostat16-nonparametric-tests.pdf · Eastern Mediterranean University Faculty of Medicine Biostatistics

Wilcoxon Rank Sum test

• Tests two independent population probability distributions

• Corresponds to t-test for two independent means

• Assumptions — Independent, random samples

— Populations are continuous

• Can use normal approximation if ni 30

© 2

01

1 P

ea

rson

Ed

uca

tion

, In

c

Page 16: Eastern Mediterranean University Faculty of Medicine ...brahms.emu.edu.tr/icetin/mdcnbiostat16-nonparametric-tests.pdf · Eastern Mediterranean University Faculty of Medicine Biostatistics

Wilcoxon Rank Sum Test: Independent Samples Let D1 and D2 represent the probability distributions for populations 1 and 2, respectively.

One-Tailed Test

H0: D1 and D2 are identical

Ha: D1 is shifted to the right of D2

[or D1 is shifted to the left of D2]

Test statistic:

T1, if n1 < n2; T2, if n2 < n1

(Either rank sum can be used if n1 = n2.)

Page 17: Eastern Mediterranean University Faculty of Medicine ...brahms.emu.edu.tr/icetin/mdcnbiostat16-nonparametric-tests.pdf · Eastern Mediterranean University Faculty of Medicine Biostatistics

Wilcoxon Rank Sum Test: Independent Samples Let D1 and D2 represent the probability distributions for populations 1 and 2, respectively.

Two-Tailed Test

H0: D1 and D2 are identical

Ha: D1 is shifted to the left or to the right of D2

Test statistic:

T1, if n1 < n2; T2, if n2 < n1

(Either rank sum can be used if n1 = n2.) We will denote this rank sum as T.

Page 18: Eastern Mediterranean University Faculty of Medicine ...brahms.emu.edu.tr/icetin/mdcnbiostat16-nonparametric-tests.pdf · Eastern Mediterranean University Faculty of Medicine Biostatistics

Conditions Required for Valid Wilcoxon Rank Sum Test

1. The two samples are random and independent.

2. The two probability distributions from which the samples are drawn are continuous.

Page 19: Eastern Mediterranean University Faculty of Medicine ...brahms.emu.edu.tr/icetin/mdcnbiostat16-nonparametric-tests.pdf · Eastern Mediterranean University Faculty of Medicine Biostatistics

Comparing Two Populations: Paired Differences Experiment Wilcoxon Signed Ranks test

Page 20: Eastern Mediterranean University Faculty of Medicine ...brahms.emu.edu.tr/icetin/mdcnbiostat16-nonparametric-tests.pdf · Eastern Mediterranean University Faculty of Medicine Biostatistics

© 2

01

1 P

ea

rson

Ed

uca

tion

, In

c

Wilcoxon Signed Rank Test

• Tests probability distributions of two related populations

• Corresponds to t-test for dependent (paired) means

• Assumptions — Random samples

— Both populations are continuous

• Can use normal approximation if n 30

Page 21: Eastern Mediterranean University Faculty of Medicine ...brahms.emu.edu.tr/icetin/mdcnbiostat16-nonparametric-tests.pdf · Eastern Mediterranean University Faculty of Medicine Biostatistics

© 2011 Pearson Education, Inc

Wilcoxon Signed Rank Test for a Paired Difference Experiment

Let D1 and D2 represent the probability distributions for populations 1 and 2, respectively.

One-Tailed Test

H0: D1 and D2 are identical

Ha: D1 is shifted to the right of D2

[or D1 is shifted to the left of D2]

Page 22: Eastern Mediterranean University Faculty of Medicine ...brahms.emu.edu.tr/icetin/mdcnbiostat16-nonparametric-tests.pdf · Eastern Mediterranean University Faculty of Medicine Biostatistics

© 2011 Pearson Education, Inc

Wilcoxon Signed Rank Test for a Paired Difference Experiment

Let D1 and D2 represent the probability distributions for populations 1 and 2, respectively.

Two-Tailed Test

H0: D1 and D2 are identical

Ha: D1 is shifted to the left or to the right of D2

Page 23: Eastern Mediterranean University Faculty of Medicine ...brahms.emu.edu.tr/icetin/mdcnbiostat16-nonparametric-tests.pdf · Eastern Mediterranean University Faculty of Medicine Biostatistics

© 2011 Pearson Education, Inc

Conditions Required for a Valid Signed Rank Test

1. The sample of differences is randomly selected from the population of differences.

2. The probability distribution from which the sample of paired differences is drawn is continuous.