ANOVA Practice

Life Expectancy of Female Authors

Introduction

You are curious to compare life expectancy between female poets, novelists, and non-fiction writers.

You take a sample of female authors from each of the three groups to test if the average age at death is different between any of the three types of authors using a level of significance of, \(\alpha = 0.05\).

Load the Data and Libraries

library(rio)
library(tidyverse)
library(mosaic)
library(car)

womenpoet <- rio::import("https://byuistats.github.io/BYUI_M221_Book/Data/womenpoet.xls")

Explore the Data

Create a side-by-side boxplot of the age at death of each of the different author styles.

Modify the colors of each of the boxes for each group.

Create a summary statistics table for age at death for each author type:

List the mean and standard deviations of age at death for:

  1. Novelists:
  2. Poets:
  3. Non-fiction:

Perform the Appropriate Analysis

State your null and alternative hypotheses:

Perform an Analysis of Variance test including checking for the appropriateness of our analysis.

Question: What is the test statistic?
Answer:

Question: What are the degrees of freedom for your analysis?
a. Numerator (between Groups) Degrees of Freedom
b. Denominator (within groups) Degrees of Freedom
Answer:

Question: What is the P-value?
Answer:

Question: Do you reject the null hypothesis? Why?
Answer:

Question: State your conclusion in context of the problem.
Answer:

Question: Can we trust the p-value? a. Check for equal standard deviation (is the ratio of the largest SD / smallest SD greater than 2?) b. Check Normality of the residuals (qqPlot())
Answer:

Testing Mosquitos

Introduction

A study was conducted to determine if different types of material can reduce the amount of mosquito human contact. The researchers evaluated five different types of patches 1=Odomos, 2=Deltamethrin, 3=Cyfluthrin, 4=D+O, 5=C+O.

The amount of mosquito human contact was measured to assess any differences between the five different types of material. Use a level of significance of 0.05.

Load the Data

MosquitoPatch <- rio::import("https://raw.githubusercontent.com/rdcromar/Math221D/main/MosquitoPatch.csv") %>% mutate(Treatment = factor(Treatment))

Review the Data

Create a side-by-side boxplot for human contact for each of the treatment groups.

Add a title and change the colors of the boxes.

Create a summary statistics table for human contact for each of the treatment groups:

Question: What do you observe?
Answer:

Question: What is the maximum standard deviation?
Answer:

Question: What is the minimum standard deviation?
Answer:

Perform the Appropriate Analysis

State your null and alternative hypotheses:

Perform an Analysis of Variance test including checking for the appropriateness of our analysis.

Question: What is the test statistic (F-value)?
Answer:

Question: What are the degrees of freedom for your analysis?

  1. Numerator (between Groups) Degrees of Freedom
  2. Denominator (within groups) Degrees of Freedom
    Answer:

Question: What is the P-value?
Answer:

Question: Do you reject the null hypothesis? Why?
Answer:

Question: State your conclusion in context of the problem.
Answer:

Question: Can we trust the p-value? a. Check for equal standard deviation (is the ratio of the largest SD / smallest SD greater than 2?) b. Check Normality of the residuals (qqPlot())
Answer: