10.07.2015 Views

Using R for Introductory Statistics : John Verzani

Using R for Introductory Statistics : John Verzani

Using R for Introductory Statistics : John Verzani

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Chapter 11Analysis of varianceAnalysis of variance, ANOVA, is a method of comparing means based on variationsfrom the mean. We begin by doing ANOVA the traditional way, but we will see that it isa special <strong>for</strong>m of the linear model discussed in the previous chapter. As such, it can beapproached in a unified way, with much of the previous work being applicable.11.1 One-way ANOVAA one-way analysis of variance is a generalization of the t-test <strong>for</strong> two independentsamples, allowing us to compare means <strong>for</strong> several independent samples. Suppose wehave k populations of interest. From each we take a random sample. These samples areindependent if the knowledge of one sample does not effect the distribution of another.Notationally, <strong>for</strong> the ith sample, letdesignate the sample values.The one-way analysis of variance applies to normally distributed populations. Supposethe mean of the ith population is µ i and its standard deviation is σ i . We use a σ if these areall equivalent. A statistical model <strong>for</strong> the data with common standard deviation isX ij =µ i +ε ij ,where the error terms, ε ij , are independent with Normal(0, σ) distribution.■ Example 11.1: Number of calories consumed by month Consider 15 subjects splitat random into three groups. Each group is assigned a month. For each group we recordthe number of calories consumed on a randomly chosen day. Figure 11.1 shows the data.We assume that the amounts consumed are normally distributed with common variancebut perhaps different means. From the figure, we see that there appears to be moreclustering around the means <strong>for</strong> each month than around the grand mean or mean <strong>for</strong> allthe data. This would indicate that the means may be different. Perhaps more calories areconsumed in the winter?The goal of one-way analysis of variance is to decide whether the difference in thesample means is indicative of a difference in the population means of each sample or isattributable to sampling variation.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!