Testy nieparametryczne cz I medycyna praktyczna


Medycyna Praktyczna - portal dla lekarzy

0x01 graphic

II

II

II

II

II

II

II

stężenie
adrenaliny

5,33

22,50

11,74

7,39

12,70

13,22

8,53

22,80

12,70

7,78

9,63

8,90

ranga

1

19

9

2

11,5

13

5

20

11,5

3

8

6

...

Rangi

...

8

9

10

11,5

11,5

13

14

...

M

K

K

M

K

M

M

K

seria

1

2

3

4

5

6

7

8

9

10

11

12

13

Testy nieparametryczne - cz. I

Podstawy statystyki dla prowadzących badania naukowe
Odcinek 11: Testy nieparametryczne - cz. I

mgr Andrzej Stanisz z Zakładu Biostatystyki i Informatyki Medycznej Collegium Medicum UJ w Krakowie (Kierownik Zakładu: prof. dr hab. Andrzej Żarnecki)
Data utworzenia: 14.09.2000
Ostatnia modyfikacja: 30.04.2007
Opublikowano w Medycyna Praktyczna 1999/09

W poprzednich odcinkach zostały przedstawione różnorodne parametryczne testy istotności różnic, zarówno dla prób zależnych, jak i niezależnych. Ich użycie do opracowywania wyników badań jest ograniczone określonymi założeniami (mierzalność zmiennej, normalność jej rozkładu, jednorodność zbioru itd.), które muszą być spełnione. W przeciwnym razie wnioski z obliczeń testem parametrycznym nie będą całkowicie poprawne. Testy parametryczne są również bezużyteczne w przypadku danych jakościowych i danych uporządkowanych. W takich sytuacjach stosujemy testy nieparametryczne. Testy te nie zależą od pewnych parametrów rozkładu populacji, wzory służące do obliczeń są proste, a same obliczenia nie zajmują dużo czasu. Możemy je więc szeroko stosować, gdy nie są spełnione założenia wymagane dla testów parametrycznych. Stosujemy je również, gdy nasze dane można uporządkować według określonych kryteriów oraz dla grup o małej liczebności. Siła testów nieparametrycznych (1 minus wielkość błędu drugiego rodzaju) jest jednak mniejsza niż siła testów parametrycznych. Stosujemy je więc tylko wówczas, gdy nie możemy się posłużyć testem parametrycznym. W tym odcinku omówię grupę testów będących nieparametrycznymi odpowiednikami testu t-Studenta, do której należą:

  • test serii Walda i Wolfowitza

  • test U Manna i Whitneya

  • test Kołmogorowa i Smirnowa

Testy te służą do weryfikacji hipotezy, że dwie analizowane próby pochodzą z różnych populacji. Wymagają one założenia, że analizowane zmienne mogą być uporządkowane od wartości najmniejszej do wartości największej (tzn. są mierzone na skali porządkowej). Ich interpretacja jest właściwie taka sama, jak w przypadku testu t-Studenta dla prób niezależnych.

Przypuśćmy, że w dwóch grupach osób cierpiących na pewną chorobę zbadano stężenie adrenaliny w surowicy. Zebrane wyniki u 24 pacjentów przedstawia tabela 1.

Tabela 1

numer
grupy

I

I

I

I

I

I

I

I

I

I

I

I

stężenie
adrenaliny

14,34

20,33

18,79

8,22

31,50

12,08

22,00

9,22

19,50

78,89

30,48

45,86

ranga

14

17

15

4

22

10

18

7

16

24

21

23

numer
grupy

II

II

II

II

II

Chcemy zweryfikować hipotezę, że stężenie adrenaliny w obu grupach jest jednakowe. Ponieważ zmienna "stężenie adrenaliny" nie ma rozkładu normalnego, nie możemy zastosować testu t-Studenta, posłużymy się więc jego nieparametrycznym odpowiednikiem.

W pakiecie statystycznym STATISTICA, który pomoże nam w obliczeniach, testy nieparametryczne tworzą osobny moduł (rys. 1).

0x01 graphic

Rys. 1. Okno modułu "Statystyki nieparametryczne" w pakiecie STATISTICA

