Statistics for laboratory scientists

Solutions for the homework problems for lecture 17

    1. In R, do the following:

      C <- qt(0.975, 23) # critical value
      se <- 15*sqrt(1/15 + 1/10) # true standard error of the mean difference
      1 - pt(C, df=23, ncp=10/se) + pt(-C, df=23, ncp=10/se)

      The answer: Power = 34.7%

    2. C <- qt(0.975, 23) # critical value
      se <- 15*sqrt(1/15 + 1/10) # true standard error of the mean difference
      1 - pt(C, df=23, ncp=20/se) + pt(-C, df=23, ncp=20/se)

      The answer: Power = 87.8%


[ 3rd term syllabus | 4rd term syllabus | R for Windows ]

Last modified: Thu Mar 2 12:53:47 EST 2006