330 likes | 456 Views
HYPOTHESIS TESTING: ABOUT MORE THAN TWO (K) INDEPENDENT POPULATIONS. ONE-WAY AN ALYSIS O F VA RIANCE ( ANOVA ). Analysis of variance is used for two different purposes: To estimate and test hypotheses about population variances To estimate and test hypotheses about population means.
E N D
HYPOTHESIS TESTING: ABOUT MORE THAN TWO (K) INDEPENDENT POPULATIONS
ONE-WAY ANALYSIS OF VARIANCE (ANOVA) • Analysis of variance is used for two different purposes: • To estimate and test hypotheses about population variances • To estimate and test hypotheses about population means We are concerned here with the latter use.
Assumptions: • We have K independent samples, one from each of K populations. • Each population has a normal distribution with unknown mean i • All of the populations have the same standard deviation (unknown) H0: 1= 2=3=...= k Ha: Not all the i are equal.
Treatment 1 2 3 k x11 x12 x13 x1k x21 x22 x23 x2k x31 x32 x33 x3k Total T.1 T.2 T.3 T.k T.. Mean
The Total Sum of Squares SST=SSA+SSW The Within Groups Sum of Squares The Among Groups Sum of Squares
Among groups mean square Within groups mean square Variance Ratio (F)
Testing for Significant Differences Between Individual Pairs of Means Whenever the analysis of variance leads to a rejection of the null hypothesis of no difference among population means, the question naturally arise regarding just which pairs of means are different. Over the years several procedures for making individual comparisons have been suggested. • LSD (Least Significant Difference ) • Sidak • Tukey • Dunnett’s C • Bonferroni • Dunnett’s T3 The oldest procedure, and perhaps the one most widely used in the past, is the Least Significant Difference (LSD) procedure.
Least Significant Difference (LSD) When sample sizes are equal (n1=n2=n3=...=nk=n) p<0.05 When sample sizes are not equal (n1n2 n3... nk) p<0.05
Example In a study of the effect of glucose on insulin release, specimens of pancreatictissue from experimental animals were randomly assigned to be treated with one of five different stimulants. Later, a determination was made on the amount of insulin released. The experimenters wished to know if they could conclude that there is a difference among the five treatments with respect to the mean amount of insulin released. The resulting measurements of amount of insulin released following treatment are displayed in the table. • The five sets of observed data constitute five independent samples from the respective populations. • Each of the populations from which he samples come is normally distributed with mean,i, and variances i2. • Each population has the same variance.
H0: 1= 2=3= 4 = 5 Ha: Not all the i are equal. SSA=SST-SSW=162.54282-41.35739=121.18543
ANOVA TABLE Sum of Squares df Mean Square F Sig. Between Groups 121,185 4 30,296 19,779 ,000 Within Groups 41,357 27 1,532 Total 162,543 31 MSW=SSW/27=41.357/27=1.532 MSA=SSA/(5-1)=121.185/4=30.296 F=MSA/MSW=30.296/1.532=19.779 We conclude that not all population means are equal.
LSD Multiple Comparisons Mean 95% Confidence Interval Difference (I) Stimulant (J) Stimulant (I-J) Std. Error Sig. Lower Bound Upper Bound 1,00 2,00 8,000E-03 ,7494 ,992 -1,5297 1,5457 3,00 -2,3937 * ,7494 ,004 -3,9314 -,8560 4,00 -4,2049 * ,7247 ,000 -5,6918 -2,7179 5,00 -4,4933 * ,7056 ,000 -5,9409 -3,0456 2,00 1,00 -8,0000E-03 ,7494 ,992 -1,5457 1,5297 3,00 -2,4017 * ,7146 ,002 -3,8678 -,9355 4,00 -4,2129 * ,6886 ,000 -5,6257 -2,8000 5,00 -4,5013 * ,6684 ,000 -5,8727 -3,1298 3,00 1,00 2,3937 * ,7494 ,004 ,8560 3,9314 2,00 2,4017 * ,7146 ,002 ,9355 3,8678 4,00 -1,8112 * ,6886 ,014 -3,2240 -,3984 5,00 -2,0996 * ,6684 ,004 -3,4710 -,7281 4,00 1,00 4,2049 * ,7247 ,000 2,7179 5,6918 2,00 4,2129 * ,6886 ,000 2,8000 5,6257 3,00 1,8112 * ,6886 ,014 ,3984 3,2240 5,00 -,2884 ,6405 ,656 -1,6027 1,0259 5,00 1,00 4,4933 * ,7056 ,000 3,0456 5,9409 2,00 4,5013 * ,6684 ,000 3,1298 5,8727 3,00 2,0996 * ,6684 ,004 ,7281 3,4710 4,00 ,2884 ,6405 ,656 -1,0259 1,6027 *. The mean difference is significant at the .05 level.
KRUSKAL- WALLIS ONE-WAY ANOVA When the assumptions underlying One-way ANOVA are not met, that is, when the populations from which the samples are drawn are not normally distributed with equal variances, or when the data for analysis consist only of ranks, a nonparametric alternative to the one-way analysis of variance may be used to test the hypothesis of equal location parameters.
The application of the test involves the following steps: • The n1, n2, ..., nk observations from the k groups are combined into a single series of size n and arranged in order of magnitude from smallest to largest. The observations are then replaced by ranks. • The ranks assigned to observations in each of the k groups are added separately to give k rank sums. • The test statistic • is computed. # of groups Sum of ranks in jth group # of obs. in jth group
When there are three groups and five and fewer observations in each group, the significance of the computed KW is determined by using special tables. When there are more than five observations in one or more of the groups, KW is compared with the tabulated values of 2 with k-1 df.
Determing which groups are significantly different Like the one-way ANOVA, the Kruskal-Wallis test is an overall test of significant result, the test does not indicate where the differences are among the groups. To determine which groups are significantly different from one another, it is necessary to undertake multiple comparisons. p<0.05
Example The effect of two drugs on reaction time to a certain stimulus were studied in three groups of experimental animals. Group III served as a control while the animals in group I treated with drug A and those in group II were treated with drug B prior to the application of the stimulus. Table shows the reaction times in seconds of 13 animals. Can we conclude that the three populations represented by the three samples differ with respect to reaction time? H0: The population distributions are all identical. Ha: At least one of the populations tends to exhibit larger values than at least one of the other populations.
KW(5,4,4;0.05)=5.617<KWcal p<0.05, reject H0.
rxc Chi Square Test We can use the chi-square test to compare frequencies or proportions in two or more groups. The classification according to two criteria, of a set of entities, can be shown by a table in which the r rows represents the various levels of one criterion of classification and c columns represent the various levels of the second criterion. Such a table is generally called a contingency table. We will be interested in testing the null hypothesis that in the population the two criteria of classification are independent or associated.
df = (r-1)(c-1) No more than 20% of the cells should have expected frequencies of less than 5.
Example A research team studying the relationship between blood type and severity of a certain condition in a population collected data on 1500 subjects as displayed in the below contingency table. The researchers wished to know if these data were compatible with the hypothesis that severity of condition and blood type are independent.
Expected Count 541,2 213,0 92,4 473,4 1320,0 Expected Count 43,1 16,9 7,4 37,7 105,0 Expected Count 30,8 12,1 5,3 26,9 Expected Count 615,0 242,0 105,0 538,0 1500,0 Blood Type Severity of condition A B AB O Total Absent Count 543 211 90 476 1320 % within severity 41,1% 16,0% 6,8% 36,1% 100,0% Mild Count 44 22 8 31 105 % within severity 41,9% 21,0% 7,6% 29,5% 100,0% Severe Count 28 9 7 31 75 75,0 % within severity 37,3% 12,0% 9,3% 41,3% 100,0% Total Count 615 242 105 538 1500 % within severity 41,0% 16,1% 7,0% 35,9% 100,0% 0 cells (,0%) have expected count less than 5. The minimum expected count is 5,25.
H0: severity of condition and blood type are independent. Ha: severity of condition and blood type are not independent. 2(6,0.05)=12.592> 2(calculated), accept H0, p>0.05 We conclude that these data are compatible with the hypothesis that severity of the condition and blood type are independent.
Blood Type Severity of condition A B AB O Total Count 50 20 9 45 124 Absent Expected Count 50,0 22,5 9,4 42,1 124,0 Count 15 8 3 10 36 Mild Expected Count 14,5 6,5 2,7 12,2 36,0 Count 4 3 1 3 11 Severe Expected Count 4,4 2,0 ,8 3,7 11,0 Total Count 69 31 13 58 171 Expected Count 69,0 31,0 13,0 58,0 171,0 When the sample size is small and assumption about expected frequencies is not met; We decide to merge two conditions Assumption is violated
Blood Type Severity of condition Total A B AB O Count 50 20 9 45 124 Absent Expected Count 50,0 22,5 9,4 42,1 124,0 Count 19 11 4 13 47 Present Expected Count 19,0 8,5 3,6 15,9 47,0 Total Count 69 31 13 58 171 Expected Count 69,0 31,0 13,0 58,0 171,0 After combining mild and severe groups in one group, no more than 20% of the cells have expected frequencies less than 5.
If null hypothesis is rejected, how can we find the group which is different? Exclude Type O from the analysis Asymp. Sig. Value df (2-sided) a Chi-Square 12,375 3 ,006 N of Valid Cases 200 a. 1 cells (12,5%) have expected count less than 5. The minimum expected count is 3,30. 2=5,118261 2=0,204807 2=0,067016 2=7,038861 Reject H0. Which type of blood group(s) is/are different from the others ?
p>0.05 Except for blood type O, distribution of tromboembolism is similar within the others.