Web Application to Explore mtcars Dataset using ANOVA

Khaled Al-Sham'aa
Sunday Sep 21, 2014

Introduction

Data Source: The data was extracted from the 1974 Motor Trend US magazine, and comprises fuel consumption and 10 aspects of automobile design and performance for 32 automobiles (1973-74 models).

The Implementation: This simple online application enable you to analyze the differences between group means using ANOVA. You can select the Variable to be analyzed, and the Grouping Factor (i.e. source of variation).

Application Output (Box Plot)

Example of box plot output

created for mpg variable

(i.e. Miles/US Gallon)

Grouped by cyl factor

(i.e. Number of Cylinders)

plot of chunk unnamed-chunk-1

Application Output (ANOVA)

In the Analysis of Variance (ANOVA) setting, the observed variance in a particular variable is partitioned into components attributable to different sources of variation.

summary(aov(mpg ~ factor(cyl), data=mtcars))
            Df Sum Sq Mean Sq F value Pr(>F)    
factor(cyl)  2    825     412    39.7  5e-09 ***
Residuals   29    301      10                   
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Coefficient of Variation

It is useful because the standard deviation of data must always be understood in the context of the mean of the data (i.e. independent of the unit).

\( C.V. = \frac{100 * \sqrt{r.m.s.}}{\mu} \)

r.m.s. is the residuals mean of squares in ANOVA table