Nonparametric tests and ANOVAs: What you need to know - PowerPoint PPT Presentation

About This Presentation
Title:

Nonparametric tests and ANOVAs: What you need to know

Description:

Nonparametric tests are usually ... A non-parametric test to compare the medians of a group to some constant. What ... them anyway, pretending they were slightly ... – PowerPoint PPT presentation

Number of Views:47
Avg rating:3.0/5.0
Slides: 41
Provided by: lukeh4
Category:

less

Transcript and Presenter's Notes

Title: Nonparametric tests and ANOVAs: What you need to know


1
Nonparametric testsand ANOVAs What you need
to know
2
Nonparametric tests
  • Nonparametric tests are usually based on ranks
  • There are nonparametric versions of most
    parametric tests

3
Parametric
Nonparametric
One-sample and Paired t-test
Sign test
Mann-Whitney U-test
Two-sample t-test
4
Quick Reference Summary Sign Test
  • What is it for? A non-parametric test to compare
    the medians of a group to some constant
  • What does it assume? Random samples
  • Formula Identical to a binomial test with po
    0.5. Uses the number of subjects with values
    greater than and less than a hypothesized median
    as the test statistic.

P 2 Prx?X
P(x) probability of a total of x successes p
probability of success in each trial n total
number of trials
5
Sign test
Null hypothesis Median mo
Sample
Test statistic x number of values greater than
mo
Null distribution Binomial n, 0.5
compare
How unusual is this test statistic?
P gt 0.05
P lt 0.05
Reject Ho
Fail to reject Ho
6
Quick Reference Summary Mann-Whitney U Test
  • What is it for? A non-parametric test to compare
    the central tendencies of two groups
  • What does it assume? Random samples
  • Test statistic U
  • Distribution under Ho U distribution, with
    sample sizes n1 and n2
  • Formulae

n1 sample size of group 1 n2 sample size of
group 2 R1 sum of ranks of group 1
Use the larger of U1 or U2 for a two-tailed test
7
Mann-Whitney U test
Null hypothesis The two groups Have the same
median
Sample
Test statistic U1 or U2 (use the largest)
Null distribution U with n1, n2
compare
How unusual is this test statistic?
P gt 0.05
P lt 0.05
Reject Ho
Fail to reject Ho
8
Mann-Whitney U test
  • Large-sample approximation

Use this when n1 n2 are both gt 10 Compare to the
standard normal distribution
9
Mann-Whitney U Test
  • If you have ties
  • Rank them anyway, pretending they were slightly
    different
  • Find the average of the ranks for the identical
    values, and give them all that rank
  • Carry on as if all the whole-number ranks have
    been used up

10
Example
Data
14 2 5 4 2 14 18 14
11
Example
Sorted Data
Data
22 4 5 14 14 14 18
14 2 5 4 2 14 18 14
12
Example
Sorted Data
Data
22 4 5 14 14 14 18
14 2 5 4 2 14 18 14
TIES
13
Example
Sorted Data
Data
Rank them anyway, pretending they were slightly
different
22 4 5 14 14 14 18
14 2 5 4 2 14 18 14
TIES
14
Example
Sorted Data
Rank A
Data
22 4 5 14 14 14 18
12 3 4 5 6 7 8
14 2 5 4 2 14 18 14
15
Example
Sorted Data
Rank A
Data
Find the average of the ranks for the identical
values, and give them all that rank
22 4 5 14 14 14 18
12 3 4 5 6 7 8
14 2 5 4 2 14 18 14
16
Example
Sorted Data
Rank A
Data
Average 1.5
22 4 5 14 14 14 18
12 3 4 5 6 7 8
14 2 5 4 2 14 18 14
Average 6
17
Example
Sorted Data
Rank A
Data
Rank
22 4 5 14 14 14 18
12 3 4 5 6 7 8
14 2 5 4 2 14 18 14
1.51.5 3 4 6 6 6 8
18
Example
Sorted Data
Rank A
Data
Rank
22 4 5 14 14 14 18
12 3 4 5 6 7 8
14 2 5 4 2 14 18 14
1.51.5 3 4 6 6 6 8
These can now be used for the Mann-Whitney U test
19
Benefits and Costs of Nonparametric Tests
  • Main benefit
  • Make fewer assumptions about your data
  • E.g. only assume random sample
  • Main cost
  • Reduce statistical power
  • Increased chance of Type II error

