Вы находитесь на странице: 1из 7

NSG 322 Introduction to Biomedical Research Week 3 Lecture

Parametric and Non-Parametric Tests


Parametric tests are used when we make a generalization about at least one parameter (population measure) and infer back to the population from our sample. The generally require at least near normal distribution of values of variables and at least one scale level variable (or that at least approaches scale). They are more powerful than their counterparts, the non-parametric tests. Parametric tests include t-tests and ANOVA. Non-parametric tests are not used to deal with hypotheses about population parameters, nor do they require normal distributions. They can be used with all levels of measurement. The most basic non-parametric test is the chi-square test.

Chi-Square Test
The chi-square test for independence is the basic non-parametric test with which we determine if two categorical variables are independent; basically, whether there is a relationship between the categorical variables. The chi-square (represented by 2) test compares the observed and expected cell frequencies of a contingency table. The expected frequencies are those we would expect to see if the subjects were distributed through the table randomly while the observed frequencies are those counts we literally got in the course of some research. If the observed frequencies differ from the expected by a significant amount, we say there is a relationship between the categories, that is, being in one category of a variable makes it more likely the subject will be in a particular category of another variable. The hypotheses for the chi-squared test are: H0: There is no relationship between categorical variables H1: There is a relationship between categorical variables The chi-square test may be used when both the independent and dependent variables are nominal, and sometimes with ordinal variables if there are very few categories. Sometimes scale variables are grouped such that they can be analyzed with the chi-square test. We might group age into >30 and 30, or income into <$30,000 and 30,000. The chi-square test, like the t-test, assumes random and independent sampling. Unlike the t-test though, no assumptions are made about the distribution shape or the homogeneity of the subjects. Each subject must qualify for placement in only one cell; the cells must be mutually exclusive. The expected frequency for each cell must be greater than zero (or division by zero issues occur). The 2X2 table is the simplest form for the chi-square but up to n1Xn2 may be use. Generally, as the table gets too big, however, power will decrease. Below is an example of a contingency table from a study on hypertension generated in SPSS. In this table the two categorical variables are the subject having diabetes (yes or no) and having had a stroke (yes or no). In this case the independent variable is diabetes and the dependent variable is stroke. In this table, diabetes makes up the rows, and stroke makes up the columns. We will need to keep track of the column and row totals when we calculate our expected values. Tweeten 5/31/2013

NSG 322 Introduction to Biomedical Research SPSS example of crosstabs:


subject has diabetes * subject had stroke Crosstabulation Count subject had stroke no yes 67 10 15 8 82 18 Total 77 23 100

subject has diabetes Total

no yes

From this table we can calculate the chi-square statistic, 2, the formula for which is below:

2 =

(Oij Eij)2 Eij

with df = (r-1)(c-1)

Where Oij = observed cell frequencies Eij = expected cell frequencies = row total X column total Total count (N) r = number of rows c = number of columns

So, from our example we can calculate the following expected values: diabetes no/stroke no diabetes no/stroke yes diabetes yes/stroke no diabetes yes/stroke yes When we calculate 2 we get: E11 = (77X82)/100 = 63.1 E12 = (77X18)/100 = 13.9 E21 = (23X82)/100 = 18.9 E22 = (23X18)/100 = 4.1

2 =

(67 63.1)2 + (10 13.9)2 + (15 18.9)2 + (8 4.1)2 63.1 13.9 18.9 4.1

= 5.7 With df = (r-1)(c-1) = (2-1)(2-1) = 1 X 1 = 1

Tweeten 5/31/2013

NSG 322 Introduction to Biomedical Research We can check this calculated value against the table value at our alpha level and the given degrees of freedom, just as we did for t-tests or ANOVA. SPSS provides us easy to read output for chi-square tests. The output for our example is shown below:
Chi-Square Tests Value 5.700 b 4.319 5.093 5.643 100 df 1 1 1 1 Asymp. Sig. (2-sided) .017 .038 .024 .018 Exact Sig. (2-sided) Exact Sig. (1-sided)

Pearson Chi-Square a Continuity Correction Likelihood Ratio Fisher's Exact Test Linear-by-Linear Association N of Valid Cases

.028

.023

a. Computed only for a 2x2 table b. 1 cells (25.0%) have expected count less than 5. The minimum expected count is 4. 14.

SPSS calculated the same result and provides a p-value associated with our result (under the column Asymp. Sig. (2-sided)). The p-value provided is 0.017 which, because it is less than 0.05, we say is significant. We can say that there is a relationship between having diabetes and having a stroke. Note though, that there is a foot note (b) associated with the calculated Pearson chi-square value. In this particular case, one of the cells has an expected cell frequency of 4. When a 2X2 table has an expected cell frequency of less than 5, we have to take into account this small cell size. The Fishers exact test is a variation on the chi-square test, which takes into account small expected cell sizes. This test can only be used with a 2X2 table, so sometimes it may be necessary to collapse a table down to a 2X2 size. For example, we might have 4 age groups in a table (a 2X4 table) and one of the expected frequencies might be less than 5. In this case we could collapse the table down so that there were only two age categories by combining some of them. If we cannot collapse the table, the calculated value of the chi-square statistic, although not truly appropriate, can give us a clue about a relationship but cannot provide actual significance values. In our example, we can see that both a one-sided and a two-sided (equivalent to a one-tail and a two-tail) result is provided. In general, as in all other testing, we use a two-sided test. The p-value provided for the Fishers exact test is 0.028 still significant so we can say there is a relationship between diabetes and having a stroke. Yates Correction for Continuity is a variation on the chi-square test when the expected cell frequency in any cell in a 2X2 table is less than 10. It provides a more conservative estimate which is sometimes desirable with small cells sizes. There is, however, some controversy over its use and it does reduce power. Yates Correction works by subtracting 0.5 from each of the components of the chi-square calculation, resulting in a somewhat reduced chi-square value:

Tweeten 5/31/2013

NSG 322 Introduction to Biomedical Research Yates Correction for Continuity:

2 =

(| O-E| - 0.5)2 E

A chi-square goodness of fit test is analogous to the one-sample t-test and is performed when you wish to see if your distribution of categorical variables matches that of a known population. Other non-parametric tests are available when the dependent variable is nominal or ordinal, or when the assumptions necessary for parametric tests cannot be met (particularly if samples sizes are small or distributions are not normal. Some of these are summarized in the table below:

Level of Measurement of Dependent Variable Number of Groups 2 3+ 2 3+


Independent

Nominal 2 test or Fishers Exact 2 test McNemar Cochrans Q

Ordinal MannWhitney U Kruskal-Wallis Wilcoxon signed-ranks Friedman

Interval/Ratio t-test ANOVA Paired t-test RANOVA

Independent

Dependent/ repeated measures Dependent/ repeated measures

In general, non-parametric tests that involve ordinal dependent variables use some form of ranking. The Mann-Whitney U test is popularly used when the dependent variable is ordinal and is the analog of the independent groups t-test. If we had two groups of patients receiving different treatments with the following scores after treatment: Group A: Group B: 14, 10, 19, 16, 11, 15, 22, 18, 17 13

Tweeten 5/31/2013

NSG 322 Introduction to Biomedical Research We could arrange the scores in order and rank them: Score: 10 Group: B Rank: 1 11 A 2 13 B 3 14 A 4 15 B 5 16 B 6 17 A 7 18 B 8 19 A 9 20 A 10

The ranks are then summed: RA = 2 + 4 + 7 + 9 + 10 = 32 RB = 1 + 3 + 5 + 6 + 8 = 23 The formula for computing the U statistic for Group A is:

UA = nAnB +

nA(nA + 1) 2

- RA

Where nA = number of observations in Group A nB = number of observations in Group B RA = summed ranks for Group A The same calculation can be done for UB substituting in the appropriate numbers for Group B. The small of the two calculated Us is used as the U statistic and can be checked against a critical table value. If the sample size in both groups is greater than 20, the U statistic can be used to calculate a z value which can be compared to a critical value for z:

z=

U nAnB/2 (nA) (nB) (nA + nB + 1) 12

When the U statistic is transformed to a z using this formula, it is equivalent to the Wilcoxon rank sum test. The Kruskall-Wallis test is the non-parametric counterpart to the simple ANOVA, involves ranking, and should be used only when there are at least five cases per group. It is similar to the Mann-Whitney U test in that the scores are ranked and a sum of ranks is calculated. The statistic of interest, H, is calculated as:

Tweeten 5/31/2013

NSG 322 Introduction to Biomedical Research

H=

12 N(N+1)

][ ]
R2 n

- 3(N+1)

Where N = total sample size R = summed ranks for a group n = number of observations in a group = sum of the R2/n ratios for all groups The H statistic approximates the chi-square distribution at k-1 degrees of freedom, where k is the number of groups. Like ANOVA a significant result with a Kruskal-Wallis test does not mean that all groups are significantly different from one another. Post hoc tests are needed to determine which pairs of groups differ. This is most often done with a Dunn procedure. The McNemar test is the chi-square analog to the paired t-test, that is, subjects are related in some way. This test looks at what proportion of subjects change from one category to another in the course of some intervention. In the example below, subjects were asked before and after an educational program if they did breast self exams (BSE):
BSE After Intervention Yes No A B 15 0 C D 5 30

BSE Before Intervention

Yes No

In the McNemar test, unless the sample sizes are very small, it is most convenient to use the chi-square distribution (always at 1 degree of freedom) calculated as: (| C B | - 1)2 C+B Where C = number in cell C (changed from yes to no) B = number in cell B (changed from yes to no) | | = absolute value of the difference

The Wilcoxon Signed-Ranks Test is the non-parametric counterpart to the paired (dependent groups) t-test. This test involves ranking the differences in scores between the pairs of subjects. When the number of pairs is 10 or greater, a z statistic can be calculated:

Tweeten 5/31/2013

NSG 322 Introduction to Biomedical Research

R+ - R E z= (2n + 1) RE 6 Where R+ = sum of ranks for the positive differences RE = average of R+ and the sum of the negative differences n = total number of subjects Cochrans Q test is the non-parametric analog of RANOVA and used to test for differences in proportion when the dependent variables is dichotomous and there are three or more repeated observations or correlated groups. A Q statistic is calculated which follows a chi-square distribution with one degree of freedom. Freidmans test is another analog of RANOVA but is used when the dependent variable is ordinal. Again a specialized chi-square is calculated with one degree of freedom.

Tweeten 5/31/2013

Вам также может понравиться