Statistical considerations for clinical trials
and scientific experiments

Find sample size, power or the minimal detectable difference for parallel studies, crossover studies, or studies to find associations between variables, where the dependent variable is Success or Failure, a Quantitative Measurement, or a time to an event such as a survival time.

Note: The power calculation uses the non-central t function, pt(x,df,ncen), and it's inverse qt
Power=pt(qt(.025,n-2,0),n-2,-(delta/sigma)/sqrt(4/n)), power is truncated rather than rounded.
If power is specified the other parameters are found by searching.


Definitions

Sample size:
The number of patients or experimental units required for the trial.
Power:
The probability that a clinical trial will have a significant(positive) result, that is have a p-value of less than the specified significance level(usually 5%). This probability is computed under the assumption that the treatment difference or strength of association equals the minimal detectable difference.
Minimal detectable difference:
The smallest difference between the treatments or strength of association that you wish to be able to detect. In clinical trials this is the smallest difference that you believe would be clinically important and biologically plausible. In a study of association it is the smallest change in the dependent(outcome variable, response), per unit change in the independent(input variable, covariate) that is plausible.
Parallel design:
A parallel designed clinical trial compares the results of a treatment on two separate groups of patients. The sample size calculated for a parallel design can be used for any study where two groups are being compared.
Crossover study:
A crossover study compares the results of a two treatment on the same group of patients. The sample size calculated for a crossover study can also be used for a study that compares the value of a variable after treatment with it's value before treatment. The standard deviation of the outcome variable is expressed as either the within patient standard deviation or the standard deviation of the difference. The former is the standard deviation of repeated observations in the same individual and the latter is the standard deviation of the difference between two measurements in the same individual.
Study to find an association:
A study to find an association determines if a variable, the dependent variable, is affected by another, the independent variable. For instance, a study to determine whether blood pressure is affected by salt intake.
Success/Failure:
The outcome of the study is a variable with two values, usually treatment success or treatment failure.
Measurement:
The outcome of the study is a continuous measurement.
Time to an Event:
The outcome of the study is a time, such as the time to death, or relapse. Some patients will not have been observed to relapse. These observations are said to be censored.