Java applets for power and sample size

Russ Lenth – Department of Statistics and Actuarial Science – University of Iowa

2018-05-08

Introduction

Via this page, you may download a Java application that allows you to do power and sample-size calculations for a number of standard statistical models.

What happened to the website I was expecting?

The previous edition of this website had the application embedded as a Java applet; however, many browsers no longer support the type of plug-in that is needed. However, if you still have the capability, and you want to run it as an applet, it is still available here.

Software features

The software is intended to be useful in planning statistical studies. It is not intended to be used for analysis of data that have already been collected.

Each menu selection provides a graphical interface for studying the power of one or more tests. The dialog windows include sliders (convertible to number-entry fields) for varying parameters, and a simple provision for graphing one variable against another. Each dialog window also offers a Help menu (on Macs, the Options and Help menus are added at the top of the screen). Please read the Help menus before contacting me with questions.

Two-sample t dialog

Two-sample t dialog

The “Balanced ANOVA” option provides another dialog with a list of several popular experimental designs, plus a provision for specifying your own model.

Download the software

The software is a Java application. Click this link to the file piface.jar and ask your browser to save the file. It encapsulates all of the Java code needed to run the app.

Note: Some browser software that thinks it is smarter than you renames this file piface.zip. If this happens, simply rename it piface.jar; do not unzip the file.

You may also want the icon file piface.ico if you put it on your desktop or a toolbar.

What else you need

You will need to have the Java Runtime Environment (JRE) or the Java Development Kit (JDK) installed on your system. You may already have it; but if not, the JRE may be downloaded from Oracle at https://java.com.

Running the software

Once you have JDK or JRE installed, then you can probably run the application just by double-clicking on piface.jar, or on a shortcut to it. Otherwise, you may run it from the command line in a terminal or DOS window, using a command like

java -jar piface.jar

This will bring up a selector list of analyses. A particular dialog can also be run directly from the command line, if you know its name (can be discovered by browsing piface.jar with a zip file utility). For example, the two-sample t-test dialog may be run using

java -cp piface.jar rvl.piface.apps.TwoTGUI

Citing the software

If you use this software in preparing a research paper, grant proposal, or other publication, I would appreciate your acknowledging it by citing it in the references. Here is a suggested bibliography entry in APA or “author (date)” style:

Lenth, R. V. (2006-9). Java Applets for Power and Sample Size [Computer software]. Retrieved month, day, year from http://www.stat.uiowa.edu/~rlenth/Power.

This form of the citation is appropriate whether you run it online (give the date you ran it) or the stand-alone version (give the date you downloaded it).

Frequently asked questions

Advice

Here are two very wrong things that people try to do with this software:

Here are three very right things you can do:

Many funding agencies require a power/sample-size section in grant proposals. Following the above guidelines is good for improving your chances of being funded. You will have established that you have thought through the scientific issues, that your procedures are sound, and that you have a defensible sample size based on realistic variance estimates and scientifically tenable effect-size goals.

For your amusement (or despair), check out this video on how not to ask a statistician about sample-size. (Thanks to Susan Geyer, Morsani College of Medicine, Health Informatics Institute University of South Florida – aka JavaMama926. Dr. Geyer created it for use in a workshop she teaches at the American Society of Hematology’s Clinical Research Training Institute.)

References