
Homework 7
Assigned: 20 October 2004
Due: 01 November 2004
C:\Documents and Settings\John Bailer\My Documents\baileraj\Classes\Fall 2004\sta402\hw\
Homework-07.doc
1. Perform a randomization test of the log(bacterial growth) data under the 4 meat packaging
conditions. In this problem, we have n1= n2= n3= n4=3. Use a statistic that measures the
difference in the 4 group means, e.g. CSS = SUM [ Xbar_i – XBAR ]^2 where Xbar_i is the
arithmetic mean of the ith group and XBAR is the mean of all of the observations.
2. You have a collection of raw data representing reading scores on three groups of subjects:
control, method A, and method B (group codes are C, A and B, respectively). The data are
arranged so that a group code is followed by one or more scores for that group, and the scores for
any group can span more than one record of raw data. Your task is to write a program which
will read these data and create a SAS data set with variables GROUP and SCORE, one set per
observation. Sample data are
C 303 102 150 B 202 C 300 B 450 400 399
420 A 289 280 278
Hint: Read every data item in the raw data file as a character value and test if it is an ‘A’, ‘B’ or
‘C’. If it is one of those values, set GROUP equal to that value and then read the numeric data.
If not, convert the character (numeric data) you just read to a number using the INPUT function
[syntax: SCORE = INPUT(CHARVAR,5.);]
Based on HW from Cody and Pass.
3. Provide a paragraph or two describing the project that you will do for this class. Example
projects might include a simulation of the Type I error rates/Power of a statistical test, coverage
probabilities and CI widths for a confidence interval estimation routine, or some large scale data
processing problem.