STA
6166 UNIT 3 Section 1 Answers

Welcome  <  Begin  <  <  Unit 3 Section 1 Answers  >  Section 2 
To Ag and Env. Answers 
To Tox and Health Answers 
To Social and Education Answers 
To Engineering Answers 
A large advertising firm specializes in creating television commercials for children's products. A study is designed to test whether there are large differences in attention span for children in three different age groups (Group A 56 years, Group B 78 years, Group C 910 years). Ten children for each group are selected at random from a large population of children and asked to watch a 60second breakfast cereal commercial. Researchers record their attention span during the viewing of the commercial. Times (in seconds) are given below.
A B C 19 19 37 36 35 6 40 22 28 30 28 4 4 1 32 10 27 16 30 27 8 5 16 41 34 3 29 21 18 18
Answers:
1. y_{ij} = m + a_{i} + e_{ij}
We will use SPSS to compute the statistics needed to answer questions 25 above. First we need to input the data into SPSS. If will be best if the data are in "stacked" form instead of the "unstacked" structure presented in the problem definition above. To get the data into stacked form, we cut from above and copy into EXCEL. Then in EXCEL we use cut and paste to get the attention span data stacked one column on top of the other. We add columns for child ID and age class, resulting in the following structure for the data in SPSS (not all the data are in view  you can download the SPSS sav file for this from here to see the whole dataset.).
The analysis of variance table and other associated statistics can be obtained using the following sequence of commands:
Analyse > General Linear Model > Univariate [Dependent Variable (aspan), Fixed Factor(s): Age_Group] > Save [Residuals  check unstandardized] > Continue > Options [Display Means for: age _grou, check Homogeneity tests and Descriptive statistics]> Continue > OK.
This produces a series of output tables which are produced below.
This provides us with the overall analysis of variance table. Of interest to us is the row labeled "AGE_GROU". The associated Fstatistic (88.657) with 2 and 27 degrees of freedom tests the null hypothesis of equal average attention spans for each age group. In this case, the associated pvalue is 0.833, leading us to NOT reject the null hypothesis of equal average attention spans at the a=0.05 Type I error rate. But before we fully accept this decision, we need to check out the assumptions for the analysis of variance.
Levene's test for equality of error variances results from the Options > Homogeneity test selection we made from the original General Linear Models dialog.
From the above, we have a pvalue associated with the test of equal variances of 0.422, suggesting that we should NOT reject the null hypothesis of equal variances. From the table of descriptive statistics we see that the standard deviations are not particularly different.
The residuals were stored in the res_1 column in the worksheet. The KolmogorovSmirinov and ShipiroWilk tests are readily available in SPSS from the following request:
Analyse > Descriptive statistics > Explore [Dependent list: residuals for aspan] > Plots [check normality plots with tests].
This suggests that the residuals may not be normally distributed, but the normal probability plot of the residuals below shows that the data that is not very nonnormal. Since the F test in the analysis of variance is not very sensitive to nonnormnality we choose to not pursue further analysis via transformations.
To double check our decision, we choose to run the nonparametric KruskalWallis test procedure on the data. In SPSS this is accomplished by the following commands:
Analyse > Nonparametric tests> K Independent samples.
Note that when we try to run this test with our existing dataset, we cannot see our grouping factor, Age_Group in the list of variables. This must be an oddity of SPSS in that it requires numeric grouping codes for nonparametric tests. To create this numeric code, use the SPSS Data Window commands: Transform > Recode > Into different variables [Input variable: Age_Grou; Output variable: Group] > Old and New Values > Check first "Convert numeric strings to numbers", then Old Value: A; New Value: 1; Add; Old Value: B; New Value: 2; Add; Old Value: C; New Value: 3; Add; Old Value: C; New Value: 4; Add]>Continue > Change > OK. Now you have a new variable on your datasheet called Group which has numbers for the age group codes instead of letters. Returning to the Analyse > Nonparametric tests> K Independent samples dialog, now we do: Test Variable List: aspan; Grouping Variable List: Group > Define Range [minimum: 1, maximum: 4] > Continue > OK.
The pvalue associated with the null hypothesis of equal group medians is reported to be 0.627 leading us to NOT reject the null hypothesis of equal group medians. This test supports the conclusion of the regular analysis of variance.