The probabilities of Type I and Type II errors of the Student t test, as well as the Mann-Whitney-Wilcoxon test, are grossly inflated or deflated by violation of within-group and between-group independence of sample observations. A modified t formula with two correlation terms eliminated these changes for samples from normal distributions. The same formula applied to ranks replacing the initial scores eliminated changes resulting from both non-normality and nonindependence for various heavy-tailed distributions.