20
When Should I Use Nonparametric Tests?
  • When you have reason to suspect the assumptions
    of your test are violated
  • Non-normal distribution
  • No transformation makes the distribution normal
  • Different variances for two groups

21
Quick Reference Summary ANOVA (analysis of
variance)
  • What is it for? Testing the difference among k
    means simultaneously
  • What does it assume? The variable is normally
    distributed with equal standard deviations (and
    variances) in all k populations each sample is a
    random sample
  • Test statistic F
  • Distribution under Ho F distribution with k-1
    and N-k degrees of freedom

22
Quick Reference Summary ANOVA (analysis of
variance)
  • Formulae

mean of group i overall mean
ni size of sample i N total sample size
23
ANOVA
Null hypothesis All groups have the same mean
k Samples
Test statistic
Null distribution F with k-1, N-k df
compare
How unusual is this test statistic?
P gt 0.05
P lt 0.05
Reject Ho
Fail to reject Ho
24
Quick Reference Summary ANOVA (analysis of
variance)
  • Formulae

There are a LOT of equations here, and this is
the simplest possible ANOVA
mean of group i overall mean
ni size of sample i N total sample size
25
(No Transcript)
26
dfgroup k-1 dferror N-k
27
Sum of Squares
Mean Squares
F-ratio
df
dfgroup k-1 dferror N-k
28
ANOVA Tables
Source of variation Sum of squares df Mean Squares F ratio P
Treatment
Error
Total
29
ANOVA Tables
Source of variation Sum of squares df Mean Squares F ratio P
Treatment
Error
Total
30
ANOVA Tables
Source of variation Sum of squares df Mean Squares F ratio P
Treatment k-1
Error N-k
Total N-1
31
ANOVA Tables
Source of variation Sum of squares df Mean Squares F ratio P
Treatment k-1
Error N-k
Total N-1
32
ANOVA Tables
Source of variation Sum of squares df Mean Squares F ratio P
Treatment k-1
Error N-k
Total N-1
33
ANOVA Tables
Source of variation Sum of squares df Mean Squares F ratio P
Treatment k-1
Error N-k
Total N-1

34
ANOVA Table Example
Source of variation Sum of squares df Mean Squares F ratio P
Treatment 7.22 2
Error 9.41 19
Total
35
ANOVA Table Example
Source of variation Sum of squares df Mean Squares F ratio P
Treatment 7.22 2 3.61 7.29 0.004
Error 9.42 19 0.50
Total 16.64 21
36
Additions to ANOVA
  • R2 value how much variance is explained?
  • Comparisons of groups planned and unplanned
  • Fixed vs. random effects
  • Repeatability

37
Two-Factor ANOVA
  • Often we manipulate more than one thing at a time
  • Multiple categorical explanitory variables
  • Example sex and nationality

38
Two-factor ANOVA
  • Dont worry about the equations for this
  • Use an ANOVA table

39
Two-factor ANOVA
  • Testing three things
  • Means dont differ among treatment 1
  • Means dont differ among treatment 2
  • There is no interaction between the two treatments

40
Two-factor ANOVA Table
Source of variation Sum of Squares df Mean Square F ratio P
Treatment 1 SS1 k1 - 1 SS1 k1 - 1 MS1 MSE
Treatment 2 SS2 k2 - 1 SS2 k2 - 1 MS2 MSE
Treatment 1 Treatment 2 SS12 (k1 - 1)(k2 - 1) SS12 (k1 - 1)(k2 - 1) MS12 MSE
Error SSerror XXX SSerror XXX
Total SStotal N-1
Write a Comment
User Comments (0)
About PowerShow.com