Vanderbilt Biostatistics Home
Main  PowerSampleSize (compare)

Difference: PowerSampleSize (r49 vs. r48)

PS: Power and Sample Size Calculation

PS: Power and Sample Size Calculation version 3.1.2, 2014

by William D. Dupont and Walton D. Plummer, Jr.

Online Help

PS is an interactive program for performing power and sample size calculations that may be downloaded for free. It can be used for studies with dichotomous, continuous, or survival response measures. The alternative hypothesis of interest may be specified either in terms of differing response rates, means, or survival times, or in terms of relative risks or odds ratios. Studies with dichotomous or continuous outcomes may involve either a matched or independent study design. The program can determine the sample size needed to detect a specified alternative hypothesis with the required power, the power with which a specific alternative hypothesis can be detected with a given sample size, or the specific alternative hypotheses that can be detected with a given power and sample size.

The PS program can produce graphs to explore the relationships between power, sample size and detectable alternative hypotheses. It is often helpful to hold one of these variables constant and plot the other two against each other. The program can generate graphs of sample size versus power for a specific alternative hypothesis, sample size versus detectable alternative hypotheses for a specified power, or power versus detectable alternative hypotheses for a specified sample size. Linear or logarithmic axes may be used for either axes. Multiple curves can be plotted on a single graphic.

Downloading and Installing the PS Software

The PS program runs on the Microsoft Windows operating systems (Windows XP and later). We have also installed the program on Linux and Macintosh computers using a program called Wine that facilitates running Windows software on other operating systems.


ps_icon.jpg pssetup3.exe (3.5 MB)

To obtain the software, click PS (3.5 MB) and instruct your browser to download the file to a folder on your computer. To avoid problems with the installation process, it is helpful if the target folder is empty. A file called pssetup3.exe will be downloaded to this location. Run pssetup3.exe to extract the needed files and install the program.

To run the PS program after it has been installed, click the Start button, select Programs and then click PS. Click the Overview button for an introduction to the program and instruction on its use. PS is a self-documented program with extensive interactive help.

Caution: We know of a bug in one of the third-party tools that we use that causes the program to malfunction when the Windows language is set to something other than English. We are working to replace this tool with one of our own and we apologize for any inconvenience that this problem causes.

Macintosh and Linux

Note: This combination of the PS program and the Windows emulation software needed to make it run on OS X has been tested on a very limited number of systems. It may or may not work on your particular Macintosh system. We appreciate reports of problems that will help to get the program running on more systems. In the past we have tried to supply installation packages that allowed the installation of the PS program in one step. For a number of reasons, this has been a troublesome approach. There are many versions of the OSX and Linux distributions in use. It is difficult to make an installer that works correctly on all of these.

ps_icon.jpg Our current recommendation is to use the Wine graphical front end programs PlayOnMac (for Macintosh) (254 MB) and PlayOnLinux (for Linux). PlayOnMac and PlayOnLinux are free packages that simplify the installation and use of Windows software on these other platforms.

We are using a tool called The process for installing PS involves 3 steps: Wineskin ("a tool used to make ports of Windows software to Mac OS X") to install PS on Macintosh computers. The program has been tested on Macintosh systems running OS X 10.7 ("Lion").

To obtain the PS program for Macintosh, click here. The file (254 MB)will be downloaded to the Downloads folder. Use the Finder to open the Downloads folder and double click on the zip file to expand the program. You will see the expanded PS program with the PS logo. It is customary to store programs in the Applications folder so drag the file there. You can run the PS program by double clicking on the PS icon. If you wish to keep the PS icon on the Dock for easy access then, when the program is running, ctrl-click on the icon, select Options in the pop-up menu, and click "Keep in Dock".

  1. Download and install PlayOnMac or PlayOnLinux as appropriate from the sites linked above.
  2. Download the PS installer (pssetup3.exe)
  3. Run PlayOnMac or PlayOnLinux to install and use the PS program on your computer.

Depending on your settings, PlayOnMac and PlayOnLinux inspect you might see a message that the PS program software to "canít be opened because it is from an unidentified developer". If this happens then right click installed and attempt to also install other packages and tools that are necessary for (ctrl-click) on the PS icon in the Applications program to run correctly. folder, click on Open and then click on Run.


Wine (originally an acronym for "Wine Is Not an Emulator") is a compatibility layer capable of running Windows applications on several POSIX-compliant operating systems, such as Linux, Mac OSX, & BSD.

ps_icon.jpg There are a number Wine implementations and Wine front ends available. Our recommendation is not the only approach. Suggestions are welcome. pssetup3.exe (3.5 MB) (This is the same installer as for Windows. It depends on the presence of Wine on the installing computer for it and the installed program to function correctly.)

We ( have succeeded in running the program on the Linux (Ubuntu) operating system using Wine old Macintosh and Linux installation instructions . ) You need at least version 1.1.10 of Wine for the program to run correctly and it runs a little better on each subsequent Wine release. We are using it successfully on a number of Linux computers.

To install Wine on a computer running Ubuntu Linux, use the command sudo apt-get install wine. Then click here or on the icon above to download the PS installer (i.e. pssetup3.exe). Once pssetup3.exe is downloaded, click on it to begin the installation.

The PS program uses the symbol font (symbol.ttf) to render Greek characters. This seems to work correctly with versions of Ubuntu later than 9.10. If you use an earlier version, you will need to obtain that font and install it so that the Greek characters will display correctly. As of version 9.10 of Ubuntu and Kubuntu there is a package available called "ttf-symbol-replacement" which is described as a "Free font with the same metrics as Symbol".


We are interested in feedback. If you have any questions or comments about our software please send email to It will be appreciated.

Study Designs That Can Be Evaluated By This Program

  1. Case-Control Studies -- Corrected and uncorrected chi-squared contingency table tests, Fisher’s exact-test: The method of Schlesselman (1982) is used for studies with independent case and control groups that will be analyzed using an uncorrected chi-squared test; the method of Casagrande et al. (1978) is used for independent studies that will be analyzed using continuity corrected chi-squared statistics or Fisher’s exact-test. When the case and control sample sizes are unequal, PS uses the generalization of Casagrande’s method proposed by Fleiss (1981). The alternative hypotheses may be specified in terms of odds ratios or exposure prevalence rates.
  2. Matched Case-Control Studies -- McNemar’s Test: The method of Dupont (1988) is used for studies with paired or matched cases and controls. The alternative hypotheses are specified in terms of odds ratios.
  3. Multiple 2 X 2 tables -- Mantel-Haenszel Test: The method of Wittes and Wallenstein (1987) is used. Assume that each 2 X 2 table consists of cases and controls selected from a different stratum that is defined by one or more confounding variables. The odds ratio for disease in exposed subjects compared to unexposed subjects is assumed to be equal within all strata. The alternative hypotheses are specified in terms of this odds ratio.
  4. Cohort Studies With Dichotomous Outcomes -- Independent contingency table tests, McNemar’s test: The methods of Schlesselman (1982), Casagrande et al. (1978), Fleiss (1981), and Dupont (1988) are available. The alternative hypotheses may be specified in terms of relative risks or outcome probabilities.
  5. Linear Regression (1 Treatment) -- Testing the slope of a simple linear regression line: The method of Dupont and Plummer (1998) is used to design studies in which we wish to detect a regression slope of a given magnitude. The values of the independent (x) variable of the regression line may either be specified by the investigator or determined observationally when the study is performed. In the latter case, the investigator must estimate the standard deviation of the independent variable(s).
  6. Linear Regression (2 Treatments) -- Comparing the slopes and intercepts of two independent linear regressions: The approach of Dupont and Plummer (1998) is used to design studies in which we wish to determine whether the slopes or intercepts of two independent regression lines differ by a given amount. The values of the independent (x) variables of the regression lines may either be specified by the investigator or determined observationally when the study is performed. In the latter case, the investigator must estimate the standard deviations of the independent variables.
  7. Survival Studies -- Evaluating independent cohorts using the log-rank test: The approach of Schoenfeld and Richter (1982) is used. The ratio of the number of control subjects per experimental subject in the cohorts being compared may be specified by the user. The alternative hypotheses are specified in terms of the hazard ratio for control subjects relative to experimental subjects or the median survival times for control and experimental subjects.
  8. Continuous Response Measures in Two Groups -- Paired and independent t-tests: The approach of Dupont and Plummer (1990) is used for paired and independent samples. The ratio of the number of control subjects per experimental subject may be specified by the user. This method produces results that are in close agreement with those of Pearson and Hartley (1970).


  1. Casagrande JT, Pike MC, Smith PG: "An Improved Approximate Formula for Calculating Sample Sizes for Comparing Two Binomial Distributions", Biometrics, 1978; 34:483-486.
  2. Dupont, WD: "Power Calculations for Matched Case-Control Studies", Biometrics, 1988; 44:1157-1168.
  3. Dupont WD, Plummer WD: "Power and Sample Size Calculations: A Review and Computer Program", Controlled Clinical Trials 1990; 11:116-28.
  4. Dupont WD, Plummer WD: "Power and Sample Size Calculations for Studies Involving Linear Regression", Controlled Clinical Trials 1998; 19:589-601.
  5. Fleiss JL: "Statistical Methods for Rates and Proportions" 2nd Ed. New York: John Wiley, 1981:38-46.
  6. Pearson ES and Hartley HO: "Biometrika Tables for Statisticians Vol I", 3rd Ed., Cambridge: Cambridge U. Press, 1970.
  7. Schlesselman: Case-control Studies: Design, Conduct, Analysis. New York: Oxford U. Press; 1982:144-152.
  8. Schoenfeld DA, Richter JR: "Nomograms for Calculating the Number of Patients Needed for a Clinical Trial With Survival as an Endpoint" Biometrics 1982; 38:163-170.
  9. Wittes J, Wallenstein S: "The Power of the Mantel-Haenszel Test" J Am Stat Assoc, 1987; 82:1104-1109.
  10. Visual Components Sybase Inc. First Impression Active X User's Guide: High Performance Software for Charting Data for Microsoft Visual Basic, Visual C++, and Other Languages. Version 5.0. Overland Park, KS: Visual Components Sybase Inc.
  11. Mantel, N., & Haenszel, W. (1959) Statistical aspects of the analysis of data from retrospective studies of disease. Journal of the National Cancer Institute, 22, 719-748.
  12. Dupont, WD (2008). Statistical Modeling for Biomedical Researchers, 2nd Edition. Cambridge, U.K.: Cambridge University Press.

Suggested citation

Dupont WD, Plummer WD: 'Power and Sample Size Calculations: A Review and Computer Program', Controlled Clinical Trials 1990; 11:116-28.


Dupont WD, Plummer WD: 'Power and Sample Size Calculations for studies Involving Linear Regression', Controlled Clinical Trials 1998; 19:589-601.

Release Notes

Release Notes


This work was supported in part through a grant from Vanderbilt University's Clinical and Translational Science Award (CTSA) program (grant UL1 RR024975 from the NCRR/NIH).

We are grateful to Gordon R. Bernard for his support and to Yuwei Zhu for her assistance in editing this program.

Creative Commons License
This web page and the PS: Power and Sample Size Calculation program by William D. Dupont and W. Dale Plummer, Jr. is licensed under a Creative Commons Attribution-NonCommercial-NoDerivs 3.0 United States License.

IAttachmentActionSizeDateWhoCommentSorted ascending
PS_icon.icoicoPS_icon.icomanage 3.2 K 22 Aug 2011 - 09:45DalePlummer  
PS_icon.jpgjpgPS_icon.jpgmanage 0.9 K 22 Aug 2011 - 09:44DalePlummer  
PS_icon.pngpngPS_icon.pngmanage 1.3 K 22 Aug 2011 - 09:45DalePlummer  
pssetup3.exeexepssetup3.exemanage 3448.0 K 25 Jun 2014 - 09:17DalePlummer  

Revision r49 - 12 Aug 2014 - 16:44 - DalePlummer
Revision r48 - 07 Aug 2014 - 14:03 - DalePlummer
This site is powered by FoswikiCopyright © 2013-2017 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding Vanderbilt Biostatistics Wiki? Send feedback