Jako pierwszy opiszemy test Manna i Whitneya, ponieważ wśród testów nieparametrycznych jest on najmocniejszy. Stosujemy go w celu porównania dwóch grup danych, gdy:

  • dane są mierzalne (ilościowe), ale ich rozkład zdecydowanie odbiega od rozkładu normalnego (czyli nie jest spełnione założenie testu t-Studenta) - w takim przypadku możemy hipotezę zerową formułować jako brak istotnej różnicy średnich arytmetycznych; oczywiście test Manna i Whitneya możemy też zastosować do danych spełniających założenia testu t-Studenta; pamiętajmy jednak, że jego moc wynosi wówczas około 95% mocy testu t-Studenta;

  • dane są typu porządkowego - w tym przypadku hipoteza zerowa zakłada, że badane grupy pochodzą z tych samych populacji, tzn. rozkłady danych w analizowanych grupach nie różnią się istotnie; dla danych porządkowych nie można bowiem obliczać wartości średniej, a prawidłową miarą tendencji centralnej jest mediana.

Punktem wyjścia w teście Manna i Whitneya jest nadanie wynikom obserwacji rang. Z tego powodu test ten znany jest również (zwłaszcza w czasopismach zagranicznych) pod nazwą testu Wilcoxona dla sumy rang. Rangowanie przeprowadzamy następująco:

1. Porządkujemy rosnąco wartości obu prób.

2. Zaczynając od wartości najmniejszej (lub największej), przyporządkowujemy poszczególnym obserwacjom kolejne liczby naturalne.

3. W przypadku wystąpienia wartości jednakowych przyporządkowujemy im tzw. rangi wiązane (średnia arytmetyczna z rang, jakie powinno im się przypisać).

Dla naszych danych mamy np. tabela:

Grupa

...

II

II

I

I

II

II

I

...

wartość

...

9,63

11,74

12,08

12,7

12,7

13,22

14,34

Rangi przypisane wartościom z analizowanego przykładu podane są w tabeli 1.

Rysunek 2. przedstawia ostateczny arkusz wyników testu Manna i Whitneya.

Ponumerowane pola w arkuszu wyników (najważniejsze dla interpretacji) oznaczają odpowiednio:

[1] sumę rang dla grupy oznaczonej symbolem "a"

[2] sumę rang dla grupy oznaczonej symbolem "b" (wyliczenie sumy rang stanowi pomocniczy etap w obliczeniu wartości testu i podejmowanych decyzji)

[3] wartość testu Manna i Whitneya stosowanego dla małych liczebności (<20)

[4] wartość testu Manna i Whitneya, gdy liczebność obu grup wynosi >20

[5] poziom istotności wyliczony dla wyniku testu [4]

[6] wartość testu skorygowanego, stosowanego ze względu na rangi wiązane, dla liczebności obu grup >20

[7] poziom istotności wyliczony dla wyniku testu [6]

[8] liczebność grupy "a"

[9] liczebność grupy "b"

[10] dla prób o małej liczebności obliczana jest wartość 2*p, gdzie p równe 1 minus odpowiednia wartość dystrybuanty rozkładu statystyki U (stosujemy, gdy nie występują rangi wiązane)

Uemp=min(U1, U2)

Jak widać z arkusza wyników, możemy na poziomie istotności p = 0,018 odrzucić hipotezę zerową. Stwierdzamy więc, że różnica między stężeniami adrenaliny w obu grupach jest statystycznie istotna. Potwierdza to interpretacja graficzna (wykres "skrzynka z wąsami") na rysunku 3.

0x01 graphic

Rys. 3. Interpretacja graficzna testu dla pierwszego przykładu

Rozważmy drugi przykład. Oceniono stan kliniczny 19 pacjentów cierpiących na pewną chorobę. Lekarze określili ten stan, wskazując za pomocą rang pozycję każdego pacjenta na liście stanu od najlżejszego do najcięższego. Niezależnie od tego określono płeć pacjenta. Zebrane dane przedstawia tabela 2.

Tabela 2

stan

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

płeć

K

K

M

M

K

K

K

M

K

M

K

Chcemy sprawdzić, czy hipoteza, że mężczyźni ciężej przechodzą daną chorobę, znajduje potwierdzenie w zebranych danych. Do rozstrzygnięcia tego problemu wykorzystamy tym razem test Walda i Wolfowitza.

