Lab 6 Objectives:

This lab has three components. We will use S-Plus to:

  1. find sample sizes for planning a study to achieve a certain power for detecting an effect of a given size
  2. determine the power of a planned study based on its sample size and an effect size
  3. perform a one-sample hypothesis test and confidence interval using heart.xls data (Chapter 10, Exercise 16)

On your own:

Explore issues in power using the java applet at

http://www.stat.sc.edu/~ogden/javahtml/power/power.html

If you understand this applet, then you should understand the type I, and type II errors, their probabilities, and power.

Also, locate and read the following paper (electronic access through Duke's Library):

Moher, David, Dulerg, Corinne S., and Wells, George A. 1994. Statistical Power, Sample Size, and their Reporting in Randomized Controlled Trials. Journal of the American Medical Association. Vol 272 pp 122-124.


Sample Size Determination and Power Determination

Sample size and power calculations are an important part of designing a study. If the sample size is inadequate for detecting a treatment effect with a certain level of probability, then the study may be a complete waste of time right from the start (we'll talk more about this in class)!

Work Exercises 10.14 and 10.15 by hand (we may not be to this point in lecture, but I think you can do these if you read Chapter 10). Now let's verify the calculations in S-Plus. Go to the Statistics menu and select Power and Sample Size, then choose Normal Mean...

For Power, click on the Power button. Specify the Sample Sizes, N1, and fill in the standard deviations and mean under the null and the mean under the alternative corresponding to the difference in means that we would like to detect. Select the type of alternative hypothesis. Click on OK (or Apply). The results will appear in the report window.

For Sample Size determination, enter the values for Alpha and Power, and the means and standard deviation as before. Click on OK (or Apply).

Do your results agree with what you found by hand?


Heart Data (Chap 10 Ex 16)

Read in the dataset heart.xls

Use any graphical methods to check whether assumptions for testing or confidence intervals are OK. We want to know if it is reasonable to apply the CLT, which allows us to use the t (or Z, if we know sigma) distributions for calculating these things. What is the sample size for this problem?

Write out the Null Hypothesis and the Alternative Hypothesis using statistical language.

To perform the test in S-Plus, go to the Statistics menu and select Compare Samples and then choose One Sample, and then t Test... Select pmi for the Variable field. Fill in the Mean Under the Null Hypothesis (100) and specify whether the Alternative Hypothesis is two-sided, or one-sided. Click on OK; the results will appear in the report window with a 95% confidence interval.

Repeat for the mdi score.

You should be able to concisely summarize your results, being careful to correctly interpret the p-value.