Appendix 6¾Example Graded Homework Assignment

E538¾Homework on Bayesian Analysis and on Anova¾2001¾D. Parkhurst

©2003, D.F. Parkhurst

The tasks below are homework due by 4 p.m. on Monday, April 23.  (Please give directly to me, or slip under my office door, SPEA 355.  If you do the latter, please write the time and date on the front page.)  No late papers will be accepted.  Please put only the last four digits of your student number (not your name) on your paper.  Since this is graded homework, be sure to do the work yourself, as described on pp. 5–6 of the syllabus.  You are welcome to obtain help from others in using SPSS to perform the types of analysis required here, but not with the particular datasets you are to analyze in these problems.  Feel free to ask either Prof. Parkhurst or Oksana for help if you need it (but don’t wait until the last day to do this!)

A major purpose of these problems is to check your ability to use SPSS, so you must use that software to receive credit for this homework set.  Please hand in a printout of the SPSS results for each SPSS task described.

 

1.  Bayesian analysis:  Suppose you work in the group responsible for potentially leaky underground storage tanks (the LUST program) of your state’s environmental agency.  Your group has identified over a thousand abandoned UST’s, and these need to be checked for leakage.  Eighty of these tanks are chosen at random for testing, and of those, thirty are found to be leaking (the criterion being “at least one liter per week,” in the tests). 

A. Using a beta distribution with a=b=1 as a (nearly) uninformative prior, determine the following four probabilities:  (i), (ii), (iii) , (iv) .  (Remember that the second of those quantities is  minus the first, and so on.)  Describe your results in one or more sentences that might be used in a report to the division director, or in a press release.

B. Repeat the above analysis using a prior obtained from a couple of consultants familiar with these types of tanks¾their prior was a beta distribution with a=1 and b=9.  Again, state your results in one or more sentences.  Explain (to me, not for the press release) why the two sets of results either are, or are not, substantially different.

2.  Frequentist anova:  This problem is taken from Dixon, W. J. and J. F. Massey 1969. Introduction to Statistical Analysis. New York, McGraw-Hill Book Company (although I’ve changed the numbers).  Here is their problem statement:

An agency wished to determine whether five makes of automobiles would average the same number of miles per gallon. A random sample of three cars of each make was taken from each of three cities, and each car had a test run with 1 gallon of gasoline. The table records the number of miles traveled. (a) Why were three cities used instead of just one city? (b) What populations are sampled from? (c) How would you go about getting such a random sample of three cars from a city? (d) What assumptions are made about the populations, and what hypotheses can be tested? (e) Perform the analysis of variance and state fully your conclusions.

and here are the modified numbers:

city\auto

A

B

C

D

E

Los Angeles

16.0

15.4

18.0

13.8

19.8

 

15.5

14.6

19.0

14.5

20.4

 

17.5

15.1

18.5

13.9

21.3

San Francisco

17.7

15.8

16.3

15.4

13.7

 

18.6

15.7

17.2

15.2

14.1

 

17.2

16.6

15.5

16.5

14.1

Portland

15.6

15.4

18.5

15.3

18.1

 

14.7

14.3

18.1

14.2

20.4

 

17.0

15.7

17.3

14.8

19.7

 

Your tasks here are to answer Dixon and Massey’s questions d and e, (and to answer the others for yourself.)  Use SPSS to perform the analysis of variance.  (Be sure to consider any possible interaction.  State the hypotheses you are testing, provide the SPSS output, and state your conclusions in a paragraph or two.

These data will be available in text format at the class website, as a file named gasmiles.txt.  You may have to make a few changes to the way the data are listed so as to meet the requirements of SPSS, but figuring that out is part of the exercise.  You should be able to cut and paste the data from a browser window to the SPSS data window.

Home                           Previous section                      Table of contents