Konstrukcja tego testu jest następująca: wyobraźmy sobie, że chcemy porównać osoby płci męskiej i żeńskiej pod względem stanu klinicznego. Należy uporządkować dane według tej zmiennej i znaleźć przypadki, gdy w uporządkowanych danych obok siebie występują osoby tej samej płci - są to tzw. serie. Liczbę serii wyliczoną dla naszych przykładowych danych zawiera trzeci wiersz tabeli 2 (13 serii). Jeżeli nie ma różnic pomiędzy osobami obu płci, wówczas liczba i długość takich sąsiadujących ze sobą serii osób tej samej płci będzie się układać w mniejszym lub większym stopniu w sposób losowy. W przeciwnym razie dwie grupy (w naszym przykładzie odmiennej płci) różnią się między sobą. Test ten zakłada, że rozważana zmienna jest zmienną ciągłą, mierzoną przynajmniej w skali porządkowej (tzn. istnieje możliwość rangowania). Test służy do oceny hipotezy, że dwie niezależne próby zostały pobrane z dwu populacji różniących się pod pewnym względem, tj. nie tylko pod względem średniej, ale również ogólnego kształtu rozkładu. Hipoteza zerowa zakłada, że dwie próby pochodzą z tej samej populacji. Z tego względu test ten różni się od parametrycznego testu t, który służy ściśle do oceny różnic średnich dwóch prób. W zależności od liczebności stosuje się tzw. poprawki na ciągłość. Skorygowany wynik wraz ze skorygowaną wielkością p jest podawany w arkuszu wyników (rys 4.).

Najważniejsze pola w arkuszu wyników oznaczają odpowiednio:

[1] liczebność grupy oznaczonej symbolem "K" (kobiety)

[2] liczebność grupy oznaczonej symbolem "M" (mężczyźni)

[3] średnią wartości grupy "K" (o ile pojęcie to ma sens)

[4] średnią wartości grupy "M" (o ile pojęcie to ma sens)

[5] wartość testu Walda i Wolfowitza, gdy liczebność obu grup wynosi >20

[6] poziom istotności wyliczony dla wartości testu [5]

[7] wartość testu skorygowanego, stosowanego dla małych liczebności (<20)

[8] poziom istotności dla testu poprawionego

[9] liczbę serii - podstawową wielkość w konstrukcji testu Walda i Wolfowitza; w naszym przykładzie występuje 13 serii; hipotezę zerową odrzucamy, gdy liczba serii jest zbyt mała.

Jak wynika z arkusza wyników testu Walda i Wolfowitza, poziom istotności p dla naszego przykładu wynosi 0,184. Nie mamy podstaw do odrzucenia hipotezy zerowej. Zatem zebrane obserwacje nie potwierdzają naszego przypuszczenia, że mężczyźni ciężej przechodzą daną chorobę. Przedstawia to graficznie rysunek 5.

0x01 graphic

Więcej informacji znajdą Państwo na stronie http://www.mp.pl
Copyright © 1996 - 2007 Medycyna Praktyczna

Mann-Whitney U

From Wikipedia, the free encyclopedia

Jump to: navigation, search

In statistics, the Mann-Whitney U test (also called the Mann-Whitney-Wilcoxon (MWW), Wilcoxon rank-sum test, or Wilcoxon-Mann-Whitney test) is a non-parametric test for assessing whether two samples of observations come from the same distribution. The null hypothesis is that the two samples are drawn from a single population, and therefore that their probability distributions are equal. It requires the two samples to be independent, and the observations to be ordinal or continuous measurements, i.e. one can at least say, of any two observations, which is the greater. More generally, the Wilcoxon-Mann-Whitney two-sample test may be thought of as testing the null hypothesis that the probability of an observation from one population exceeding an observation from the second population is equal to 0.5. Another alternative interpretation is that the test assesses whether the Hodges-Lehmann estimate of the difference in central tendency between the two populations is zero. The Hodges-Lehmann estimate for this two-sample problem is the median of all possible differences between an observation in the first sample and an observation in the second sample. It is commonly thought that the MWW test tests for differences in medians but this is not strictly true.

It is one of the best-known non-parametric significance tests. It was proposed initially by Wilcoxon (1945), for equal sample sizes, and extended to arbitrary sample sizes and in other ways by Mann and Whitney (1947). MWW is virtually identical to performing an ordinary parametric two-sample t test on the data after ranking over the combined samples.

Contents

[hide]

