PubH 5421 Biostatistical Computing - Fall 2004


  1. Homework #1 - due September 14, 2004.

    Problems 1-5 in notes.001.

  2. Homework #2 - due September 23, 2004.

    Problem 5 and Problem 6 in notes.004.

  3. Homework #3 - due September 30, 2004.

    Problem 9, notes.007, and Problem 10, notes.008.

  4. Homework #4 - due October 7, 2004.

    Problem 11, notes.010.

  5. Homework #5 - due October 14, 2004.

    Problem 12, notes.011.
    Problem 13, notes.012.

  6. Homework #6 - due October 21, 2004.

    Problem 13a, notes.012

    Write proofs of the following (where A, B are 2 x 2 matrices):

    1. (A * B)' = B' * A'.
    2. (inv(A))' = inv(A').
    3. inv(A * B) = inv(B) * inv(A).
    4. det(A * B) = det(B * A).

  7. Homework #7 - due November 4, 2004.

    Problem 15, parts 1. and 2., notes.017
    Problem 16, parts 1. and 2., notes.017
    Problem 17, parts 1. and 2., notes.018

  8. Homework #8 - due November 11, 2004.

    Problem 18, notes.019
    Problem 19, notes.020

  9. Homework #9 - due November 23, 2004.

    Problem 20, notes.021
    Problem 21, notes.022

  10. Homework #10 - due December 2, 2004.

    Problem 22, notes.022
    Problem 23 and Problem 24, notes.023

  11. Homework #11 - due December 9, 2004.

    Exact confidence interval problem:

    Assume you have a sample of size n, and that m people in this sample have a specified characteristic. The sample proportion of people who have this characteristic is denoted by pobs. It has the distribution of a binomial proportion, i.e., the number m has a binomial distribution binom(n, p), where p is the true (and unknown) proportion. The object of this problem is to write an algorithm in SAS or Splus or R which computes an exact confidence interval (plower, pupper) for the true proportion p, given the sample data (n, m).

    This is explained in a 1934 paper in Biometrika by Clopper and Pearson.

    Clopper and Pearson show that an exact 95% confidence interval has the following property:

    If plower is the lower bound for the exact confidence interval, then if the true proportion were equal to plower, the probability that you would observe a sample proportion of size pobs or lower is .975.

    If pupper is the upper bound for the exact confidence interval, then if the true proportion were equal to pupper, the probability that you would observe a sample proportion of size pobs or higher is .975.

    Given a value for plower, you can find the desired probability by using the cumulative binomial distribution function: in SAS, you would use the function probbnml.

    You can find plower by starting with a guess at what it should be (for example, a good starting value might be pobs/2), and then doing a binary search to improve the guess.

    So the assignment is to write a program (or a macro) which has as input: n, m, and alpha, and has as output the lower and upper (1 - alpha) exact confidence interval limits, plower and pupper.

    Test your program with the following values for n and m:

    n = 100, m = 40

    n = 1000, m = 30

    n = 10000, m = 5

    n = 100000, m = 5

    n = 100000, m = 1

    For of these values, compare your results with the confidence interval that can be obtained with the usual normal approximation.

    Also: Problem 26, notes.024

  12. Homework #12 - due December 14, 2004.

    Problem 28, parts 1. and 2., notes.026

  13. .

    .

    .

    Web address: http://www.biostat.umn.edu/~john-c/assign5421.s2004.html

    Most recent update: December 8, 2004