Power calculator


Power Calculator

Choose a Model and Push a Button.
 

NORMAL Calculator Help Page*
1 Sample

A

B

2 Sample, Equal Variances

A

B

2 Sample, Unequal Variances

A

B

Lognormal

A

B

EXPONENTIAL Calculator Help Page*
1 Sample

A

B

2 Sample

A

B

BINOMIAL Calculator Help Page*
1 Sample

A

B

2 Sample Arcsine

A

B

2 Sample Median

A

B

Fisher's Exact Test

A

B

Proportion Responders

A

B

Case Control

A

B

POISSON Calculator Help Page*
1 Sample

A

B

2 Sample

A

B

CORRELATION COEFFICIENT Calculator Help Page*
1 Sample

A

B

ONE-SAMPLE NORMAL DISTRIBUTION

The Test

The null hypothesis is that the mean of the normal distribution
is a specified number, Ms.

The test associated with these calculations is the one-sample
t-test.

The standard deviation of the normal distribution will be
estimated from the data; it is not assumed to be known.

SIDES: Both one and two-sided alternatives are available.

Parameters Of The Test

Null hypothesis mean: The mean of the normal distribution
according to the null hypothesis.

Alternative mean: The mean of the normal distribution according
to the alternative hypothesis.

Standard deviation: The standard deviation of the normal
distribution.

Sample size: The number of observations in the single sample.

Significance: The probability of falsely rejecting the null
hypothesis when it is true.

Power: The probability of correctly rejecting the null
hypothesis when the alternative is true.

Method

Reference: Mace, Arthur E.: _Sample-Size Determination_, Robert
E. Krieger Publishing Company, Huntington, NY. (1974) Pages 74-77.

Examples

A drug is studied to see if it raises intelligence by
administering it to a number of subjects and then measuring their
scores on a standardized test which is known to produce a mean value
of 100 with a standard deviation of 10. If an increase to a true mean
of 102 is to be detected with a probability of 0.8 with a one-sided
test at a 0.05 significance level, what sample size is required? For
a two-sided test?
- 98 -

What is the power of these two tests if the mean is only
increased to 101?

========== Begin Echo of Computer Session ==========

***** One-sample normal (exact method) *****

Problem Initialization:-----

Enter 1 or 2 for 1- or 2-sided test:
$?
1 # 1-sided tests

Parameter Specification: -----

Enter: 1: Null hypothesis mean
2: Alternative hypothesis mean
3: Standard deviation
4: Sample size
5: Significance level
6: Power
Enter a '?' for the item to be calculated. Enter a 't' if a table of values
for this parameter is to be specified (only one 't' entry allowed). Enter
the numeric value of the parameter otherwise. Entering zeros for all items
skips the calculation and allows a choice of the next action.
$?
100 102 10 ? 0.05 0.8 # One-sample normal ex. #4

***** One-sample normal (exact method) *****

These calculations are for a one sided test.

Null hypothesis mean ............. 100.000

Alternative hypothesis mean ...... 102.000

Standard deviation ............... 10.000

Significance level ............... 0.050

Power ............................ 0.800

The Sample size is calculated to be 155.926

Choice of Next Action: -----

Enter:
(1) To perform another calculation of the same sort
(2) To change the setup for this type of problem
(3) To return to higher level menu
(4) To quit DSTPLAN
Select one of the above:
$?
2 # To change setup for this problem
- 99 -

Problem Initialization:-----

Enter 1 or 2 for 1- or 2-sided test:
$?
2 # 2-sided tests

Parameter Specification: -----

Enter: 1: Null hypothesis mean
2: Alternative hypothesis mean
3: Standard deviation
4: Sample size
5: Significance level
6: Power
Enter a '?' for the item to be calculated. Enter a 't' if a table of values
for this parameter is to be specified (only one 't' entry allowed). Enter
the numeric value of the parameter otherwise. Entering zeros for all items
skips the calculation and allows a choice of the next action.
$?
100 102 10 ? 0.05 0.8 # One-sample normal ex. #5

***** One-sample normal (exact method) *****

These calculations are for a two sided test.

Null hypothesis mean ............. 100.000

Alternative hypothesis mean ...... 102.000

Standard deviation ............... 10.000

Significance level ............... 0.050

Power ............................ 0.800

The Sample size is calculated to be 198.151

Choice of Next Action: -----

Enter:
(1) To perform another calculation of the same sort
(2) To change the setup for this type of problem
(3) To return to higher level menu
(4) To quit DSTPLAN
Select one of the above:
$?
2 # To change setup for this problem

Problem Initialization:-----

Enter 1 or 2 for 1- or 2-sided test:
$?
1 # 1-sided tests

Parameter Specification: -----
- 100 -

Enter: 1: Null hypothesis mean
2: Alternative hypothesis mean
3: Standard deviation
4: Sample size
5: Significance level
6: Power
Enter a '?' for the item to be calculated. Enter a 't' if a table of values
for this parameter is to be specified (only one 't' entry allowed). Enter
the numeric value of the parameter otherwise. Entering zeros for all items
skips the calculation and allows a choice of the next action.
$?
100 101 10 156 0.05 ? # One-sample normal ex. #6

***** One-sample normal (exact method) *****

These calculations are for a one sided test.

Null hypothesis mean ............. 100.000

Alternative hypothesis mean ...... 101.000

Standard deviation ............... 10.000

Sample size ...................... 156.000

Significance level ............... 0.050

The Power is calculated to be 0.344

Choice of Next Action: -----

Enter:
(1) To perform another calculation of the same sort
(2) To change the setup for this type of problem
(3) To return to higher level menu
(4) To quit DSTPLAN
Select one of the above:
$?
2 # To change setup for this problem

Problem Initialization:-----

Enter 1 or 2 for 1- or 2-sided test:
$?
2 # 2-sided tests

Parameter Specification: -----
- 101 -

Enter: 1: Null hypothesis mean
2: Alternative hypothesis mean
3: Standard deviation
4: Sample size
5: Significance level
6: Power
Enter a '?' for the item to be calculated. Enter a 't' if a table of values
for this parameter is to be specified (only one 't' entry allowed). Enter
the numeric value of the parameter otherwise. Entering zeros for all items
skips the calculation and allows a choice of the next action.
$?
100 101 10 199 0.05 ? # One-sample normal ex. #7

***** One-sample normal (exact method) *****

These calculations are for a two sided test.

Null hypothesis mean ............. 100.000

Alternative hypothesis mean ...... 101.000

Standard deviation ............... 10.000

Sample size ...................... 199.000

Significance level ............... 0.050

The Power is calculated to be 0.289

TWO-SAMPLE NORMAL DISTRIBUTION

The Test

The null hypothesis is that the mean of the two normally
distributed groups is the same.

The test associated with these calculations is the two-sample
t-test.

The common standard deviation of the normal distributions of the
groups will be estimated from the data; it is not assumed to be known.

SIDES: Both one and two-sided alternatives are available.

Parameters Of The Test

Group 1 mean: The mean of the first group under the alternative
hypothesis. If this parameter is calculated, it will be less than the
group 2 mean.

Group 2 mean: The mean of the second group under the alternative
hypothesis. If this parameter is calculated, it will be greater than
the group 1 mean.

Number in group 1: The number of observations in group 1.

Number in group 2: The number of observations in group 2.

Standard deviation of both groups: The common standard deviation
of both groups.

Significance: The probability of falsely rejecting the null
hypothesis when it is true.

Power: The probability of correctly rejecting the null
hypothesis when the alternative is true.

Number for equal sample size: The number in each group required
to yield the specified power.

Method

Reference: Mace, Arthur E.: _Sample-Size Determination_, Robert
E. Krieger Publishing Company, Huntington, NY. (1974) Pages 77-80.
- 104 -

Examples

A drug is studied to see if it raises intelligence by
administering it to a number of subjects and then measuring their
scores on a standardized test. An equal number of controls are given
a placebo and also take the standardized test. If a change from a
mean test score of 100 to a treated mean of 102 is to be detected with
probability 0.8, how many subjects must there be in the control and
treatment groups? The standard deviation of the test is known to be
10, although the sample standard deviation will be used in the test.

Both 1- and 2-sided tests at a significance level of 0.05 are to
be examined. For both tests so constructed, what is the probability
of detecting a change from 100 to 101?

========== Begin Echo of Computer Session ==========

***** Two-sample normal with equal variances *****
(exact method)

Problem Initialization:-----

Enter 1 or 2 for 1- or 2-sided test:
$?
1 # 1-sided tests

Parameter Specification: -----

Enter: 1: Group 1 mean
2: Group 2 mean
3: Number in group 1
4: Number in group 2
5: Standard deviation of both groups
6: Significance level
7: Power
Enter a "?" for the item to be calculated. Entering "?"s in positions 3 and
4 will calculate equal sample sizes for both groups. Enter a "t" if a table
of values for this parameter is to be specified. Entering "t"s in positions
3 and 4 will allow a table of equal sample sizes. Enter the numeric value
of the parameter otherwise. Entering zeros for all items skips the
calculation.
$?
100 102 ? ? 10 0.05 0.8 # Two-sample normal eq. var ex. #1
- 105 -

***** Two-sample normal with equal variances (exact method) *****

These calculations are for a one sided test.

Group 1 mean ........................... 100.000

Group 2 mean ........................... 102.000

Standard deviation of both groups ...... 10.000

Significance level ..................... 0.050

Power .................................. 0.800

The Equal sample size for both groups is calculated to be 309.806
Press Return / Enter to continue:
$?
# Done seeing answer
Choice of Next Action: -----

Enter:
(1) To perform another calculation of the same sort
(2) To change the setup for this type of problem
(3) To return to higher level menu
(4) To quit DSTPLAN
Select one of the above:
$?
1 # Another calculation

Parameter Specification: -----

Enter: 1: Group 1 mean
2: Group 2 mean
3: Number in group 1
4: Number in group 2
5: Standard deviation of both groups
6: Significance level
7: Power
Enter a "?" for the item to be calculated. Entering "?"s in positions 3 and
4 will calculate equal sample sizes for both groups. Enter a "t" if a table
of values for this parameter is to be specified. Entering "t"s in positions
3 and 4 will allow a table of equal sample sizes. Enter the numeric value
of the parameter otherwise. Entering zeros for all items skips the
calculation.
$?
100 101 310 310 10 0.05 ? # Two-sample normal eq. var ex. #2
- 106 -

***** Two-sample normal with equal variances (exact method) *****

These calculations are for a one sided test.

Group 1 mean ........................... 100.000

Group 2 mean ........................... 101.000

Number in group 1 ...................... 310.000

Number in group 2 ...................... 310.000

Standard deviation of both groups ...... 10.000

Significance level ..................... 0.050

The Power is calculated to be 0.344
Press Return / Enter to continue:
$?
# Done seeing answer
Choice of Next Action: -----

Enter:
(1) To perform another calculation of the same sort
(2) To change the setup for this type of problem
(3) To return to higher level menu
(4) To quit DSTPLAN
Select one of the above:
$?
2 # To change setup for this problem

Problem Initialization:-----

Enter 1 or 2 for 1- or 2-sided test:
$?
2 # 2-sided tests

Parameter Specification: -----

Enter: 1: Group 1 mean
2: Group 2 mean
3: Number in group 1
4: Number in group 2
5: Standard deviation of both groups
6: Significance level
7: Power
Enter a "?" for the item to be calculated. Entering "?"s in positions 3 and
4 will calculate equal sample sizes for both groups. Enter a "t" if a table
of values for this parameter is to be specified. Entering "t"s in positions
3 and 4 will allow a table of equal sample sizes. Enter the numeric value
of the parameter otherwise. Entering zeros for all items skips the
calculation.
$?
100 102 ? ? 10 0.05 0.8 # Two-sample normal eq. var ex. #3
- 107 -

