# Chapter 9 - Lecture 2 Computing the analysis of variance for simple experiments (single factor, unrelated groups experiments).

## Presentation on theme: "Chapter 9 - Lecture 2 Computing the analysis of variance for simple experiments (single factor, unrelated groups experiments)."— Presentation transcript:

Chapter 9 - Lecture 2 Computing the analysis of variance for simple experiments (single factor, unrelated groups experiments).

Simple Experiments Simple experiments have only a single independent variable with multiple levels. In simple experiments, participants are chosen independently. So participants in one group are unrelated to those in other groups.

To calculate the F test, the test use to test H 0 in the analysis of variance: zWe are going to look at two different ways of calculating mean squares to estimate the population variance and then compare the mean squares. zOne way is based on the difference between each score and its group mean. This estimate of sigma 2 is called MS W and it is familiar. zThe other way is based on the difference between the group and overall means: called MS B, it is new.

Mean square within groups Since everyone in a group is treated the same way, differences between scores and their own group mean can only reflect random individual differences and random measurement problems. This is the mean square within groups (MS W ) and it is always a good estimate of sigma 2, the population variance. MS W can index only individual differences and measurement problems (ID + MP).

Mean square between groups Differences between each group’s mean and the overall mean can reflect the effects of the independent variable (as well as the effects of random individual differences and random measurement problems). Thus MS B = ID + MP + (?)IV This is the mean square between groups (MS B ). If the independent variable pushes the group means apart, MS B will overestimate sigma 2 and be larger than MS W.

Testing the Null Hypothesis (H 0 ) H 0 says that the groups differ from each other and from the overall mean only because of random individual differences and measurement problems. These are the same things that make scores differ from their own group means. So, according to H 0, MS B and MS W are two ways of measuring the same thing (ID + MP). Two measurements of the same thing should be about equal to each other and a ratio between them should be about equal to 1.00. We could establish a 95% confidence interval around 1.00 for each pair of degrees of freedom. The F table does it for us, showing us the value of F just outside the 95% confidence interval

The Experimental Hypothesis (H 1 ) The experimental hypothesis says that the groups’ means will be made different from each other (pushed apart) by the IV, the independent variable (as well as by random individual differences and measurement problems). If the means are pushed apart, MS B will increase, reflecting the effects of the independent variable (as well as of the random factors). MS W will not So MS B will be larger than MS W Therefore, H 1 suggests that a ratio comparing MS B to MS W should be larger than 1.00.

An experiment Population: Depressed patients in a psychiatric hospital Number of participants: 9 Number of groups: 3 Design: Single factor, unrelated groups. Independent variable: Type of treatment –Level 1: Medication –Level 2: Psychotherapy –Level 3: ECT Dependent variable: HAM-D scores. (Lower = better.) H 0 : Treatments do not differ in effectiveness. H 1 : Treatments differ in effectiveness.

Computing MS W and MS B 1.1 1.2 1.3 2.1 2.2 2.3 3.1 3.2 3.3 7 10 13 10 12 17 13 17 18 999000999999000999 -3 0 3 10 13 16 13 9 0 9 1 16 9 1 4 -3 0 3 -3 4 -3 1 2 10 13 16

Ratio of mean squares = F ratio Mean Squares within groups. Mean Squares between groups. Possibly effected by independent variable. Not effected by independent variable. If the independent variable causes differences between the group means, then MS B will be larger than MS W. If the effect is large enough and/or there are enough degrees of freedom, the result may be a statistically significant F ratio.

CPE 9.2.1 - ANOVA summary table Between Groups Stress level Within Groups Error 54 2 27 26 6 9.67 2.79 SS df MS F p  ? We need to look at the F table to determine significance. Divide MS B by MS W to calculate F.

The F Table F table tells us whether the F ratio is significant. The null hypothesis predicts an F of about 1.00. We establish a 95% confidence interval around 1.00. We only pay attention to the high end of the distribution. Any F ratio smaller than the critical value at p<.05 is in the confidence interval around 1.00. F ratios smaller than the critical value are therefore consistent with the null hypothesis (no differences that can’t be explained as simply sampling fluctuation)

Statistical Significance p<.05 means that we have found an F ratio that occurs with 5 or fewer samples in 100 when the null is true.The null predicts that we will find an F ratio close to 1.00, not an unusually large F ratio. If we find a larger F ratio than the null predicts, we have shown H 0 to predict badly and reject it. Results are statistically significant when you equal or exceed the critical value of F at p<.05. If your F ratio equals or exceeds the critical value at p<.01, you get to brag.