0x01 graphic
[edit] Calculations

The test involves the calculation of a statistic, usually called U, whose distribution under the null hypothesis is known. In the case of small samples, the distribution is tabulated, but for samples above about 20 there is a good approximation using the normal distribution. Some books tabulate statistics equivalent to U, such as the sum of ranks in one of the samples.

The U test is included in most modern statistical packages. It is also easily calculated by hand, especially for small samples. There are two ways of doing this.

For small samples a direct method is recommended. It is very quick, and gives an insight into the meaning of the U statistic.

  1. Choose the sample for which the ranks seem to be smaller (The only reason to do this is to make computation easier). Call this "sample 1," and call the other sample "sample 2."

  2. Taking each observation in sample 1, count the number of observations in sample 2 that are smaller than it (count a half for any that are equal to it).

  3. The total of these counts is U.

For larger samples, a formula can be used:

  1. Arrange all the observations into a single ranked series. That is, rank all the observations without regard to which sample they are in.

  2. Add up the ranks in sample 1. The sum of ranks in sample 2 follows by calculation, since the sum of all the ranks equals N(N + 1)/2 where N is the total number of observations.

  3. "U" is then given by:

0x01 graphic

where n1 is the two sample size for sample 1, and R1 is the sum of the ranks in sample 1.

Note that there is no specification as to which sample is considered sample 1. An equally valid formula for U is

0x01 graphic

The sum of the two values is then given by

0x01 graphic

Knowing that R1 + R2 = N(N + 1)/2 and N = n1 + n2, and doing some algebra, we find that the sum is

0x01 graphic

The maximum value of U is the product of the sample sizes for the two samples. In such a case, the "other" U would be 0.

Uemp=min(U1, U2)

[edit] Example

Suppose that Aesop is dissatisfied with his classic experiment in which one tortoise was found to beat one hare in a race, and decides to carry out a significance test to discover whether the results could be extended to tortoises and hares in general. He collects a sample of 6 tortoises and 6 hares, and makes them all run his race. The order in which they reach the finishing post (their rank order) is as follows, writing T for a tortoise and H for a hare:

T H H H H H T T T T T H

(his original tortoise still goes at warp speed, and his original hare is still lazy, but the others run truer to stereotype). What is the value of U?

the sum of the ranks achieved by the tortoises is 1 + 7 + 8 + 9 + 10 + 11 = 46.

Therefore U = 46 − 6×7/2 = 46 − 21 = 25.

the sum of the ranks achieved by the hares is 2 + 3 + 4 + 5 + 6 + 12 = 32, leading to U = 32 - 21 = 11.

Consulting the table referenced below, we find that this result does not confirm the greater speed of tortoises. It also does not show any significant speed advantage for hares.

[edit] Approximation

For large samples, the normal approximation:

0x01 graphic

can be used, where z is a standard normal deviate whose significance can be checked in tables of the normal distribution. mU and σU are the mean and standard deviation of U if the null hypothesis is true, and are given by

0x01 graphic

0x01 graphic

All the formulae here are made more complicated in the presence of tied ranks, but if the number of these is small (and especially if there are no large tie bands) these can be ignored when doing calculations by hand. The computer statistical packages will use them as a matter of routine.

Note that since U1 + U2 = n1 n2, the mean n1 n2/2 used in the normal approximation is the mean of the two values of U. Therefore, you can use U and get the same result, the only difference being between a left-tailed test and a right-tailed test.

[edit] Relation to other tests

The U test is useful in the same situations as the independent samples Student's t-test, and the question arises of which should be preferred. U remains the logical choice when the data are ordinal but not interval scaled, so that the spacing between adjacent values cannot be assumed to be constant. It is much less likely than the t test to give a spuriously significant result because of one or two outliers. When normality holds, MWW has a Pitman efficiency of 0x01 graphic
or about 0.95 when compared to the t test. For distributions sufficiently far from normal and for sufficiently large sample sizes, the MWW can be considerably more efficient than the t. For large samples and the normal, the efficiency loss is only 5%, maybe a small price to pay so one could recommend MWW as the default test for comparing interval or ordinal measurements. The relation between efficiency and power in concrete situations isn't trivial though. For small sample sizes one should investigate the power of the MWW vs t.