***** Two-sample normal with equal variances (exact method) *****

These calculations are for a two sided test.

Group 1 mean ........................... 100.000

Group 2 mean ........................... 102.000

Standard deviation of both groups ...... 10.000

Significance level ..................... 0.050

Power .................................. 0.800

The Equal sample size for both groups is calculated to be 393.407
Press Return / Enter to continue:
$?
# Done seeing answer
Choice of Next Action: -----

Enter:
(1) To perform another calculation of the same sort
(2) To change the setup for this type of problem
(3) To return to higher level menu
(4) To quit DSTPLAN
Select one of the above:
$?
1 # Another calculation

Parameter Specification: -----

Enter: 1: Group 1 mean
2: Group 2 mean
3: Number in group 1
4: Number in group 2
5: Standard deviation of both groups
6: Significance level
7: Power
Enter a "?" for the item to be calculated. Entering "?"s in positions 3 and
4 will calculate equal sample sizes for both groups. Enter a "t" if a table
of values for this parameter is to be specified. Entering "t"s in positions
3 and 4 will allow a table of equal sample sizes. Enter the numeric value
of the parameter otherwise. Entering zeros for all items skips the
calculation.
$?
100 101 394 394 10 0.05 ? # Two-sample normal eq. var ex. #4
- 108 -

***** Two-sample normal with equal variances (exact method) *****

These calculations are for a two sided test.

Group 1 mean ........................... 100.000

Group 2 mean ........................... 101.000

Number in group 1 ...................... 394.000

Number in group 2 ...................... 394.000

Standard deviation of both groups ...... 10.000

Significance level ..................... 0.050

The Power is calculated to be 0.288

TWO-SAMPLE NORMAL WITH UNEQUAL VARIANCES

The Distribution And Test

The assumption of this test is that the two independent samples
arise from normally distributed populations whose variances and hence
standard deviations differ.

The null hypothesis is that the mean of the two groups is the
same.

The test used to analyze the data will be the t-test using
Welch's approximation for the degrees of freedom.

SIDES: Both one- and two-sided alternatives are available.

Parameters Of The Test

Group 1 mean: The mean of the first population under the
alternative hypothesis. If this parameter is calculated, it will be
less than the group 2 mean.

Group 2 mean: The mean of the second population under the
alternative hypothesis. If this parameter is calculated, it will be
greater than the group 1 mean.

Standard deviation of group 1: The standard deviation of the
first population.

Standard deviation of group 2: The standard deviation of the
second population.

Number in group 1: The number of observations in group 1.

Number in group 2: The number of observations in group 2.

Significance: The probability of falsely rejecting the null
hypothesis when it is true.

Power: The probability of correctly rejecting the null
hypothesis when the alternative is true.

Note

If sample sizes are calculated, the program provides an option of
whether to use efficient allocation of subjects to groups or whether
to use equal sample sizes in each group. The efficient allocation
uses a number of subjects proportional to the population standard
deviation in each group. This allocation minimizes the standard error
of the difference in means. See the comments at the end of the
example.
- 110 -

Method

The t-test with Welch's correction to the degrees of freedom for
unequal variances is used.

Example

Given two populations, normally distributed with means of 10 and
20 and standard deviations of 10 and 20 respectively, what sample
sizes for both groups are required to produce probabilities of 0.8,
0.9, 0.95, and 0.99 of detecting that there is a difference in the
means, using a two-sided test with a significance of 0.05? Perform
the calculation using both efficient subject allocation and equal
allocation to the two groups.

========== Begin Echo of Computer Session ==========