3 10.13 9.55 9.28 9.12 9.01 8.94 8.88 8.84 34.12 30.82 29.46 28.71 28.24 27.91 27.67 27.49 Degrees of freedom in Numerator 1 2 3 4 5 6 7 8 Df in denominator 4 7.71 6.94 6.59 6.39 6.26 6.16 6.09 6.04 21.20 18.00 16.69 15.98 15.52 15.21 14.98 14.80 5 6.61 5.79 5.41 5.19 5.05 4.95 4.88 4.82 16.26 13.27 12.06 11.39 10.97 10.67 10.45 10.27 6 5.99 5.14 4.76 4.53 4.39 4.28 4.21 4.15 13.74 10.92 9.78 9.15 8.75 8.47 8.26 8.10 7 5.59 4.74 4.35 4.12 3.97 3.87 3.79 3.73 12.25 9.55 8.45 7.85 7.46 7.19 7.00 6.84 8 5.32 4.46 4.07 3.84 3.69 3.58 3.50 3.44 11.26 8.65 7.59 7.01 6.63 6.37 6.19 6.03 9 5.12 4.26 3.86 3.63 3.48 3.37 3.29 3.23 10.56 8.02 6.99 6.42 6.06 5.80 5.62 5.47

   Degrees of freedom in Numerator 1 2 3 4 5 6 7 8 Df in denominator 36 4.41 3.26 2.86 2.63 2.48 2.36 2.28 2.21 7.39 5.25 4.38 3.89 3.58 3.35 3.18 3.04 40 4.08 3.23 2.84 2.61 2.45 2.34 2.26 2.19 7.08 4.98 4.13 3.65 3.34 3.12 2.95 2.82 60 4.00 3.15 2.76 2.52 2.37 2.25 2.17 2.10 7.08 4.98 4.13 3.65 3.34 3.12 2.95 2.82 100 3.94 3.09 2.70 2.46 2.30 2.19 2.10 2.03 6.90 4.82 3.98 3.51 3.20 2.99 2.82 2.69 400 3.86 3.02 2.62 2.39 2.23 2.12 2.03 1.96 6.70 4.66 3.83 3.36 3.06 2.85 2.69 2.55  3.84 2.99 2.60 2.37 2.21 2.09 2.01 1.94 6.64 4.60 3.78 3.32 3.02 2.80 2.64 2.51

3 10.13 9.55 9.28 9.12 9.01 8.94 8.88 8.84 34.12 30.82 29.46 28.71 28.24 27.91 27.67 27.49 Degrees of freedom in Numerator 1 2 3 4 5 6 7 8 Df in denominator 4 7.71 6.94 6.59 6.39 6.26 6.16 6.09 6.04 21.20 18.00 16.69 15.98 15.52 15.21 14.98 14.80 5 6.61 5.79 5.41 5.19 5.05 4.95 4.88 4.82 16.26 13.27 12.06 11.39 10.97 10.67 10.45 10.27 6 5.99 5.14 4.76 4.53 4.39 4.28 4.21 4.15 13.74 10.92 9.78 9.15 8.75 8.47 8.26 8.10 7 5.59 4.74 4.35 4.12 3.97 3.87 3.79 3.73 12.25 9.55 8.45 7.85 7.46 7.19 7.00 6.84 8 5.32 4.46 4.07 3.84 3.69 3.58 3.50 3.44 11.26 8.65 7.59 7.01 6.63 6.37 6.19 6.03 9 5.12 4.26 3.86 3.63 3.48 3.37 3.29 3.23 10.56 8.02 6.99 6.42 6.06 5.80 5.62 5.47 These are related to the number of different treatment groups. They relate to the Mean Square between groups. k-1

3 10.13 9.55 9.28 9.12 9.01 8.94 8.88 8.84 34.12 30.82 29.46 28.71 28.24 27.91 27.67 27.49 Degrees of freedom in Numerator 1 2 3 4 5 6 7 8 Df in denominator 4 7.71 6.94 6.59 6.39 6.26 6.16 6.09 6.04 21.20 18.00 16.69 15.98 15.52 15.21 14.98 14.80 5 6.61 5.79 5.41 5.19 5.05 4.95 4.88 4.82 16.26 13.27 12.06 11.39 10.97 10.67 10.45 10.27 6 5.99 5.14 4.76 4.53 4.39 4.28 4.21 4.15 13.74 10.92 9.78 9.15 8.75 8.47 8.26 8.10 7 5.59 4.74 4.35 4.12 3.97 3.87 3.79 3.73 12.25 9.55 8.45 7.85 7.46 7.19 7.00 6.84 8 5.32 4.46 4.07 3.84 3.69 3.58 3.50 3.44 11.26 8.65 7.59 7.01 6.63 6.37 6.19 6.03 9 5.12 4.26 3.86 3.63 3.48 3.37 3.29 3.23 10.56 8.02 6.99 6.42 6.06 5.80 5.62 5.47 These are related to the number of subjects. They relate to the Mean Square within groups. n-k