On the other hand, the U test is often recommended for situations where the distributions of the two samples are very different. This is an error: it tests whether the two samples come from a common distribution, and Monte Carlo methods have shown that it is capable of giving erroneously significant results in some situations where samples are drawn from distributions with the same mean and different variances. In that situation, the version of the t test that allows for the samples to come from populations of different variance is likely to give more reliable results, if normality holds. Indeed, as an alternative to the U test, some authors (e.g. Conover) suggest transforming the data to ranks (if they are not already ranks) and then performing the t test on the transformed data, the version of the t test used depending on whether or not the population variances are suspected to be different. The Brown-Forsythe test has been suggested as an appropriate non-parametric equivalent to the F test for equal variances.

The U test is related to a number of other non-parametric statistical procedures. For example, it is equivalent to Kendall's τ correlation coefficient if one of the variables is binary (that is, it can only take two values).

A statistic called ρ that is linearly related to U and widely used in studies of categorization (discrimination learning) is calculated by dividing U by its maximum value for the given sample sizes, which is simply n1 × n2. ρ is thus a non-parametric measure of the overlap between two distributions; it can take values between 0 and 1, and it is equal to 0x01 graphic
, where X and Y are randomly chosen observations from the two distributions. Both extreme values represent complete separation of the distributions, while a ρ of 0.5 represents complete overlap. ρ is also known as the area under the receiver operating characteristic (ROC) curve.

[edit] Example statement of results

Outcomes of the two treatments were compared using the Wilcoxon-Mann-Whitney two-sample rank-sum test. The treatment effect (difference between treatments) was quantified using the Hodges-Lehmann (HL) estimator, which is consistent with the Wilcoxon test (ref. 5 below). This estimator (HLΔ) is the median of all possible differences in outcomes between a subject in group B and a subject in group A. A non-parametric 0.95 confidence interval for HLΔ accompanies these estimates as does ρ, an estimate of the probability that a randomly chosen subject from population B has a higher weight than a randomly chosen subject from population A.

The median [quartiles] weight for subjects on treatment A and B respectively are 147 [121, 177] and 151 [130, 180] pounds. Treatment A decreased weight by HLΔ = 5 lbs. (0.95 CL [2, 9] lbs., 2P = 0.02, ρ = 0.58).

[edit] See also

[edit] References

[edit] Implementations

Retrieved from "http://en.wikipedia.org/wiki/Mann-Whitney_U"

Categories: Statistical tests | Non-parametric statistics

Views0x01 graphic
0x01 graphic
0x01 graphic
0x01 graphic
0x01 graphic
0x01 graphic
0x01 graphic
0x01 graphic
0x01 graphic
0x01 graphic
0x01 graphic
0x01 graphic
0x01 graphic
0x01 graphic
0x01 graphic
0x01 graphic
0x01 graphic
0x01 graphic
0x01 graphic
0x01 graphic
0x01 graphic
0x01 graphic
0x01 graphic
0x01 graphic
0x01 graphic
0x01 graphic
0x01 graphic
0x01 graphic
0x01 graphic
0x01 graphic

6



Wyszukiwarka

Podobne podstrony:
Pytania egzamin praktyczny z anatomii cz.2, medycyna, Anatomia
testy nieparametryczne
testy funkcjonalne, FIZJOTERAPIA, Egzamin praktyczny
AOS AOS załącznik nr 2 cz 7 medycyny nuklearnej 29 08 09podpis
Test egzamin wewnetrzny z specjalizacji pielegniarstwa ratun, 2431, Prace, testy studia psych&medycy
TESTY FUNKCONALNE cz 2
Medycyna praktyczna, Leki stosowane w reanimacji dzieci, Leki stosowane w reanimacji dzieci
Medycyna praktyczna, Brak tętna u dzieci, Brak tętna u dzieci
15 testy nieparametryczne
Wyklad 9 statystyka testy nieparametryczne
Testy nieparametryczne
1egzamin Warszawa, 2431, Prace, testy studia psych&medycyna&ratownictwo&pieleg z Bydzi i innych
zadania zawodowe - eII, 2431, Prace, testy studia psych&medycyna&ratownictwo&pieleg z Bydzi i innych
Ostre Stany w Pulmonologii cz.I, medycyna, giełdy, interna1, interna j, pulmonologia i alergologia
Medycyna praktyczna, Ostre zatrucia, Ostre zatrucia

więcej podobnych podstron