***** Two-sample normal with unequal variances *****
(Welch's Approximation)

Problem Initialization:-----

Enter 1 or 2 for 1- or 2-sided test:
$?
2 # 2-sided tests

Parameter Specification: -----

Enter: 1: Group 1 mean
2: Group 2 mean
3: Number in group 1
4: Number in group 2
5: Standard deviation of group 1
6: Standard deviation of group 2
7: Significance level
8: Power
Enter a "?" for the item to be calculated. Entering "?"s in positions 3 and
4 will calculate equal sample sizes for both groups. Enter a 't' if a table
of values for this parameter isto bespecified. Entering "t"s in positions 3
and 4 will allow a table of equal sample sizes. Enter the numeric value of
the parameter otherwise. Entering zeros for all items skips the
calculation.
$?
10 20 ? ? 10 20 0.05 t # 2-samp. norm. uneq. vars ex.#1
You are specifing a list for values of Power
The list currently contains 0 values.
The maximum number allowed is 20.
- 111 -

Enter (1) ADD values individually specified
(2) ADD values equally spaced between bounds
(3) ADD values as (2) with logarithmic spacing
(4) PRINT list
(5) DELETE a single element of list
(6) DELETE consecutive elements of list
(7) SORT list in ascending order and eliminate duplicate values
(8) QUIT
$?
1 # ADD values indiv. spec.
Enter the number of values that will be entered
$?
4 # The number of values
Enter 4 values
$?
0.8 0.9 0.95 0.99 # The 4 values
The list currently contains 4 values.
The maximum number allowed is 20.

Enter (1) ADD values individually specified
(2) ADD values equally spaced between bounds
(3) ADD values as (2) with logarithmic spacing
(4) PRINT list
(5) DELETE a single element of list
(6) DELETE consecutive elements of list
(7) SORT list in ascending order and eliminate duplicate values
(8) QUIT
$?
8 # QUIT

Enter (1) for equal sample size calculation
(2) for efficient allocation of sample sizes calculation
$?
1 # eq. samp. size calc.

***** Two-sample normal with unequal variances (Welch's ap) *****

These calculations are for a two sided test.

Group 1 mean ....................... 10.000

Group 2 mean ....................... 20.000

Standard deviation of group 1 ...... 10.000

Standard deviation of group 2 ...... 20.000

Significance level ................. 0.050

Equal sample size
Power for both groups

0.800 40.581
0.900 53.868
0.950 66.302
0.990 93.186
- 112 -

Press Return / Enter to continue:
$?
# Done seeing answer
Choice of Next Action: -----

Enter:
(1) To perform another calculation of the same sort
(2) To change the setup for this type of problem
(3) To return to higher level menu
(4) To quit DSTPLAN
Select one of the above:
$?
1 # Another calculation

Parameter Specification: -----

Enter: 1: Group 1 mean
2: Group 2 mean
3: Number in group 1
4: Number in group 2
5: Standard deviation of group 1
6: Standard deviation of group 2
7: Significance level
8: Power
Enter a "?" for the item to be calculated. Entering "?"s in positions 3 and
4 will calculate equal sample sizes for both groups. Enter a 't' if a table
of values for this parameter isto bespecified. Entering "t"s in positions 3
and 4 will allow a table of equal sample sizes. Enter the numeric value of
the parameter otherwise. Entering zeros for all items skips the
calculation.
$?
1:10 # 2-samp. norm. uneq. vars ex.#2
Current parameter values are:
10.0000 20.0000 ? ? 10.0000 20.0000 0.500000E-01 T

========== End Echo of Computer Session ==========

We want to rerun using the option of an efficient allocation of
the subjects to groups. Consequently, we change an arbitrary
parameter to its previous value. Note that the table of power values
must be reentered.

========== Begin Echo of Computer Session ==========

You are specifing a list for values of Power
The list currently contains 0 values.
The maximum number allowed is 20.
- 113 -

Enter (1) ADD values individually specified
(2) ADD values equally spaced between bounds
(3) ADD values as (2) with logarithmic spacing
(4) PRINT list
(5) DELETE a single element of list
(6) DELETE consecutive elements of list
(7) SORT list in ascending order and eliminate duplicate values
(8) QUIT
$?
1 # ADD values indiv. spec.
Enter the number of values that will be entered
$?
4 # The number of values
Enter 4 values
$?
0.8 0.9 0.95 0.99 # The 4 values
The list currently contains 4 values.
The maximum number allowed is 20.

Enter (1) ADD values individually specified
(2) ADD values equally spaced between bounds
(3) ADD values as (2) with logarithmic spacing
(4) PRINT list
(5) DELETE a single element of list
(6) DELETE consecutive elements of list
(7) SORT list in ascending order and eliminate duplicate values
(8) QUIT
$?
8 # QUIT

Enter (1) for equal sample size calculation
(2) for efficient allocation of sample sizes calculation
$?
2 # eff. alloc. of samp. size

***** Two-sample normal with unequal variances (Welch's ap) *****

These calculations are for a two sided test.

Group 1 mean ....................... 10.000

Group 2 mean ....................... 20.000

Standard deviation of group 1 ...... 10.000

Standard deviation of group 2 ...... 20.000

Significance level ................. 0.050

Power Number in group 1 Number in group 2

0.800 24.333 48.667
0.900 32.333 64.667
0.950 39.667 79.333
0.990 56.000 112.000
- 114 -

========== End Echo of Computer Session ==========

The efficient allocation produced a smaller total sample size
than the equal allocation. In other words, the number of subjects in
both arms combined was less for efficient allocation studies than for
equal allocation studies. Here is a table of the total sample sizes
calculated for both kinds of allocation at the four different power
levels:

Power | Efficient | Equal
------+-----------+------
0.800 | 74 | 82
0.900 | 98 | 108
0.950 | 120 | 134
0.990 | 168 | 188

TWO-SAMPLE LOG-NORMAL

The Distribution And Test

The log-normal is the distribution of a set of values whose
logarithms are normally distributed. The distribution is recognized
as a reasonable approximation to data by two properties. (1) All
values are positive and (2) the distribution is skewed to the right.
The second property indicates that there are more observations far
above the peak of a histogram than there are far below the peak.

The calculations performed by this routine assume that the
variances of the logarithms of the values in the two groups are the
same; in terms of raw (observed) values this implies a common
coefficient of variation. The coefficient of variation is the
standard deviation divided by the mean.

The null hypothesis is that the mean of the two groups is the
same.

The test used to analyze the data will be the t-test applied to
the logarithms of the observed data.

SIDES: Both one- and two-sided alternatives are available.

Parameters Of The Test

Group 1 mean (raw values): The mean of the first group (in
observed, not logarithmically transformed values) under the
alternative hypothesis. If this parameter is calculated, it will be
less than the group 2 mean.

Group 2 mean (raw values): The mean of the second group (in
observed, not logarithmically transformed values) under the
alternative hypothesis. If this parameter is calculated, it will be
greater than the group 1 mean.

Common coefficient of variation (raw values): The standard
deviation of either group divided by the mean of the group, where the
standard deviation and the mean are given in observed, not
logarithmically transformed values. The values for the coefficient of
variation of the two groups are assumed to be the same.

Number in group 1: The number of observations in group 1.

Number in group 2: The number of observations in group 2.

Significance: The probability of falsely rejecting the null
hypothesis when it is true.

Power: The probability of correctly rejecting the null
hypothesis when the alternative is true.
- 116 -

Method

The means and variances are transformed back and forth between
raw and logarithmic units as needed. The two-sample normal routine is
used for calculations.

Example

Given two log normal means of 10 and 20 and a coefficient of
variation of 1, what equal sample size for both groups is required to
produce probabilities of 0.8, 0.9, 0.95, and 0.99 of detecting that
there is a difference in the means, using a two-sided test with a
significance of 0.05?

========== Begin Echo of Computer Session ==========

***** Two-sample log-normal *****

Problem Initialization:-----

Enter 1 or 2 for 1- or 2-sided test:
$?
2 # 2-sided tests

Parameter Specification: -----

Enter: 1: Group 1 mean - raw values
2: Group 2 mean - raw values
3: Number in group 1
4: Number in group 2
5: Coefficient of Variation - raw values
6: Significance level
7: Power
Enter a "?" for the item to be calculated. Entering "?"s in positions 3 and
4 will calculate equal sample sizes for both groups. Enter a "t" if a table
of values for this parameter is to be specified. Entering "t"s in positions
3 and 4 will allow a table of equal sample sizes. Enter the numeric value
of the parameter otherwise. Entering zeros for all items skips the
calculation.
$?
10 20 ? ? 1 0.05 t # Two-sample log-normal ex. #1
You are specifing a list for values of Power
The list currently contains 0 values.
The maximum number allowed is 20.
- 117 -

Enter (1) ADD values individually specified
(2) ADD values equally spaced between bounds
(3) ADD values as (2) with logarithmic spacing
(4) PRINT list
(5) DELETE a single element of list
(6) DELETE consecutive elements of list
(7) SORT list in ascending order and eliminate duplicate values
(8) QUIT
$?
1 # ADD values indiv. spec.
Enter the number of values that will be entered
$?
4 # The number of values
Enter 4 values
$?
0.8 0.9 0.95 0.99 # The 4 values
The list currently contains 4 values.
The maximum number allowed is 20.

Enter (1) ADD values individually specified
(2) ADD values equally spaced between bounds
(3) ADD values as (2) with logarithmic spacing
(4) PRINT list
(5) DELETE a single element of list
(6) DELETE consecutive elements of list
(7) SORT list in ascending order and eliminate duplicate values
(8) QUIT
$?
8 # QUIT

***** Two-sample log-normal *****

These calculations are for a two sided test.

Group 1 mean - raw values .................. 10.000

Group 2 mean - raw values .................. 20.000

Coefficient of Variation - raw values ...... 1.000

Significance level ......................... 0.050

Equal sample size
Power for both groups

0.800 23.647
0.900 31.310
0.950 38.483
0.990 53.994

========== End Echo of Computer Session ==========

ONE-SAMPLE EXPONENTIAL DISTRIBUTION

The Test

The null hypothesis is that the mean of the exponential
distribution is a specified quantity, Ms.

The test associated with these calculations is the exact test.

SIDES: Both one- and two-sided alternatives are available.

Parameters Of The Test

Null hypothesis mean: The mean of the exponential distribution
according to the null hypothesis.

Alternative mean: The mean of the exponential distribution
according to the alternative hypothesis.

Sample size: The number of observations in the single sample.

Significance: The probability of falsely rejecting the null
hypothesis when it is true.

Power: The probability of correctly rejecting the null
hypothesis when the alternative is true.

Method

Reference: Mace, Arthur E.: _Sample-Size Determination_, Robert
E. Krieger Publishing Company, Huntington, NY. (1974) Pages 107-110.

Examples

A computer manufacturer wants to demonstrate that a machine has a
failure rate of less than one failure per thousand hours. The time to
failure of the machine is distributed exponentially, a one-sided test
at a significance level of 0.05 will be used, 10 machines will be
tested until each fails, and an 80% chance of demonstration is
desired. What must the true mean time to failure be to meet these
specifications? If the true time to failure is 1500 hours, how many
machines must be tested to failure to show that the mean time is
greater than 1000?
- 120 -

========== Begin Echo of Computer Session ==========

***** One-sample Exponential (Exact method) *****

Problem Initialization:-----

Enter 1 or 2 for 1- or 2-sided test:
$?
1 # 1-sided tests

Parameter Specification: -----

Enter: 1: Null hypothesis mean
2: Alternative hypothesis mean
3: Sample size
4: Significance level
5: Power
Enter a '?' for the item to be calculated. Enter a 't' if a table of values
for this parameter is to be specified (only one 't' entry allowed). Enter
the numeric value of the parameter otherwise. Entering zeros for all items
skips the calculation and allows a choice of the next action.
$?
1000 ? 10 0.05 0.8 # One-sample exponential ex. #1

Special Case: -----

Is null hypothesis mean less than alternative hypothesis mean? (y/n)
$?
y # null mean < alt. mean

***** One-sample Exponential (Exact method) *****

These calculations are for a one sided test.

Null hypothesis mean ...... 1000.000

Sample size ............... 10.000

Significance level ........ 0.050

Power ..................... 0.800

The Alternative hypothesis mean is calculated to be 2154.581
Press Return / Enter to continue:
$?
# Done seeing answer
Choice of Next Action: -----
- 121 -

Enter:
(1) To perform another calculation of the same sort
(2) To change the setup for this type of problem
(3) To return to higher level menu
(4) To quit DSTPLAN
Select one of the above:
$?
1 # Another calculation

Parameter Specification: -----

Enter: 1: Null hypothesis mean
2: Alternative hypothesis mean
3: Sample size
4: Significance level
5: Power
Enter a '?' for the item to be calculated. Enter a 't' if a table of values
for this parameter is to be specified (only one 't' entry allowed). Enter
the numeric value of the parameter otherwise. Entering zeros for all items
skips the calculation and allows a choice of the next action.
$?
1000 1500 ? 0.05 0.8 # One-sample exponential ex. #2

***** One-sample Exponential (Exact method) *****

These calculations are for a one sided test.

Null hypothesis mean ............. 1000.000

Alternative hypothesis mean ...... 1500.000

Significance level ............... 0.050

Power ............................ 0.800

The Sample size is calculated to be 36.339

========== End Echo of Computer Session ==========

TWO-SAMPLE EXPONENTIAL DISTRIBUTION

The Test

The null hypothesis is that the mean of the two exponentially
distributed groups is the same.

The test associated with these calculations is the F test for
comparing two exponential distributions.

SIDES: Both one- and two-sided alternatives are available.

Parameters Of The Test

Group 1 mean: The mean of the first group under the alternative
hypothesis. If this parameter is calculated, it will be less than the
group 2 mean.

Group 2 mean: The mean of the second group under the alternative
hypothesis. If this parameter is calculated, it will be greater than
the group 1 mean.

Number in group 1: The number of observations in group 1.

Number in group 2: The number of observations in group 2.

Significance: The probability of falsely rejecting the null
hypothesis when it is true.

Power: The probability of correctly rejecting the null
hypothesis when the alternative is true.

Number for equal sample size: The equal number in each group
required to yield the specified power.

Method

Reference: Mace, Arthur E.: _Sample-Size Determination_, Robert
E. Krieger Publishing Company, Huntington, NY. (1974) Pages 110-113.

Examples

A computer manufacturer believes that a change in design has
improved the mean time to failure from 1000 hours to 2000 hours. He
wants to show that the new machine is improved by testing an equal
number of old and new machines until they fail. A one-sided test at
significance level 0.05 will be used, the desired power is 0.8. How
many machines must be tested?
- 124 -

Show that the answer is invariant to scale by using 1 and 2
instead of 1000 and 2000.

========== Begin Echo of Computer Session ==========

***** Two-sample Exponential (Exact method) *****

Problem Initialization:-----

Enter 1 or 2 for 1- or 2-sided test:
$?
1 # 1-sided tests

Parameter Specification: -----

Enter: 1: Group 1 mean
2: Group 2 mean
3: Group 1 sample size
4: Group 2 sample size
5: Significance level
6: Power
Enter a "?" for the item to be calculated. Entering "?"s in positions 3 and
4 will calculate equal sample sizes for both groups. Enter a "t" if a table
of values for this parameter is to be specified. Entering "t"s in positions
3 and 4 will allow a table of equal sample sizes. Enter the numeric value
of the parameter otherwise. Entering zeros for all items skips the
calculation.
$?
1000 2000 ? ? 0.05 0.8 # Two-sample exponential ex. #1

***** Two-sample Exponential (Exact method) *****

These calculations are for a one sided test.

Group 1 mean ............ 1000.000

Group 2 mean ............ 2000.000

Significance level ...... 0.050

Power ................... 0.800

The Equal sample size for each group is calculated to be 26.153
Press Return / Enter to continue:
$?
# Done seeing answer
Choice of Next Action: -----
- 125 -

Enter:
(1) To perform another calculation of the same sort
(2) To change the setup for this type of problem
(3) To return to higher level menu
(4) To quit DSTPLAN
Select one of the above:
$?
1 # Another calculation

Parameter Specification: -----

Enter: 1: Group 1 mean
2: Group 2 mean
3: Group 1 sample size
4: Group 2 sample size
5: Significance level
6: Power
Enter a "?" for the item to be calculated. Entering "?"s in positions 3 and
4 will calculate equal sample sizes for both groups. Enter a "t" if a table
of values for this parameter is to be specified. Entering "t"s in positions
3 and 4 will allow a table of equal sample sizes. Enter the numeric value
of the parameter otherwise. Entering zeros for all items skips the
calculation.
$?
1 2 ? ? 0.05 0.8 # Two-sample exponential ex. #2

***** Two-sample Exponential (Exact method) *****

These calculations are for a one sided test.

Group 1 mean ............ 1.000

Group 2 mean ............ 2.000

Significance level ...... 0.050

Power ................... 0.800

The Equal sample size for each group is calculated to be 26.153

========== End Echo of Computer Session ==========

ONE-SAMPLE BINOMIAL

The Test

The null hypothesis is that the probability of an event in each
trial of the group being tested is a specified value, ps.

The test associated with these calculations is the exact test for
the one-sample binomial distribution.

SIDES: Only a one-sided alternative is available.

Parameters Of The Test

Null hypothesis probability: This is the probability, ps, of an
event in each trial according to the null hypothesis. This
probability is used to obtain the critical region.

Alternative hypothesis probability: The probability, pa, of an
event in each trial according to the alternative hypothesis. This
probability is used to calculate power.

Sample Size: The number of trials or observations in the single
sample.

Significance: The probability of falsely rejecting the null
hypothesis when it is true.

Power: The probability of correctly rejecting the null
hypothesis when the alternative is true.

Method

The critical region is calculated as the high or low number of
events (high if pa is greater than ps, low if pa is less than ps) such
that the probability of the number of events falling in the critical
region is less than or equal to the significance level and as close to
its value as possible, given that the null hypothesis is correct. The
power is calculated as the probability of the number of events falling
in the critical region if the alternative hypothesis is correct.

Comments

The outcome of a trial is an integral number of events. The
critical region of a test is consequently bounded by an integer, so
there are only a fixed number of significance levels available. A
user-specified significance level is thus usually not exactly
attainable. DSTPLAN deals with this problem by choosing the critical
region as large as possible under the constraint that the specified
significance value may not be exceeded. This choice frequently causes
- 30 -

the significance level to be less than that specified. For similar
reasons, the power may be increased over that requested. To give the
user some insight, the critical values bounding the desired
significance level are printed with the associated significance and
power values whenever either value is changed from that requested.

The inability to exactly match requested significance levels is
the reason that two-sided tests are not considered in the one-sample
binomial case. Generally, in two-sided tests, when the null
hypothesis is true, half of the probability of an outcome in the
critical region is in the top portion of this region and half in the
bottom. Because significance levels are not generally attained, this
condition cannot be exactly achieved in the one-sample binomial case.
The user is responsible for choosing the suitable approximation by
considering the two sides of the test separately.

The fact that only integer valued outcomes are possible causes
another difficulty: power does not necessarily increase with the
sample size. For large increases in sample size, the power does
become greater, but for small changes it may actually decrease.
However, the method used for calculating sample sizes assumes that the
power does increase with sample size. A consequence is that the
method may not find the smallest sample size with the specified
significance level and power. To ameliorate this difficulty, if the
computed sample size is less than 100, the next twenty smaller sample
sizes are examined to see if they provide the desired significance
level and power.

Examples

In a Phase II trial for a new cancer treatment, a number of
patients are given the treatment and the response rate is observed.
If the response rate is so small as to be inconsistent with a true 20%
rate then the treatment is rejected as ineffective.

The smallest such trial which has a significance level of 0.05
consists of 14 patients. What true response rate must the treatment
have so that there will be an 80% chance of rejecting it?

If it is desired to have an 80% chance of rejecting treatments
whose response rate is less than 5%, how large must the study be?

If it is desired to have an 80% chance of rejecting treatments
whose response rate is less than 10%, how large must the study be?

========== Begin Echo of Computer Session ==========

***** One-sample binomial (exact method) *****

This routine does calculations only for one-sided tests

Parameter Specification: -----
- 31 -

Enter: 1: Null hypothesis probability
2: Alternative hypothesis probability
3: Sample size
4: Significance level
5: Power
Enter a '?' for the item to be calculated. Enter a 't' if a table of values
for this parameter is to be specified (only one 't' entry allowed). Enter
the numeric value of the parameter otherwise. Entering zeros for all items
skips the calculation and allows a choice of the next action.
$?
0.2 ? 14 0.05 0.8 # One-sample binomial ex. #1
Is the null hypothesis probability less than
the alternative hypothesis probability? (y/n)
$?
n # Null hyp. NOT < Alt. hyp.

***** One-sample binomial (exact method) *****

Null hypothesis probability ...... 0.200

Sample size ...................... 14.000

Significance level ............... 0.050

Power ............................ 0.800

The Alternative hypothesis probability is calculated to be 0.016
The new significance level is 0.044 .
The new power is 0.800 .
Press Return / Enter to continue:
$?
# done seeing answer

Bracketing values:
Critical value Significance Power

0.0 0.0440 0.8000
1.0 0.1979 0.9799

Choice of Next Action: -----

Enter:
(1) To perform another calculation of the same sort
(2) To return to higher level menu
(3) To quit DSTPLAN
Select one of the above:
$?
1 # Another calculation

Parameter Specification: -----

Enter: 1: Null hypothesis probability
2: Alternative hypothesis probability
3: Sample size
4: Significance level
5: Power
- 32 -

Enter a '?' for the item to be calculated. Enter a 't' if a table of values
for this parameter is to be specified (only one 't' entry allowed). Enter
the numeric value of the parameter otherwise. Entering zeros for all items
skips the calculation and allows a choice of the next action.
$?
0.2 0.05 ? 0.05 0.8 # One-sample binomial ex. #2

***** One-sample binomial (exact method) *****

Null hypothesis probability ............. 0.200

Alternative hypothesis probability ...... 0.050

Significance level ...................... 0.050

Power ................................... 0.800

The Sample size is calculated to be 30.000
The new significance level is 0.044 .
The new power is 0.812 .
Press Return / Enter to continue:
$?
# done seeing answer

Bracketing values:
Critical value Significance Power

2.0 0.0442 0.8122
3.0 0.1227 0.9392

Choice of Next Action: -----

Enter:
(1) To perform another calculation of the same sort
(2) To return to higher level menu
(3) To quit DSTPLAN
Select one of the above:
$?
1 # Another calculation

Parameter Specification: -----

Enter: 1: Null hypothesis probability
2: Alternative hypothesis probability
3: Sample size
4: Significance level
5: Power
Enter a '?' for the item to be calculated. Enter a 't' if a table of values
for this parameter is to be specified (only one 't' entry allowed). Enter
the numeric value of the parameter otherwise. Entering zeros for all items
skips the calculation and allows a choice of the next action.
$?
2:0.1 # One-sample binomial ex. #3
Current parameter values are:
0.200000 0.100000 ? 0.500000E-01 0.800000
- 33 -

***** One-sample binomial (exact method) *****

Null hypothesis probability ............. 0.200

Alternative hypothesis probability ...... 0.100

Significance level ...................... 0.050

Power ................................... 0.800

The Sample size is calculated to be 82.000
The new significance level is 0.046 .
The new power is 0.806 .
Press Return / Enter to continue:
$?
# done seeing answer

Bracketing values:
Critical value Significance Power

10.0 0.0458 0.8057
11.0 0.0836 0.8847

========== End Echo of Computer Session ==========

TWO-SAMPLE BINOMIAL

The Test

The null hypothesis is that the probability of an event in each
trial is the same in both of the groups.

The test for which these calculations are performed is the
chi-square test comparing two binomial probabilities.

SIDES: Both one- and two-sided alternatives are available.

Parameters of the Test

Group 1 probability: The probability under the alternative
hypothesis of an event in each trial of group 1. If this probability
is to be calculated, it will be less than the probability for group 2.

Group 2 probability: The probability under the alternative
hypothesis of an event in each trial of group 2. If this probability
is to be calculated, it will be greater than the probability for group
1.

Number in group 1: The number of individual trials constituting
group 1.

Number in group 2: The number of individual trials constituting
group 2.

Significance: The probability of falsely rejecting the null
hypothesis when it is true.

Power: The probability of correctly rejecting the null
hypothesis when the alternative is true.

Number for equal sample size: The equal number in each group
necessary to achieve the specified power for the given values of the
other parameters.

Method

The normal approximation to the arcsin transformation of the
binomial distribution is used.

Reference: Mace, Arthur E.: _Sample-Size Determination_, Robert
E. Krieger Publishing Company, Huntington, NY. (1974) Pages 101-104.
- 36 -

Examples

The calculations shown determine the sample size necessary to
detect a difference in probability of 0.1 for varying values of the
lower probability. As is well known, the sample size needed is
maximal when the two probabilities straddle 0.5 equally.

========== Begin Echo of Computer Session ==========

***** Two-sample Binomial (Arcsin approximation) *****

Problem Initialization: -----

Enter 1 or 2 for 1- or 2-sided test:
$?
1 # 1-sided tests

Parameter Specification: -----

Enter: 1: Probability of an event in group 1
2: Probability of an event in group 2
3: Number of trials in group 1
4: Number of trials in group 2
5: Significance level
6: Power
Enter a "?" for the item to be calculated. Entering "?"s in positions 3 and
4 will calculate equal sample sizes for both groups. Enter a "t" if a table
of values for this parameter is to be specified. Entering "t"s in positions
3 and 4 will allow a table of equal sample sizes. Enter the numeric value
of the parameter otherwise. Entering zeros for all items skips the
calculation.
$?
0.1 0.2 ? ? 0.05 0.8 # Two-sample binomial ex. #1

***** Two-sample Binomial (Arcsin approximation) *****

These calculations are for a one sided test.

Probability of an event in group 1 ...... 0.100

Probability of an event in group 2 ...... 0.200

Significance level ...................... 0.050

Power ................................... 0.800

The Number of equal trials in each group is calculated to be 153.529
Press Return / Enter to continue:
$?
# Done seeing answer
Choice of Next Action: -----
- 37 -

Enter:
(1) To perform another calculation of the same sort
(2) To change the setup for this type of problem
(3) To return to higher level menu
(4) To quit DSTPLAN
Select one of the above:
$?
1 # Another calculation

Parameter Specification: -----

Enter: 1: Probability of an event in group 1
2: Probability of an event in group 2
3: Number of trials in group 1
4: Number of trials in group 2
5: Significance level
6: Power
Enter a "?" for the item to be calculated. Entering "?"s in positions 3 and
4 will calculate equal sample sizes for both groups. Enter a "t" if a table
of values for this parameter is to be specified. Entering "t"s in positions
3 and 4 will allow a table of equal sample sizes. Enter the numeric value
of the parameter otherwise. Entering zeros for all items skips the
calculation.
$?
0.25 0.35 ? ? 0.05 0.8 # Two-sample binomial ex. #2

***** Two-sample Binomial (Arcsin approximation) *****

These calculations are for a one sided test.

Probability of an event in group 1 ...... 0.250

Probability of an event in group 2 ...... 0.350

Significance level ...................... 0.050

Power ................................... 0.800

The Number of equal trials in each group is calculated to be 258.037
Press Return / Enter to continue:
$?
# Done seeing answer
Choice of Next Action: -----

Enter:
(1) To perform another calculation of the same sort
(2) To change the setup for this type of problem
(3) To return to higher level menu
(4) To quit DSTPLAN
Select one of the above:
$?
1 # Another calculation

Parameter Specification: -----
- 38 -

Enter: 1: Probability of an event in group 1
2: Probability of an event in group 2
3: Number of trials in group 1
4: Number of trials in group 2
5: Significance level
6: Power
Enter a "?" for the item to be calculated. Entering "?"s in positions 3 and
4 will calculate equal sample sizes for both groups. Enter a "t" if a table
of values for this parameter is to be specified. Entering "t"s in positions
3 and 4 will allow a table of equal sample sizes. Enter the numeric value
of the parameter otherwise. Entering zeros for all items skips the
calculation.
$?
0.45 0.55 ? ? 0.05 0.8 # Two-sample binomial ex. #3

***** Two-sample Binomial (Arcsin approximation) *****

These calculations are for a one sided test.

Probability of an event in group 1 ...... 0.450

Probability of an event in group 2 ...... 0.550

Significance level ...................... 0.050

Power ................................... 0.800

The Number of equal trials in each group is calculated to be 308.095

========== End Echo of Computer Session ==========

BINOMIAL PROBABILITIES ABOVE AND BELOW THE MEDIAN

The Test

This calculation relates to a continuous variable that is thought
to affect a value of a binomial probability. As a concrete example,
consider a binomial probability of complete tumor disappearance
following radiation therapy. A new measure of tumor radiosensitivity
is discovered, and it is desired to test whether this measure is
predictive of the probability of tumor disappearance. One would
assume that radiation sensitive tumors would be more likely to be
cured than would radioresistant tumors. We do not have much
experience with the new measure, but we do know that overall, for
example, 60% of all tumors are now cured with radiation - a figure we
will call PO (for overall probability).

By definition, half the subjects will have a sensitivity measure
below the median value found in the experiment and half will have a
measure above the median value. If PL is the probability of cure for
the group with measures below the median and PH the probability of
those with measures above the median, it follows that (PL + PH)/2 =
PO.

Suppose that the maximum sized feasible trial contains 100
subjects. It is of interest to know the minimal PH (above 60%) that
provides an 80% probability of showing that PH is larger than PL. To
find this number we could try (PL=0.55, PH=0.65), (PL=0.50, PH=0.70),
..., (PL=0.20, PH=1.00) and calculate the power for each pair of
values using the two-sample binomial routine. Then the pair of values
providing a power of 0.8 would be chosen. The calculation provided in
DSTPLAN automates this process.

Note that the calculation of the previous paragraph is not easily
accomplished using the two-sample binomial and the table of values
facility. The reason is that both PH and PL change in the above
calculation, whereas the table of values facility only allows a table
of one value.

Examples

(1) What is the minimal detectable difference in probabilities
according to the setup of the above writeup?

(2) If the total sample size is 50, what is the minimal
detectable probability?

(3) If the overall probability were 0.9, what would be the
minimal detectable probability?
- 40 -

========== Begin Echo of Computer Session ==========

***** Above and Below the Median *****

Problem Initialization: -----

Enter 1 or 2 for 1- or 2-sided test:
$?
1 # 1-sided tests

Enter overall probability:

$?
0.6 # Overall probability

Parameter Specification: -----

Enter: 1: Above Median Pr - Overall Pr
2: Total Sample Size
3: Significance level
4: Power
Enter a "?" for the item to be calculated. Enter a "t" if a table of values
for this parameter is to be specified (only one "t" entry allowed). Enter
the numeric value of the parameter otherwise. Entering zeros for all items
skips the calculation and allows a choice of the next action.
$?
? 100 0.05 0.8 # Abv. Med. Pr. - Ov. Pr. ex. #1

***** Above and Below the Median *****

These calculations are for a one sided test.

Overall Probability ............... 0.600

Total Sample Size ....... 100.000

Significance level ...... 0.050

Power ................... 0.800

The Above Median Pr - Overall Pr is calculated to be 0.120
Press Return / Enter to continue:
$?
# Done seeing answer

========== End Echo of Computer Session ==========

The greater of the two minimally detectable probabilities is 0.6
+ 0.120 = 0.720, and by symmetry, the lower probability is 0.6 - 0.120
= 0.480. The minimal detectable difference is 2 X 0.120 = 0.240.
- 41 -

========== Begin Echo of Computer Session ==========

Choice of Next Action: -----

Enter:
(1) To perform another calculation of the same sort
(2) To change the setup for this type of problem
(3) To return to higher level menu
(4) To quit DSTPLAN
Select one of the above:
$?
1 # Another calculation

Parameter Specification: -----

Enter: 1: Above Median Pr - Overall Pr
2: Total Sample Size
3: Significance level
4: Power
Enter a "?" for the item to be calculated. Enter a "t" if a table of values
for this parameter is to be specified (only one "t" entry allowed). Enter
the numeric value of the parameter otherwise. Entering zeros for all items
skips the calculation and allows a choice of the next action.
$?
2:50 # Change the Sample Size
Current parameter values are:
? 50.0000 0.500000E-01 0.800000

***** Above and Below the Median *****

These calculations are for a one sided test.

Overall Probability ............... 0.600

Total Sample Size ....... 50.000

Significance level ...... 0.050

Power ................... 0.800

The Above Median Pr - Overall Pr is calculated to be 0.168
Press Return / Enter to continue:
$?
# Done seeing answer

========== End Echo of Computer Session ==========

If the sample size is only 50, the minimal detectable difference
in probabilities increases to 2 X 0.168 = 0.336.
- 42 -

========== Begin Echo of Computer Session ==========

Choice of Next Action: -----

Enter:
(1) To perform another calculation of the same sort
(2) To change the setup for this type of problem
(3) To return to higher level menu
(4) To quit DSTPLAN
Select one of the above:
$?
2 # Change setup

Problem Initialization: -----

Enter 1 or 2 for 1- or 2-sided test:
$?
1 # 1-sided tests

Enter overall probability:

$?
0.9 # Overall probability

Parameter Specification: -----

Enter: 1: Above Median Pr - Overall Pr
2: Total Sample Size
3: Significance level
4: Power
Enter a "?" for the item to be calculated. Enter a "t" if a table of values
for this parameter is to be specified (only one "t" entry allowed). Enter
the numeric value of the parameter otherwise. Entering zeros for all items
skips the calculation and allows a choice of the next action.
$?
? 100 0.05 0.8 # Abv. Med. Pr. - Ov. Pr. ex. #2

***** Above and Below the Median *****

These calculations are for a one sided test.

Overall Probability ............... 0.900

Total Sample Size ....... 100.000

Significance level ...... 0.050

Power ................... 0.800

The Above Median Pr - Overall Pr is calculated to be 0.069

========== End Echo of Computer Session ==========

If the overall probability is 0.9, then the minimal detectable
difference decreases to 2 X 0.069 = 0.138.

FISHER'S EXACT

Comment

Fisher's exact test is less powerful than the chi-square test for
detecting a difference in binomial proportions. The chi-square test
approximates a test specifically designed to test for the difference
in proportions. Fisher's exact test, in contrast, conditions on the
marginal distributions of observations. Fisher's test inquires as to
the probability of the outcome observed or one more extreme within the
set of experiments in which the number of observations in each group
is the same as the current experiment and also in which the total
number of events is the same as in the current experiment. Experience
shows that the power of Fisher's test is less than that of the
chi-square.

The calculations provided here should be used only if Fisher's
test will be used to analyze the data or if the continuity correction
to the chi-square test will be used. The continuity correction
usually changes the significance level to correspond closely to that
of Fisher's test. The use of the two-sample binomial calculations is
recommended in most cases.

The Test

The null hypothesis is that the probability of an event in each
trial is the same in both of the groups.

The tests for which these calculations are performed are the
Fisher's exact test and the chi-square test with the continuity
correction.

SIDES: Both one- and two-sided alternatives are available.

Parameters Of The Test

Group 1 probability: The probability under the alternative
hypothesis of an event in each trial of group 1. If this probability
is to be calculated, it will be less than the probability for group 2.

Group 2 probability: The probability under the alternative
hypothesis of an event in each trial of group 2. If this probability
is to be calculated, it will be greater than the probability for group
1.

Number in each group: The number of individual trials performed
in each group.

Significance: The probability of falsely rejecting the null
hypothesis when it is true.
- 44 -

Power: The probability of correctly rejecting the null
hypothesis when the alternative is true.

Method

Reference: Cassagrande, JT, Pike, MC, and Smith, PG: ``An
Improved Approximate Formula for Calculating Sample Sizes for
Comparing Two Binomial Distributions,'' _Biometrics_ 34: pp. 483-486,
1978.

Examples

The calculations shown determine the sample size necessary to
detect a difference in probability of 0.1 for varying values of the
lower probability. As is well known, the sample size needed is
maximal when the two probabilities straddle 0.5 equally.

These examples are the same as those used for the two-sample
binomial. Note that the sample sizes required are appreciably greater
in the current calculations.

========== Begin Echo of Computer Session ==========

***** Fisher's exact - equal numbers each group *****
(method of Cassagrande, Pike and Smith)
WARNING - very conservative for two-sample binomial

Problem Initialization:-----

Enter 1 or 2 for 1- or 2-sided test:
$?
1 # 1-sided tests

Parameter Specification: -----

Enter: 1: Probability of an event in group 1
2: Probability of an event in group 2
3: Number in each group
4: Significance level
5: Power
Enter a '?' for the item to be calculated. Enter a 't' if a table of values
for this parameter is to be specified (only one 't' entry allowed). Enter
the numeric value of the parameter otherwise. Entering zeros for all items
skips the calculation and allows a choice of the next action.
$?
0.1 0.2 ? 0.05 0.8 # Eq. no. in each group ex. #1
- 45 -

***** Fisher's exact (equal numbers each group) *****

These calculations are for a one sided test.

Probability of an event in group 1 ...... 0.100

Probability of an event in group 2 ...... 0.200

Significance level ...................... 0.050

Power ................................... 0.800

The Number in each group is calculated to be 176.037
Press Return / Enter to continue:
$?
# Done seeing answer
Choice of Next Action: -----

Enter:
(1) To perform another calculation of the same sort
(2) To change the setup for this type of problem
(3) To return to higher level menu
(4) To quit DSTPLAN
Select one of the above:
$?
1 # Another calculation

Parameter Specification: -----

Enter: 1: Probability of an event in group 1
2: Probability of an event in group 2
3: Number in each group
4: Significance level
5: Power
Enter a '?' for the item to be calculated. Enter a 't' if a table of values
for this parameter is to be specified (only one 't' entry allowed). Enter
the numeric value of the parameter otherwise. Entering zeros for all items
skips the calculation and allows a choice of the next action.
$?
0.25 0.35 ? 0.05 0.8 # Eq. no. in each group ex. #2

***** Fisher's exact (equal numbers each group) *****

These calculations are for a one sided test.

Probability of an event in group 1 ...... 0.250

Probability of an event in group 2 ...... 0.350

Significance level ...................... 0.050

Power ................................... 0.800

The Number in each group is calculated to be 278.260
- 46 -

Press Return / Enter to continue:
$?
# Done seeing answer
Choice of Next Action: -----

Enter:
(1) To perform another calculation of the same sort
(2) To change the setup for this type of problem
(3) To return to higher level menu
(4) To quit DSTPLAN
Select one of the above:
$?
1 # Another calculation

Parameter Specification: -----

Enter: 1: Probability of an event in group 1
2: Probability of an event in group 2
3: Number in each group
4: Significance level
5: Power
Enter a '?' for the item to be calculated. Enter a 't' if a table of values
for this parameter is to be specified (only one 't' entry allowed). Enter
the numeric value of the parameter otherwise. Entering zeros for all items
skips the calculation and allows a choice of the next action.
$?
0.45 0.55 ? 0.05 0.8 # Eq. no. in each group ex. #3

***** Fisher's exact (equal numbers each group) *****

These calculations are for a one sided test.

Probability of an event in group 1 ...... 0.450

Probability of an event in group 2 ...... 0.550

Significance level ...................... 0.050

Power ................................... 0.800

The Number in each group is calculated to be 327.775

========== End Echo of Computer Session ==========

PROPORTION RESPONSE
CONSERVATIVE VS. EXPENSIVE TREATMENT

Explanation Of The Investigation

Most two-sample trials are designed to show that two groups,
treatments, etc., are different. This trial described here intended
to demonstrate that the two treatments are almost equally effective.
Identity of effectiveness cannot be demonstrated, so the most that can
be accomplished is to show that, with a large probability, the two
treatments do not differ much.

The paradigm for this type of demonstration is treatment for a
disease; response to the treatment is considered good. The outcome
measured is the proportion of patients that responds to each
treatment. The expensive treatment is also the current treatment; it
is desired to show that the response rate to a proposed conservative
treatment is not much less (worse) than that of the expensive
treatment.

The high price exacted by the expensive treatment is frequently
patient morbidity, although monetary cost is usually also involved.
The conservative treatment is less drastic than the expensive current
treatment, it produces less morbidity, and it usually has a smaller
dollar cost. However, the conservative treatment will be adopted only
if its response rate is not much worse than that of the current
regimen. An example of the two types of treatment involves breast
cancer and has received some public attention. The expensive
treatment is radical mastectomy, and the conservative alternative is a
lumpectomy plus radiation to local lymph nodes. The important problem
with the expensive treatment is disfigurement.

The calculated outcome of the trial will be a (one-sided)
confidence interval on the proportion of responders to the expensive
treatment minus the proportion of responders to the conservative
treatment. The degree of confidence to be used must be specified, and
it is a probability near one. Values of 0.9, 0.95, and 0.99 are
popular. The trial is designed to make this confidence interval
smaller than an amount specified as the critical difference. The
value of the critical difference varies with the particular
application, but it is a small number -- 0.1 is a popular value.

The same sort of calculation arises in cases in which it is
desired to have a small outcome probability. For example, a new and
less expensive manufacturing process is to be shown not to produce a
much greater defect rate than the current process. This routine can
be used in these cases by considering, for example, the proportion of
non-defective items rather than the proportion of defective items.

SIDES: The procedure is one-sided.
- 54 -

Parameters of the Procedure

Proportion of responders to the conservative treatment: The
assumed true proportion.

Proportion of responders to the expensive treatment: The assumed
true proportion.

Sample size of conservative group: The number of patients to be
given the conservative treatment.

Sample size of expensive group: The number of patients to be
given the expensive treatment.

Critical difference: The upper bound on the proportion of
responders to the expensive treatment minus the proportion of
responders to the conservative treatment.

Confidence level: The degree of confidence used to construct the
confidence interval on the difference in proportions.

Probability of demonstration: The probability that the
confidence limit constructed will be bounded by the critical
difference. This value is analogous to power, so 0.8 is a popular
value.

Equal sample size: If this option is chosen for the calculation,
the sample size required in both groups for the procedure to achieve
the specified probability of demonstration.

Method

The normal approximation to the binomial distribution is used.

Reference: Makuch, R. and Simon, R.: ``Sample Size Requirements
for Evaluating a Conservative Therapy,'' _Cancer Treatment Report_ 62:
pp. 1037-1040, 1978.

Examples

If both the conservative and expensive treatment produce a
response rate of 70%, how many patients must be in each group to
produce an 80% probability that a 95% confidence interval on the
difference is no larger than 0.1?

If in the same problem, the largest feasible sample size is 100
patients per group, what must the response rate for the conservative
treatment be?
- 55 -

========== Begin Echo of Computer Session ==========

***** Proportion response - conservative vs. expensive treatment *****
(normal approximation to the binomial)

Parameter Specification: -----

Enter: 1: Prop. response to conservative treatment
2: Prop. response to expensive treatment
3: Sample size of conservative group
4: Sample size of expensive group
5: Critical difference
6: Confidence level
7: Probability of demonstration
Enter a "?" for the item to be calculated. Entering "?"s in positions 3 and
4 will calculate equal sample sizes for both groups. Enter a "t" if a table
of values for this parameter is to be specified. Entering "t"s in positions
3 and 4 will allow a table of equal sample sizes. Enter the numeric value
of the parameter otherwise. Entering zeros for all items skips the
calculation.
$?
0.7 0.7 ? ? 0.1 0.95 0.8 # Proportion responders ex. #1

***** Proportion response - conservative vs. expensive *****

These calculations are for a one sided test.

Prop. response to conservative treatment ...... 0.700

Prop. response to expensive treatment ......... 0.700

Critical difference ........................... 0.100

Confidence level .............................. 0.950

Probability of demonstration .................. 0.800

The Equal sample size for both groups is calculated to be 259.667
Press Return / Enter to continue:
$?
# Done seeing answer
Choice of Next Action: -----

Enter:
(1) To perform another calculation of the same sort
(2) To return to higher level menu
(3) To quit DSTPLAN
Select one of the above:
$?
1 # Another calculation
- 56 -

Parameter Specification: -----

Enter: 1: Prop. response to conservative treatment
2: Prop. response to expensive treatment
3: Sample size of conservative group
4: Sample size of expensive group
5: Critical difference
6: Confidence level
7: Probability of demonstration
Enter a "?" for the item to be calculated. Entering "?"s in positions 3 and
4 will calculate equal sample sizes for both groups. Enter a "t" if a table
of values for this parameter is to be specified. Entering "t"s in positions
3 and 4 will allow a table of equal sample sizes. Enter the numeric value
of the parameter otherwise. Entering zeros for all items skips the
calculation.
$?
? 0.7 100 100 0.1 0.95 0.8 # Proportion responders ex. #2

***** Proportion response - conservative vs. expensive *****

These calculations are for a one sided test.

Prop. response to expensive treatment ...... 0.700

Sample size of conservative group .......... 100.000

Sample size of expensive group ............. 100.000

Critical difference ........................ 0.100

Confidence level ........................... 0.950

Probability of demonstration ............... 0.800

The Prop. response to conservative treatment is calculated to be 0.756

========== End Echo of Computer Session ==========

CASE-CONTROL

The Test

The effect of a purported risk factor on a rare disease is
studied by the following strategy. A number of cases (those who have
the disease) and controls (who don't have the disease) are examined
for the risk factor. The proportion of cases with the risk factor is
compared to the proportion of controls using the two by two chi-square
test. If the risk factor increases or decreases the probability of
having the disease, then these proportions should differ.

In practice, the number of cases studied is usually the same as
the number of controls. Furthermore, the controls are usually matched
to the cases in some fashion, e.g., age, sex, other known risk
factors. In spite of the matching of controls to cases, the analysis
is unpaired -- i.e., the proportion with the risk factor in the case
and control groups are compared; the number of pairs, in which the
case has the risk factor and the control doesn't have the risk factor,
do not enter into the test. If a matched analysis is planned, these
calculations shouldn't be used; use the matched pair calculations
instead.

The planning is performed in terms of two population parameters.
One is the frequency of the risk factor in the whole population to be
studied, and the other is the relative risk of the disease for those
with the risk factor as compared to those without the risk factor.
The frequency of the risk factor is the proportion of those who have
the risk factor in the total population. The relative risk is the
proportion of those who have the disease in the risk factor bearing
population divided by the proportion of those who have the disease in
the non risk factor bearing population. Using standard notation for
conditional probability, the frequency of the risk factor is:

F = P(R)

and the relative risk is:

RR = P(D|R)/P(D|no R)

For planning purposes, it is assumed that the proportion of those
with the risk factor in the non disease bearing population is the same
as the proportion of those with the risk factor in the total
population, i.e., the frequency. This is true assuming the null
hypothesis that the relative risk is 1. Even assuming that the null
hypothesis is false this approximation is good if the disease is rare,
say, occurring in less than 10% of the total population. Precisely,
the proportion of those with the risk factor in the non disease
bearing population is the frequency multiplied by the ratio of one
minus the proportion of those who have the disease in the risk factor
bearing population to one minus the proportion of those with the
disease in the total population. Symbolically:
- 68 -

P(R|no D) = z [1-P(D|R)]/[1-P(D)] * F

Should the proportion of those with the disease in the whole
population not be small, this proportion can be used to calculate the
two probabilities being compared and the two-sample binomial
calculations used.

SIDES: Both one- and two-sided alternatives are available.

Parameters Of The Test

Frequency of risk factor: The proportion of those who have the
risk factor in the entire population studied. In most cases, there is
an interval of frequencies that will yield the desired power for a
specified relative risk. The endpoints of the interval are printed by
DSTPLAN if the frequency is chosen for calculation.

Relative risk: The ratio of the probability of disease given the
risk factor to the probability of disease given no risk factor. If
the relative risk is chosen for calculation, two values will be
computed, one that is less than 1.0 and one that is greater than 1.0;
these values and values further from one are those that can be shown
to be different from 1.0 with the power specified. Should either risk
print as a negative number, it indicates that the value does not
exist.

Number of cases: The number of cases, i.e. those with the
disease, sampled from the population. Usually, the number of cases is
the same as the number of controls, i.e. those without the disease.

Number of controls: The number of controls, i.e. those without
the disease, sampled from the population. Usually, the number of
controls is the same as the number of cases, i.e. those with the
disease.

Significance: The probability of falsely rejecting the null
hypothesis when it is true.

Power: The probability of correctly rejecting the null
hypothesis when the alternative is true.

Equal number of cases and controls: When chosen for calculation,
computes the equal number of cases and controls needed to yield the
specified power.

Method

The formulae from the reference cited are used to obtain the
probabilities being compared. The normal approximation of the arcsin
transformation of the binomial distribution is used to compute power
(instead of the direct normal approximation of the reference).
- 69 -

The mathematical form of power as a function of frequency is
complicated. Hence a scan over frequency values from 0 to 1 in steps
of 0.0001 is performed in finding the interval of values yielding at
least the specified power. When the power crosses the desired level
between two scanned values, linear interpolation is used. Although
several examinations of power as a function of frequency seem to show
that the set of acceptable values is an interval on the real line,
this is not guaranteed. Consequently, the number of times that the
desired power value is crossed during the scan is counted. Should the
number be greater than two, the set of allowable values forms two or
more disjoint intervals. A warning message to this effect is then
printed.

Reference: Schlesselman, JJ.: ``Sample Size Requirements in
Cohort and Case-Control Studies of Disease,'' _American Journal of
Epidemiology_ 99(6): pp. 381-384, 1974.

Examples

The effect of heavy coffee consumption on heart disease is to be
investigated. A number of patients hospitalized with heart disease
and an equal number of controls matched by sex, age, and residence
will be studied. The proportion of heavy coffee consumption will be
compared for the two groups. A one-sided test (that coffee
consumption increases the risk of heart disease) will be used at a
significance level of 0.05.

If the population frequency of heavy coffee consumption is 0.3
and it is desired to have a power of 0.8 of detecting a relative risk
of 2, how many cases and controls must be in the study? For what
range of frequency of heavy coffee consumers in the population will
this study have the power of 0.8? If the study must be limited to 100
cases and 100 controls and if the frequency of heavy coffee
consumption is 0.3, what relative risk is detectable at a power of
0.8?

Suppose the study were investigating a factor that is supposed to be
protective against heart disease, such as the consumption of fish and fish
products. Perform the same calculations using a relative risk of one-half
instead of 2.0.

========== Begin Echo of Computer Session ==========

***** Case-control (arcsin approximation) *****

Problem Initialization: -----

Enter 1 or 2 for 1- or 2-sided test:
$?
1 # 1-sided tests
- 70 -

Parameter Specification: -----

Enter: 1: Frequency of risk factor
2: Relative risk
3: Number of cases
4: Number of controls
5: Significance
6: Power
Enter a "?" for the item to be calculated. Entering "?"s in positions 3 and
4 will calculate equal sample sizes for both groups. Enter a "t" if a table
of values for this parameter is to be specified. Entering "t"s in positions
3 and 4 will allow a table of equal sample sizes. Enter the numeric value
of the parameter otherwise. Entering zeros for all items skips the
calculation.
$?
0.3 2 ? ? 0.05 0.8 # Case-control ex. #1

***** Case-control (arcsin approximation) *****

These calculations are for a one sided test.

Frequency of risk factor ...... 0.300

Relative risk ................. 2.000

Significance .................. 0.050

Power ......................... 0.800

The Equal number of cases and controls is calculated to be 110.499
Choice of Next Action: -----

Enter:
(1) To perform another calculation of the same sort
(2) To change the setup for this type of problem
(3) To return to higher level menu
(4) To quit DSTPLAN
Select one of the above:
$?
1 # Another calculation
- 71 -

Parameter Specification: -----

Enter: 1: Frequency of risk factor
2: Relative risk
3: Number of cases
4: Number of controls
5: Significance
6: Power
Enter a "?" for the item to be calculated. Entering "?"s in positions 3 and
4 will calculate equal sample sizes for both groups. Enter a "t" if a table
of values for this parameter is to be specified. Entering "t"s in positions
3 and 4 will allow a table of equal sample sizes. Enter the numeric value
of the parameter otherwise. Entering zeros for all items skips the
calculation.
$?
? 2 111 111 0.05 0.8 # Case-control ex. #2

***** Case-control (arcsin approximation) *****

These calculations are for a one sided test.

Relative risk ........... 2.000

Number of cases ......... 111.000

Number of controls ...... 111.000

Significance ............ 0.050

Power ................... 0.800

The limits on the frequency interval are 0.296 and 0.543
Choice of Next Action: -----

Enter:
(1) To perform another calculation of the same sort
(2) To change the setup for this type of problem
(3) To return to higher level menu
(4) To quit DSTPLAN
Select one of the above:
$?
1 # Another calculation
- 72 -

Parameter Specification: -----

Enter: 1: Frequency of risk factor
2: Relative risk
3: Number of cases
4: Number of controls
5: Significance
6: Power
Enter a "?" for the item to be calculated. Entering "?"s in positions 3 and
4 will calculate equal sample sizes for both groups. Enter a "t" if a table
of values for this parameter is to be specified. Entering "t"s in positions
3 and 4 will allow a table of equal sample sizes. Enter the numeric value
of the parameter otherwise. Entering zeros for all items skips the
calculation.
$?
0.3 ? 100 100 0.05 0.8 # Case-control ex. #3

***** Case-control (arcsin approximation) *****

These calculations are for a one sided test.

Frequency of risk factor ...... 0.300

Number of cases ............... 100.000

Number of controls ............ 100.000

Significance .................. 0.050

Power ......................... 0.800

The relative risk less than 1 is 0.426,
greater than 1 is 2.070

Choice of Next Action: -----

Enter:
(1) To perform another calculation of the same sort
(2) To change the setup for this type of problem
(3) To return to higher level menu
(4) To quit DSTPLAN
Select one of the above:
$?
1 # Another calculation
- 73 -

Parameter Specification: -----

Enter: 1: Frequency of risk factor
2: Relative risk
3: Number of cases
4: Number of controls
5: Significance
6: Power
Enter a "?" for the item to be calculated. Entering "?"s in positions 3 and
4 will calculate equal sample sizes for both groups. Enter a "t" if a table
of values for this parameter is to be specified. Entering "t"s in positions
3 and 4 will allow a table of equal sample sizes. Enter the numeric value
of the parameter otherwise. Entering zeros for all items skips the
calculation.
$?
0.3 t ? ? 0.05 0.8 # Case-control ex. #4
You are specifing a list for values of Relative risk
The list currently contains 0 values.
The maximum number allowed is 20.

Enter (1) ADD values individually specified
(2) ADD values equally spaced between bounds
(3) ADD values as (2) with logarithmic spacing
(4) PRINT list
(5) DELETE a single element of list
(6) DELETE consecutive elements of list
(7) SORT list in ascending order and eliminate duplicate values
(8) QUIT
$?
1 # ADD values indiv. spec.
Enter the number of values that will be entered
$?
2 # The number of values
Enter 2 values
$?
2 0.5 # The 2 values
The list currently contains 2 values.
The maximum number allowed is 20.

Enter (1) ADD values individually specified
(2) ADD values equally spaced between bounds
(3) ADD values as (2) with logarithmic spacing
(4) PRINT list
(5) DELETE a single element of list
(6) DELETE consecutive elements of list
(7) SORT list in ascending order and eliminate duplicate values
(8) QUIT
$?
8 # QUIT
- 74 -

***** Case-control (arcsin approximation) *****

These calculations are for a one sided test.

Frequency of risk factor ...... 0.300

Significance .................. 0.050

Power ......................... 0.800

Equal number of
Relative risk cases and controls

2.000 110.499
0.500 144.819

Choice of Next Action: -----

Enter:
(1) To perform another calculation of the same sort
(2) To change the setup for this type of problem
(3) To return to higher level menu
(4) To quit DSTPLAN
Select one of the above:
$?
1 # Another calculation

Parameter Specification: -----

Enter: 1: Frequency of risk factor
2: Relative risk
3: Number of cases
4: Number of controls
5: Significance
6: Power
Enter a "?" for the item to be calculated. Entering "?"s in positions 3 and
4 will calculate equal sample sizes for both groups. Enter a "t" if a table
of values for this parameter is to be specified. Entering "t"s in positions
3 and 4 will allow a table of equal sample sizes. Enter the numeric value
of the parameter otherwise. Entering zeros for all items skips the
calculation.
$?
? t 145 145 0.05 0.8 # Case control example #5
You are specifing a list for values of Relative risk
The list currently contains 0 values.
The maximum number allowed is 20.
- 75 -

Enter (1) ADD values individually specified
(2) ADD values equally spaced between bounds
(3) ADD values as (2) with logarithmic spacing
(4) PRINT list
(5) DELETE a single element of list
(6) DELETE consecutive elements of list
(7) SORT list in ascending order and eliminate duplicate values
(8) QUIT
$?
1 # ADD values indiv. spec.
Enter the number of values that will be entered
$?
2 # The number of values
Enter 2 values
$?
2 0.5 # The 2 values
The list currently contains 2 values.
The maximum number allowed is 20.

Enter (1) ADD values individually specified
(2) ADD values equally spaced between bounds
(3) ADD values as (2) with logarithmic spacing
(4) PRINT list
(5) DELETE a single element of list
(6) DELETE consecutive elements of list
(7) SORT list in ascending order and eliminate duplicate values
(8) QUIT
$?
8 # QUIT

***** Case-control (arcsin approximation) *****

These calculations are for a one sided test.

Number of cases ......... 145.000

Number of controls ...... 145.000

Significance ............ 0.050

Power ................... 0.800

Lower limit on Upper limit on
Relative risk frequency interval frequency interval

2.000 0.176 0.700
0.500 0.300 0.824
- 76 -

Choice of Next Action: -----

Enter:
(1) To perform another calculation of the same sort
(2) To change the setup for this type of problem
(3) To return to higher level menu
(4) To quit DSTPLAN
Select one of the above:
$?
1 # Another calculation

Parameter Specification: -----

Enter: 1: Frequency of risk factor
2: Relative risk
3: Number of cases
4: Number of controls
5: Significance
6: Power
Enter a "?" for the item to be calculated. Entering "?"s in positions 3 and
4 will calculate equal sample sizes for both groups. Enter a "t" if a table
of values for this parameter is to be specified. Entering "t"s in positions
3 and 4 will allow a table of equal sample sizes. Enter the numeric value
of the parameter otherwise. Entering zeros for all items skips the
calculation.
$?
0.3 ? 100 100 0.05 0.8 # Case-control ex. #6 (#3)

***** Case-control (arcsin approximation) *****

These calculations are for a one sided test.

Frequency of risk factor ...... 0.300

Number of cases ............... 100.000

Number of controls ............ 100.000

Significance .................. 0.050

Power ......................... 0.800

The relative risk less than 1 is 0.426,
greater than 1 is 2.070

ONE-SAMPLE POISSON

The Test

The null hypothesis is that the rate at which events occur is a
specified value, Rs.

The test associated with these calculations is the exact test for
the one-sample Poisson distribution.

SIDES: Only a one-sided alternative is available.

Parameters Of The Test

Null hypothesis rate: This is the rate, Rs, of the number of
events per unit time according to the null hypothesis. This rate is
used to obtain the critical region of the test.

Alternative hypothesis rate: The rate, Ra, of the number of
events per unit time according to the alternative hypothesis. This
rate is used to calculate the power of the test.

Time: The amount of time the Poisson process is observed.

Significance: The probability of falsely rejecting the null
hypothesis when it is true.

Power: The probability of correctly rejecting the null
hypothesis when the alternative is true.

Units Of Time

The two rates and time must be entered with respect to the the
same time units, e.g., days, weeks, years, or totally arbitrary user
defined units. The time units should be chosen so that the rates are
reasonably sized numbers; in particular, the rates must be within the
range of numbers handled by DSTPLAN.

If Poisson distributed observations are being tested rather than
a Poisson process in time, then the rate is the mean of the
observation and the time is the number of such observations that are
taken.

In the Poisson approximation to the binomial distribution, the
mean of the Poisson distribution is the probability of an event
multiplied by the number of such events. Scaling, for example by
using the number of events per thousand trials, may be necessary in
this case.
- 88 -

Method

The critical region is calculated as the high or low number of
events (high if Ra is greater than Rs, low if Ra is less than Rs) such
that the probability of the number of events falling in the critical
region is less than or equal to the significance level and as close to
its value as possible. The power is calculated as the probability of
the number of events falling in the critical region if the alternative
hypothesis is correct.

Comments

The outcome of a trial is an integral number of events. The
critical region of a test is consequently bounded by an integer, so
there are only a fixed number of significance levels available and a
user-specified significance level is thus usually not exactly
attainable. DSTPLAN deals with this problem by choosing the critical
region as large as possible under the constraint that the specified
significance value may not be exceeded. This choice frequently causes
the significance level to be less than that specified. For similar
reasons, the power may be increased over that requested. To give the
user some insight, the critical values bounding the desired
significance level are printed with the associated significance and
power values whenever either value is changed from that requested.

The inability to exactly match requested significance levels is
the reason that two-sided tests are not considered in the one-sample
Poisson case. Generally, in two-sided tests, when the null hypothesis
is true, half of the probability of an outcome in the critical region
is in the top portion of this region and half in the bottom. Because
significance levels are not generally attained, this condition cannot
be exactly achieved in the one-sample binomial case. The user is
responsible for choosing the suitable approximation by considering the
two sides of the test separately.

Examples

A publisher wants to show that the error rate in a book is less
than one error per ten pages by a careful examination of 100 pages.
How low must the true error rate be in order to have an 80% chance of
demonstrating this using a one-sided test with significance level
0.05?

A drug is being tested for mutagenicity by administering it to a
cell culture and counting the resulting number of mutants. If the
spontaneous mutation rate is one per ten million cells and it is
desired to have an 80% chance of detecting a doubling of this rate to
two per ten million using a one-sided test with significance level
0.05, how many cells must be exposed? (Note: the raw numbers are
exceedingly small so we change units to one million cells; the rates
then become 0.1 and 0.2. The answer is also in units of millions of
cells.)
- 89 -

========== Begin Echo of Computer Session ==========

***** One-sample Poisson (exact method) *****

This routine does calculations only for one-sided tests

Problem Specification: -----

Enter: 1: Null hypothesis rate
2: Alternative hypothesis rate
3: Time of study
4: Significance level
5: Power
Enter a '?' for the item to be calculated. Enter a 't' if a table of values
for this parameter is to be specified (only one 't' entry allowed). Enter
the numeric value of the parameter otherwise. Entering zeros for all items
skips the calculation and allows a choice of the next action.
$?
0.1 ? 100 0.05 0.8 # One-sample Poisson ex. #1
Is the null hypothesis rate less than
the alternative hypothesis rate? (y/n)
$?
n # Null rate NOT < alt. rate

***** One-sample Poisson (exact method) *****

Null hypothesis rate ...... 0.100

Time of study ............. 100.000

Significance level ........ 0.050

Power ..................... 0.800

The Alternative hypothesis rate is calculated to be 0.031
The new significance level is 0.029 .
The new power is 0.800 .
Press Return / Enter to continue:
$?
# Done seeing answer

Bracketing values:
Critical value Significance Power

4.0 0.0293 0.8000
5.0 0.0671 0.9068

Choice of Next Action: -----
- 90 -

Enter:
(1) To perform another calculation of the same sort
(2) To return to higher level menu
(3) To quit DSTPLAN
Select one of the above:
$?
1 # Another calculation

Problem Specification: -----

Enter: 1: Null hypothesis rate
2: Alternative hypothesis rate
3: Time of study
4: Significance level
5: Power
Enter a '?' for the item to be calculated. Enter a 't' if a table of values
for this parameter is to be specified (only one 't' entry allowed). Enter
the numeric value of the parameter otherwise. Entering zeros for all items
skips the calculation and allows a choice of the next action.
$?
0.1 0.2 ? 0.05 0.8 # One-sample Poisson ex. #2

***** One-sample Poisson (exact method) *****

Null hypothesis rate ............. 0.100

Alternative hypothesis rate ...... 0.200

Significance level ............... 0.050

Power ............................ 0.800

The Time of study is calculated to be 90.625
The new significance level is 0.044 .
The new power is 0.800 .
Press Return / Enter to continue:
$?
# Done seeing answer

Bracketing values:
Critical value Significance Power

15.0 0.0435 0.8000
14.0 0.0770 0.8637

========== End Echo of Computer Session ==========

TWO-SAMPLE POISSON DISTRIBUTION

The Test

The null hypothesis is that the rate (number of events per unit
time) of two Poisson processes is the same.

The test associated with these calculations is the F test for
comparing two exponential distributions. That is, the mean time to an
event will be computed for each process by dividing the total time on
trial of the process by the number of events. The equality of the
means will be tested as exponential distributions.

SIDES: Both one- and two-sided alternatives are available.

Parameters Of The Test

Group 1 rate: The rate of the first process under the
alternative hypothesis. If this parameter is calculated, it will be
less than the group 2 rate.

Group 2 rate: The rate of the second process under the
alternative hypothesis. If this parameter is calculated, it will be
greater than the group 1 rate.

Time of observation of process 1: The amount of time that the
first process is observed during the trial.

Time of observation of process 2: The amount of time that the
second process is observed during the trial.

Significance: The probability of falsely rejecting the null
hypothesis when it is true.

Power: The probability of correctly rejecting the null
hypothesis when the alternative is true.

Observation time for equal numbers of events: The observation
time will be calculated for each process so that the expected number
of events for the two processes is the same, and so that the specified
power will be obtained. These times yield the shortest overall
observation time for the trial that will produce the desired power.

Equal observation times: Equal observation times for each
process that will yield the desired power.
- 92 -

Units of Time

The two rates and times must be entered with respect to the same
time units, e.g., days, weeks, years, or totally arbitrary user
defined units. The time units should be chosen so that the rates are
reasonably sized numbers; in particular, the rates must be within the
range of numbers handled by DSTPLAN.

If Poisson distributed observations are being tested rather than
Poisson processes in time, then the rates are the means of the
respective observations and the times are the respective number of
such observations that are taken.

In the Poisson approximation to the binomial distribution, the
mean of the Poisson distribution is the probability of an event
multiplied by the number of such events. Scaling, for example by
using the number of events per thousand trials, may be necessary in
this case.

Method

The observation time of each process is sufficient to produce an
expected number of events equal to the required number plus one-half.
The required number is calculated using the method described for the
two-sample exponential distribution.

Reference: Cox, DR.: ``Some Simple Approximate Tests for
Poisson Variates,'' _Biometrika_, 30: pp. 354-360, 1953.

Examples

A baker wants to show that his raisin bread contains more raisins
that does that of the competition by counting the number in 20 loaves
of his bread and 20 loaves of the competitor's bread. If the mean
number of raisins per loaf in his bread is 250, what must the mean
number be for the competition in order to show the difference with
probability 0.8 using a one-sided test with significance level 0.05?

A drug is tested for mutagenicity by administering it to a cell
culture and counting the number of mutants in that culture and a
control. The control mutation rate is known to be one per ten million
cells and it is desired to have an 80% chance of detecting a doubling
of this rate to two per ten million using a one-sided test with
significance level 0.05. If the same expected number of events are to
be obtained, how many cells must be in each of the exposed and control
cultures? If the two cultures are to be the same size, what must this
size be? (Note: the raw rates are exceedingly small, so the units are
changed to millions of cells; the rates then become 0.1 and 0.2. The
answers are also in millions of cells.)
- 93 -

========== Begin Echo of Computer Session ==========

***** Two-sample Poisson (Exact method) *****

Problem Initialization: -----

Enter 1 or 2 for 1- or 2-sided test:
$?
1 # 1-sided tests

Parameter Specification: -----

Enter: 1: Group 1 rate
2: Group 2 rate
3: Process 1 observation time
4: Process 2 observation time
5: Significance level
6: Power
Enter a '?' for the item to be calculated. Entering a '?' in positions 3
and 4 will calculate either equal observation times or observation times
for equal numbers of events in both groups. Enter a 't' if a table of
values for this parameter is to be specified (only one 't' entry allowed).
Enter the numeric value of the parameter otherwise. Entering zeros for all
items skips the calculation and allows a choice of the next action.
$?
? 250 20 20 0.05 0.8 # Two-sample Poisson ex. #1

***** Two-sample Poisson (Exact method) *****

These calculations are for a one sided test.

Group 2 rate .................... 250.000

Process 1 observation time ...... 20.000

Process 2 observation time ...... 20.000

Significance level .............. 0.050

Power ........................... 0.800

The Group 1 rate is calculated to be 237.720
Press Return / Enter to continue:
$?
# Done seeing answer
Choice of Next Action: -----
- 94 -

Enter:
(1) To perform another calculation of the same sort
(2) To change the setup for this type of problem
(3) To return to higher level menu
(4) To quit DSTPLAN
Select one of the above:
$?
1 # Another calculation

Parameter Specification: -----

Enter: 1: Group 1 rate
2: Group 2 rate
3: Process 1 observation time
4: Process 2 observation time
5: Significance level
6: Power
Enter a '?' for the item to be calculated. Entering a '?' in positions 3
and 4 will calculate either equal observation times or observation times
for equal numbers of events in both groups. Enter a 't' if a table of
values for this parameter is to be specified (only one 't' entry allowed).
Enter the numeric value of the parameter otherwise. Entering zeros for all
items skips the calculation and allows a choice of the next action.
$?
0.1 0.2 ? ? 0.05 0.8 # Two-sample Poisson ex. #2

Special Case: -----

Enter:
(1) To calculate equal observation times
(2) To calculate the observation times for equal number of events
$?
2 # Obs. times for eq. num. events

***** Two-sample Poisson (Exact method) *****

These calculations are for a one sided test.

Group 1 rate ............ 0.100

Group 2 rate ............ 0.200

Significance level ...... 0.050

Power ................... 0.800

The process 1 observation time is 266.528.
The process 2 observation time is 133.264 for equal numbers of events.

Press Return / Enter to continue:
$?
# Done seeing answer
Choice of Next Action: -----
- 95 -

Enter:
(1) To perform another calculation of the same sort
(2) To change the setup for this type of problem
(3) To return to higher level menu
(4) To quit DSTPLAN
Select one of the above:
$?
1 # Another calculation

Parameter Specification: -----

Enter: 1: Group 1 rate
2: Group 2 rate
3: Process 1 observation time
4: Process 2 observation time
5: Significance level
6: Power
Enter a '?' for the item to be calculated. Entering a '?' in positions 3
and 4 will calculate either equal observation times or observation times
for equal numbers of events in both groups. Enter a 't' if a table of
values for this parameter is to be specified (only one 't' entry allowed).
Enter the numeric value of the parameter otherwise. Entering zeros for all
items skips the calculation and allows a choice of the next action.
$?
0.1 0.2 ? ? 0.05 0.8 # Two-sample Poisson ex. #3

Special Case: -----

Enter:
(1) To calculate equal observation times
(2) To calculate the observation times for equal number of events
$?
1 # Eq. obs. times

***** Two-sample Poisson (Exact method) *****

These calculations are for a one sided test.

Group 1 rate ............ 0.100

Group 2 rate ............ 0.200

Significance level ...... 0.050

Power ................... 0.800

The Equal observation time for each group is calculated to be 195.684

========== End Echo of Computer Session ==========

ONE-SAMPLE CORRELATION

The Test

The null hypothesis is that the correlation coefficient between
two observed variables is a specified value, Cs.

The test associated with these calculations uses the approximate
normality of the transformed sample correlation coefficient (see
Method).

SIDES: Both one- and two-sided alternatives are available.

Parameters Of The Test

Null hypothesis correlation: This is the value, Cs, of the
correlation coefficient between the variables under the null
hypothesis. This value is used to determine the critical region.

Alternative hypothesis correlation: The value, Ca, of the
correlation coefficient between the variables under the alternative
hypothesis. This value is used to determine the power of the test.

Sample Size: The number of trials or observations in the single
sample.

Significance: The probability of falsely rejecting the null
hypothesis when it is true.

Power: The probability of correctly rejecting the null
hypothesis when the alternative is true.

Method

Uses the approximate normality of the transform, Z, of the
correlation coefficient, C:

Y = 0.5*LOG((1+C)/(1-C))

Z = Y - (3*Y+C)/(4*N)

where N is the sample size.

Reference: Kendall, MG and Stuart, A:@ _The Advanced Theory of
Statistics_, Harner Publishing Company, New York, NY. (1963). Volume
I, page 391, formula (16.81).
- 158 -

Comment

In the vast majority of cases the trial is designed to show that
the correlation is non-zero, i.e., there is an association between the
variables. In these cases, the null hypothesis value of the
correlation is zero.

A one-sided test is somewhat more common than a two-sided test
because the nature of the association, if any, is usually known a
priori. For example, more nutrition administered intravenously should
decrease weight loss in patients.

Examples

What true correlation produces an 80% chance of being
distinguished from zero using a one-sided test of a sample of size 10
with a 0.05 significance level? What are the corresponding true
correlations for sample sizes of 50 and 100?

How small must a true correlation be to have an 80% chance of
showing that it is less than 0.5 using a one-sided test with
significance level of 0.05 and a sample size of 50?

========== Begin Echo of Computer Session ==========

***** One-sample Correlation *****

Problem Initialization:-----

Enter 1 or 2 for 1- or 2-sided test:
$?
1 # 1-sided tests

Parameter Specification: -----

Enter: 1: Null hypothesis correlation
2: Alternative hypothesis correlation
3: Sample size
4: Significance level
5: Power
Enter a '?' for the item to be calculated. Enter a 't' if a table of values
for this parameter is to be specified (only one 't' entry allowed). Enter
the numeric value of the parameter otherwise. Entering zeros for all items
skips the calculation and allows a choice of the next action.
$?
0 ? t 0.05 0.8 # One-sample corr. coeff. ex. #1

Special Case: -----

Is the null hypothesis correlation less than
the alternative hypothesis correlation? (y/n)
$?
y # null corr. < alt. corr.
- 159 -

You are specifing a list for values of Sample size
The list currently contains 0 values.
The maximum number allowed is 20.

Enter (1) ADD values individually specified
(2) ADD values equally spaced between bounds
(3) ADD values as (2) with logarithmic spacing
(4) PRINT list
(5) DELETE a single element of list
(6) DELETE consecutive elements of list
(7) SORT list in ascending order and eliminate duplicate values
(8) QUIT
$?
1 # ADD values indiv. spec.
Enter the number of values that will be entered
$?
3 # The number of values
Enter 3 values
$?
10 50 100 # The 3 values
The list currently contains 3 values.
The maximum number allowed is 20.

Enter (1) ADD values individually specified
(2) ADD values equally spaced between bounds
(3) ADD values as (2) with logarithmic spacing
(4) PRINT list
(5) DELETE a single element of list
(6) DELETE consecutive elements of list
(7) SORT list in ascending order and eliminate duplicate values
(8) QUIT
$?
8 # QUIT

***** One-sample Correlation *****

These calculations are for a one sided test.

Null hypothesis correlation ...... 0.000

Significance level ............... 0.050

Power ............................ 0.800

Alternative
hypothesis
Sample size correlation

10.000 0.743
50.000 0.350
100.000 0.248

Press Return / Enter to continue:
$?
# Done seeing answer
Choice of Next Action: -----
- 160 -

Enter:
(1) To perform another calculation of the same sort
(2) To change the setup for this type of problem
(3) To return to higher level menu
(4) To quit DSTPLAN
Select one of the above:
$?
1 # Another calculation

Parameter Specification: -----

Enter: 1: Null hypothesis correlation
2: Alternative hypothesis correlation
3: Sample size
4: Significance level
5: Power
Enter a '?' for the item to be calculated. Enter a 't' if a table of values
for this parameter is to be specified (only one 't' entry allowed). Enter
the numeric value of the parameter otherwise. Entering zeros for all items
skips the calculation and allows a choice of the next action.
$?
0.5 ? 50 0.05 0.8 # One-sample corr. coeff. ex. #2

Special Case: -----

Is the null hypothesis correlation less than
the alternative hypothesis correlation? (y/n)
$?
n # null corr. < alt. corr.

***** One-sample Correlation *****

These calculations are for a one sided test.

Null hypothesis correlation ...... 0.500

Sample size ...................... 50.000

Significance level ............... 0.050

Power ............................ 0.800

The Alternative hypothesis correlation is calculated to be 0.181

========== End Echo of Computer Session ==========

Normal Power Calculations

Normal Distribution 1-Sample

Enter a "?" for the item to be calculated.
µ 0
 The Mean of the Distribution under the Null Hypothesis
µ a
 The Mean of the Distribution under the Alternative Hypothesis
Sigma
 The Standard Deviation of the Population
N
 The Sample Size
Significance Level
 The Significance Level of the test or Prob (reject null hypothesis (H 0 : µ=µ 0 ) given it is true)
Power
 The Power desired for the test or Prob (reject H 0 given that H a is true)
Number of Sides
 Specifies Alternative Hypothesis.
 One sided and µ a > µ 0 => H a : µ > µ 0
 One sided and µ a < µ 0 => H a : µ < µ 0
 Two sided => H a : µ not equal µ 0
1 Side

2 Sides

 

 

Publicado el 15/07/2011

Páginas de interés