# Homework Assignment for Lesson 5

### Homework Assignment

Your homework will consider an experiment on battery life for different types and brands of battery. Two brands (a name brand and a generic brand) of two types (Alkaline and ''Heavy Duty'') of batteries were tested to see how long they could run continuously. This results in four categories, AlkName is for name-brand alkaline batteries, AlkGen is for generic alkaline batteries, HDName is for heavy duty name-brand batteries, and HDGen is for generic heavy duty batteries. Four batteries of each type were tested and the times to battery failure are recorded below (sascode_batteries.txt):

**1. **Plot the data.

**2.** For the battery data, do the following:

- Write out the one-way ANOVA model for this data.
- Test the null hypothesis that there are no differences in treatment means. Clearly state the null hypothesis, the test statistic, the distribution of the test statistic under the null hypothesis, the
*p*-value, and interpret the result of the test. - Show a histogram and normal probability plot of the residuals under this model. Are the residuals approximately normal? Justify your answer.
- Is the assumption of constant error variance among treatments justified? Explain your answer.\end{enumerate}

**3. **Now consider using the square-root of the battery life as a response variable. Repeat (a)-(d) above for this transformation.

**4.** Now consider using the log of the battery life as a response variable. Repeat (a)-(d) above for this transformation.

**5. **Now consider using the square of the battery life as a response variable. Repeat (a)-(d) above for this transformation.

**6. **Which of the four models you have fit has residuals that best satisfy the assumptions of the ANOVA model? Explain your choice.

**7. **For the model you chose in question 6 above, are there any significant pairwise differences in mean lifetime of different battery types? If so, state which are different, and provide *p*-values for the hypothesis tests used.

**8. **For the model you chose above, test whether or not there are significant differences between the mean lifetime of all generic batteries and the mean lifetime of all name-brand batteries. Clearly state the null hypothesis, and provide SAS code for testing for significance. Interpret the result of the hypothesis test.