One-way ANOVA tutorialFor one-way ANOVA we have 1 dependent variable and 1 independent variable [factor]which as at least 2 levels.Problem descriptionA pharmaceutical company is interested in the effectiveness of a new preparation designedto relieve arthritis pain. Three variations of the compound have been prepared forinvestigation, which differ according to the proportion of the active ingredients: T15contains 15% active ingredients, T40 contains 40% active ingredients, and T50 contains 50%active ingredients. A sample of 20 patients is selected to participate in a study comparing thethree variations of the compound. A control compound, which is currently available over thecounter, is also included in the investigation. Patients are randomly assigned to one of thefour treatments (control, T15, T40, T50) and the time (in minutes) until pain relief isrecorded on each 9T501413121411Enter data such that the response variable is in one column and the factor is in a separatecolumn. Such that it looks like this:Graphical Analysis [stem and leaf plots/boxplots/normal plots]We will begin the ANOVA by assessing the necessary assumption of normality and equalvariance. To do this we will need to create boxplots, stem and leaf plots, and normal plots.Boxplot1. Select the tab: Graph Boxplot2. The following menue will appear. For this type of data, you will need the “withgroups” option
3. You then need to select theappropriate variables. Thegraph variable is the dependentvariable. In this example, thatis relieftime. The categoricalvariable for grouping is theindependent variable, in thisexample: drugs.4. Select OK
Stem and Leaf1. Select the Graphs Stem and Leaf2. The graph variable is again the dependent measure, relieftime. The By variable is theindependent categorical variable, drugs.3. Select OK
Doing this will give you individual Stem and Leaf plots for each categorical variable. You canscroll through to see the stem and leaf at drugs 0, drugs 1, etc.To see a Stem and Leaf plot of all dependent data points, simply exclude the “by variable” ofdrugs.You then have the above stem and leaf plot of all data.
Normal probability plot1. Select Graph Probability plot2. Your graph variable is relieftime, yourdependent measure3. Select OKNote: For separate normal probability plot for each group,1. Select Graph Probability plot2. Your graph variable is relieftime, your dependent measure3. Choose Multiple graphs options choose by variable move the groupvariable to by variable with groups in separate panels4. Select OK.
Homogeniety of Variance test1. Select Stat ANOVA Test for Equal Variances2. Again, select variables response variable: relieftime,factors: drugs3. Select OKThe teststatisticappears in theupper righthand cornerof the graph
Analysis of Variance - ANOVAAssuming not problems with our assumptions we can continue by running the one-wayANOVA.1. Start by going to Stat ANOVA One Way.2. In Response, enter relieftime. In Factor,enter drugs.3. Select OKOutputRecall that the null hypothesis in ANOVA is that the means of all the groups are the sameand the alternative is that at least one is different . So for our example with 4 treatmentgroupsH o : 1 2 3 4H A : at least one mean is different
To check the hypothesis the computer compares the value for the observed F [12.72] to theexpected value for F-observed given the number of groups and the sample sizes. If this is arare event [it will be unusually large is Ho is not true] we will reject Ho. To determine if Fobserved is unusual, we need to look at the (Sig)nificance of the F value [often called the Pvalue]. If this value is less than .05, it means that a score this large would occur less than 5%of the time [or 1 in every 20 trials] and we will consider it sufficiently rare. The smaller thisvalue gets the more rare the score and the more certain we can be that the null hypothesis isincorrect. In the case of above example, we can be confident that if we reject the nullhypothesis, there is less than a 1 in a 1000 chance that we would be incorrect. We limitourselves to 1 in a 1000 as [Sig .000] does not mean that the probability of getting a scorethis large is zero, just that its equal to zero at three significant figures
Multiple ComparisonsPost hoc TestsUsing ANOVA table we reject the null hypothesis and conclude that at least one mean isdifferent from the others. The next question is how they are different. To answer thisquestion:1. Start by going to Stat ANOVA One Way.2. Select Comparisons3. Select the first option, Tukey’sfamily error rateUnderstanding theoutput:The first set of numbersprovides the overallresults of the test,organizing in order thedifferent means of thegroups. The lettersdenote statisticallysignificant differencesbetween the groups.The subsequentsections show theindividual confidenceintervals for each group.
ContrastA priori contrast: comparisons identified before the experiment has been performed.For this example we will compare 3 different contrasts1. Control vs. Compound2. Low compound (T15) vs. High compound (T40, T50)3. T40 vs. T50Creating contrasts: Only requirement is that the sum of the coefficients 01. (1, -1/3, -1/3, -1/3) (3, -1,-1,-1)2. (0, 1, -1/2, -1/2) (0,2,-1,-1)3. (0,0,1,-1) (0,0,1,-1)Step 1 – Link MINITAB to the MACRO libraryStep 2 – Enter your contrasts in column format with the coefficient for the first group beingat the top and the coefficients for the last group being at the bottom (there should be asmany coefficients as there are groups – 4 in this case)1. [3 –1 –1 –1]2. [0 2 –1 –1]3. [ 0 0 1 –1]Step 3 – Run the macro Hit “Ctrl L” to bring up the command line editor Type in the macro command with this formato %contrast C;o Groups Y X. Where C is the column location for the contrast (column 4) Where Y is the column location for the response (column 2) Where X is the column location for the treatment (column 1)
For this specific example:Minitab Output (Session Window)Row1234Categs0 51 52 53 5Freq16.220.417.212.8xbar StdDev3.033151.140181.788851.30384PooledS 1.96214alpha0.950000---------------CT13 -1 -1 -1Estimated contrast: -1.80000, with standard error 3.03974.t -0.59216 (with df 16); one-sided P-value 0.28101058Confidence interval: ( -8.24395, 4.64395).NOTE – We will commonly use a 2-sided P-value so you will need to multiply the 1-sidedP-value by 2 to receive the proper P-value (for this contrast p 0.562
ANOVA. 1. Start by going to Stat ANOVA One Way. 2. In Response, enter relieftime. In Factor, enter drugs. 3. Select OK Output Recall that the null hypothesis in ANOVA is that the means of all the groups are the same and the alternative is that at least one is different . So for our example