# statistics , SAS programing

**HW#1 **

1. (8 points) Prove that the sum of the interaction affects in a between-subjects two-way ANOVA is equal to zero. In other words, prove that

2. (8 points) A student in one of my previous classes stated: “A treatment is a treatment, whether the study involves a single factor or multiple factors. The number of factors has little effect on the interpretation of the results.” Discuss.

3. Write up a statistics problem that describes a single-factor design, preferably involving unicorns, glitter, zombies, aliens, or some combination of these things. Design your scenario so that your theoretically-driven hypotheses take the form of three or more orthogonal single-df planned comparisons. You get 4 points for writing a scenario that meets these criteria. Please be sure to explain the motivation for your hypotheses.

a. (4 points) Demonstrate that the contrasts are orthogonal.

b. (8 points) Generate your data for this problem in SAS for full credit, or using Excel for a 4-point penalty. Generate your data in a manner that is consistent with the assumptions and linear model associated with the one-way ANOVA. If you used SAS to generate your data, turn in all SAS files that are necessary to generate the data (your program, any datafiles, etc.). If you use Excel then turn in the spreadsheet.

c. (4 points) Run your planned comparisons using SAS. Turn in the script and results file as your answer to this part.

4. (8 points) In a study of intentions to get flu-vaccine shots in an area threatened by an epidemic, 90 people were classified into three groups of 30 according to the degree of risk of getting the flu. The experimenter brought each group one at a time into a room and verbally asked each member of the group about their likelihood of getting a flu shot, on a probability scale ranging from 0 to 1. Unavoidably, most participants heard the responses of nearby participants. An analyst wishes to test whether the mean intent scores are the same for the three risk groups. Consider each assumption for the ANOVA procedure and explain whether this assumption is likely to hold in the present situation. For any assumption that is unlikely to hold, suggest a remedy if one exists.

5. (12 points) Consider a 1-way between-subjects ANOVA with 6 treatment levels and 4 subjects per treatment. You have *k *pairwise comparisons to make amongst the treatment means. You have two choices to accomplish this:

**Choice A**: You can treat them as planned comparisons. You would conduct *k *two-tailed t-tests using the standard t-test formula (**meaning that the pooled variance is in the denominator of the formula)**, and use the Bonferroni correction to control the familywise error rate.

**Choice B:** You can treat the comparisons as post hoc and use Tukey’s HSD procedure. In this case you would use