3 10.13 9.55 9.28 9.12 9.01 8.94 8.88 8.84 34.12 30.82 29.46 28.71 28.24 27.91 27.67 27.49 Degrees of freedom in Numerator 1 2 3 4 5 6 7 8 Df in denominator 4 7.71 6.94 6.59 6.39 6.26 6.16 6.09 6.04 21.20 18.00 16.69 15.98 15.52 15.21 14.98 14.80 5 6.61 5.79 5.41 5.19 5.05 4.95 4.88 4.82 16.26 13.27 12.06 11.39 10.97 10.67 10.45 10.27 6 5.99 5.14 4.76 4.53 4.39 4.28 4.21 4.15 13.74 10.92 9.78 9.15 8.75 8.47 8.26 8.10 7 5.59 4.74 4.35 4.12 3.97 3.87 3.79 3.73 12.25 9.55 8.45 7.85 7.46 7.19 7.00 6.84 8 5.32 4.46 4.07 3.84 3.69 3.58 3.50 3.44 11.26 8.65 7.59 7.01 6.63 6.37 6.19 6.03 9 5.12 4.26 3.86 3.63 3.48 3.37 3.29 3.23 10.56 8.02 6.99 6.42 6.06 5.80 5.62 5.47 The critical values in the top rows are alpha =.05.

3 10.13 9.55 9.28 9.12 9.01 8.94 8.88 8.84 34.12 30.82 29.46 28.71 28.24 27.91 27.67 27.49 Degrees of freedom in Numerator 1 2 3 4 5 6 7 8 Df in denominator 4 7.71 6.94 6.59 6.39 6.26 6.16 6.09 6.04 21.20 18.00 16.69 15.98 15.52 15.21 14.98 14.80 5 6.61 5.79 5.41 5.19 5.05 4.95 4.88 4.82 16.26 13.27 12.06 11.39 10.97 10.67 10.45 10.27 6 5.99 5.14 4.76 4.53 4.39 4.28 4.21 4.15 13.74 10.92 9.78 9.15 8.75 8.47 8.26 8.10 7 5.59 4.74 4.35 4.12 3.97 3.87 3.79 3.73 12.25 9.55 8.45 7.85 7.46 7.19 7.00 6.84 8 5.32 4.46 4.07 3.84 3.69 3.58 3.50 3.44 11.26 8.65 7.59 7.01 6.63 6.37 6.19 6.03 9 5.12 4.26 3.86 3.63 3.48 3.37 3.29 3.23 10.56 8.02 6.99 6.42 6.06 5.80 5.62 5.47 The critical values in the bottom rows are for bragging rights (p<.01).

3 10.13 9.55 9.28 9.12 9.01 8.94 8.88 8.84 34.12 30.82 29.46 28.71 28.24 27.91 27.67 27.49 Degrees of freedom in Numerator 1 2 3 4 5 6 7 8 Df in denominator 4 7.71 6.94 6.59 6.39 6.26 6.16 6.09 6.04 21.20 18.00 16.69 15.98 15.52 15.21 14.98 14.80 5 6.61 5.79 5.41 5.19 5.05 4.95 4.88 4.82 16.26 13.27 12.06 11.39 10.97 10.67 10.45 10.27 6 5.99 5.14 4.76 4.53 4.39 4.28 4.21 4.15 13.74 10.92 9.78 9.15 8.75 8.47 8.26 8.10 7 5.59 4.74 4.35 4.12 3.97 3.87 3.79 3.73 12.25 9.55 8.45 7.85 7.46 7.19 7.00 6.84 8 5.32 4.46 4.07 3.84 3.69 3.58 3.50 3.44 11.26 8.65 7.59 7.01 6.63 6.37 6.19 6.03 9 5.12 4.26 3.86 3.63 3.48 3.37 3.29 3.23 10.56 8.02 6.99 6.42 6.06 5.80 5.62 5.47 In an experiment with 3 treatment groups, we have 2 df between groups (k-1). If we have 9 subjects, and 3 groups, we have 6 df within groups (n-k). Since this is the ratio of MS B to MS W, the variance estimate between groups must be 5.14 times larger than the variance estimate within groups. 5.14 If we find an F ratio of 5.14 or larger, we reject the null hypothesis and declare that there is a treatment effect, significant at the.05 alpha level.

CPE 9.2.1 - ANOVA summary table Between Groups Stress level Within Groups Error 54 2 27 26 6 9.67 2.79 SS df MS F p  ?

3 10.13 9.55 9.28 9.12 9.01 8.94 8.88 8.84 34.12 30.82 29.46 28.71 28.24 27.91 27.67 27.49 Degrees of freedom in Numerator 1 2 3 4 5 6 7 8 Df in denominator 4 7.71 6.94 6.59 6.39 6.26 6.16 6.09 6.04 21.20 18.00 16.69 15.98 15.52 15.21 14.98 14.80 5 6.61 5.79 5.41 5.19 5.05 4.95 4.88 4.82 16.26 13.27 12.06 11.39 10.97 10.67 10.45 10.27 6 5.99 5.14 4.76 4.53 4.39 4.28 4.21 4.15 13.74 10.92 9.78 9.15 8.75 8.47 8.26 8.10 7 5.59 4.74 4.35 4.12 3.97 3.87 3.79 3.73 12.25 9.55 8.45 7.85 7.46 7.19 7.00 6.84 8 5.32 4.46 4.07 3.84 3.69 3.58 3.50 3.44 11.26 8.65 7.59 7.01 6.63 6.37 6.19 6.03 9 5.12 4.26 3.86 3.63 3.48 3.37 3.29 3.23 10.56 8.02 6.99 6.42 6.06 5.80 5.62 5.47 5.14 10.92 2.79 is smaler than the critical value at the.05 alpha level (5.14). So it is not statistically significant. F (2,6)=2.79, n.s.

3 10.13 9.55 9.28 9.12 9.01 8.94 8.88 8.84 34.12 30.82 29.46 28.71 28.24 27.91 27.67 27.49 Degrees of freedom in Numerator 1 2 3 4 5 6 7 8 Df in denominator 4 7.71 6.94 6.59 6.39 6.26 6.16 6.09 6.04 21.20 18.00 16.69 15.98 15.52 15.21 14.98 14.80 5 6.61 5.79 5.41 5.19 5.05 4.95 4.88 4.82 16.26 13.27 12.06 11.39 10.97 10.67 10.45 10.27 6 5.99 5.14 4.76 4.53 4.39 4.28 4.21 4.15 13.74 10.92 9.78 9.15 8.75 8.47 8.26 8.10 7 5.59 4.74 4.35 4.12 3.97 3.87 3.79 3.73 12.25 9.55 8.45 7.85 7.46 7.19 7.00 6.84 8 5.32 4.46 4.07 3.84 3.69 3.58 3.50 3.44 11.26 8.65 7.59 7.01 6.63 6.37 6.19 6.03 9 5.12 4.26 3.86 3.63 3.48 3.37 3.29 3.23 10.56 8.02 6.99 6.42 6.06 5.80 5.62 5.47 Notice the usual effect of consistency The more df B and df W,... the better our estimates of sigma 2,... the closer F should be to 1.00 when the null is true. H 0 says that F should be about 1.00.

The t test

The t Test: t for 2, F for More The t test is a special case of the F ratio. If there are only two levels (groups) of the independent variable, then

t table and F table when there are only two groups: df in the numerator is always 1

Relationship between t and F tables Because there is always 1 df between groups, the t table is organized only by degrees of freedom within group (df W ). By the way, the values in the t table are the square root of the values in the first column of the F table.

df 12345678.05 12.7064.3033.1822.7762.5712.4472.3652.306.01 63.6579.9255.8414.6044.0323.7073.4993.355 df 910111213141516.05 2.2622.2282.2012.1792.1602.1452.1312.120.01 3.2503.1693.1063.0553.0122.9972.9472.921 df 1718192021222324.05 2.1102.1012.0932.0862.0802.0742.0692.064.01 2.8982.8782.8612.8452.8312.8192.8072.797 df 2526272829304060.05 2.0602.0562.0522.0482.0452.0422.0212.000.01 2.7872.7792.7712.7632.7562.7502.7042.660 df 1002005001000200010000.05 1.9841.9721.9651.9621.9611.960.01 2.6262.6012.5862.5812.5782.576 t table from Chapter 6 Let’s look at these values.

df 3 4 5.05 3.1822.7762.571.01 5.8414.6044.032 t table from Chapter 6 F table. 3 10.13 34.12 4 7.71 21.20 5 6.61 16.26 1

The point is... It all fits together! The F table is related to the t table; The t table approaches the z table. Degrees of freedom! Alpha levels! Significance!

Pre-existing differences among participants always provide alternative explanations Correlational research is based on the comparison of pre-existing differences. SCIENTIFICALLY, IT IS ALWAYS POSSIBLE THAT ONE OF THE MYRIAD PRE-EXISTING DIFFERENCES (OR COMBINATION OF DIFFERENCES) IS THE REASON(S) UNDERLYING A CORRELATION BETWEEN 2 VARIABLES

Therefore: WE CAN NOT ELIMINATE THE POSSIBILITY THAT OTHER, UNMEASURED DIFFERENCES AMONG PARTICIPANTS ARE CAUSING THE RELATIONSHIP YOU FOUND BETWEEN THE VARIABLES IN A CORRELATIONAL STUDY. THEREFORE, YOU CAN’T KNOW THAT ONE OF THE TWO VARIABLES YOU HAPPENED TO STUDY IS THE FACTOR CAUSING CHANGES IN THE OTHER - NO MATTER HOW PLAUSIBLE AN EXPLANATION IT SEEMS. THEREFORE, YOU CAN’T SAY HOW TO EFFECT CHANGE AT ALL BASED ON CORRELATIONAL RESEARCH

At the start of an experiment Participants are randomly selected from the population and randomly assigned to different experimental groups. Since the groups are randomly selected, we assume that each is representative of the population. That is, in each case the sample mean should be close to the population mean. Same for the variance. So the means and variances of all the samples should be similar on all pre-existing differences. HENCE, THERE ARE NO PRE-EXISTING DIFFERENCES AMONG THE GROUPS: THE GROUPS ARE THE SAME, NOT DIFFERENT

Another experiment: two groups Population: Moderately depressed psychiatric inpatients Number of participants (8) and groups (2) Design: Single factor, unrelated groups Independent variable: Type of treatment –Level 1: Cognitive Behavior Therapy + Medication –Level 2: Electroconvulsive Shock Therapy Dependent variable: Hamilton Rating Scale for depression (HAM-D) scores. Lower = less depressed H 0 : Treatment do not differ in effectiveness. H 1 :. Treatment do not differ in effectiveness.

1.1 1.2 1.3 1.4 2.1 2.2 2.3 2.4 12 14 16 18 17 20 22 25 9999999999999999 -3 0 3 15 21 18 9 1 9 16 1 16 -3 1 3 -4 1 4 Computing MS W and MS B

t test - summary table Between Groups Stress level Within Groups Error 72 1 72.00 8.49 54 6 9.00 3.00 2.83 SS df MS s t p  ? We need to look at the t table to determine significance. Divide s B by s to calculate t.

Ratio of estimated standard deviations = t ratio Estimated standard deviation based on variation within groups. Estimated standard deviation based on variation between groups. Possibly effected by independent variable. Not effected by independent variable. If the independent variable causes differences between the group means, then s B will be larger than s. If the effect is large enough and/or there are enough degrees of freedom, the result may be a statistically significant t test.

df 12345678.05 12.7064.3033.1822.7762.571 2.447 2.3652.306.01 63.6579.9255.8414.6044.0323.7073.4993.355 df 910111213141516.05 2.2622.2282.2012.1792.1602.1452.1312.120.01 3.2503.1693.1063.0553.0122.9972.9472.921 df 1718192021222324.05 2.1102.1012.0932.0862.0802.0742.0692.064.01 2.8982.8782.8612.8452.8312.8192.8072.797 df 2526272829304060.05 2.0602.0562.0522.0482.0452.0422.0212.000.01 2.7872.7792.7712.7632.7562.7502.7042.660 df 1002005001000200010000.05 1.9841.9721.9651.9621.9611.960.01 2.6262.6012.5862.5812.5782.576

This time it’s significant: the med/psychotherapy group did better than the ECT group! t(6)=2.83, p<.05 You read that as “t with 6 degrees of freedom equals 2.83. p is less than.05. That means that there are 5 or fewer chances in 100 of getting a t ratio this big when the null is true.

Download ppt "Chapter 9 - Lecture 2 Computing the analysis of variance for simple experiments (single factor, unrelated groups experiments)."

Similar presentations