Homework Problem 19, Due Friday April 2. ---------------------------------------- Consider the statistical problem of testing the goodness of fit of multinomial data with n=100 trials and 4 categories 1:4, to a set of cell probabilities .1, .2, .3, .4. Let Obs denote the set of 4 observed cell counts. We know how to do a chi-square test of the correctness of this set of cell probabilities in (at least) two different ways: (1) calculating sum((Obs-Exp)^2/Exp) with Exp = 100*c(.1,.2,.3,.4), and (2) calculating the chi-square statistic sum((Obs-Exp)^2/Exp) testing that the cell probabilities form an arithmetic progression (a, a+b, a+2b, a+3b), with Exp derived from an estimated value of a, obtained by numerical maximization of the log-likelihood over a, using the fact b=(1-4a)/6. In (1), the degrees of freedom are 3, and in (2) the degrees of freedom are 2. Your assignment is to verify through a simulation that chi-square distributions with these numbers of degrees of freedom closely approximate the distributions of the respective test statistics. Notes. (i) It would be nice to use a large number (eg 10000) simulation iterations to do this. For this reason, in the interests of moderate execution time, you will likely want to parallelize the numerical maximizations in situation (2). (ii) Your results should include an assessment of the sampling error in your simulated distribution. (iii) If you want to check for VERY close approximation by the chi-square distributions, you should probably re-do your simulations with n=100 sample-size for the Multinomial replaced by n=1000. --------------------------------------------------- In a little while, we will re-do (parts of) the same simulation in SAS. ---------------------------------------------------