Difference between two independent means (two groups)

The two-sample t test is used to determine if two population means μ1 and μ2 are equal. The two samples of size n1 and n2 come from two independent and normally distributed populations. The true standard deviations in the two populations are unknown and must be estimated from the data. The null and alternative hypotheses of this t test are:
H0 : μ1 - μ2 = 0
H1 : μ1 - μ2 = c, c ≠ 0.
The two-sided ("two tails") test should be used if there is no restriction on the sign of the deviation assumed in the alternative hypothesis. Otherwise you should use the one-sided ("one tail") test .

Effect size index

The effect size index d is defined as:
d = (μ1 - μ2)/σ
Cohen (1969, p. 38) defined the following conventional values for d:
small d = 0.2
medium d = 0.5
large d = 0.8
Pressing the Determine button on the left side of the effect size label opens the effect size drawer. You can use this drawer to calculate d from the means and standard deviations in the two populations.

t means difference between independent means effect size drawer.png


The t test assumes the variances in both populations to be equal. However, the test is relatively robust against violations of this assumption if the sample sizes are equal (n1 = n2). In this case a mean σ' may be used as the common within-population σ (Cohen, 1969, p.42):
σ' = √((σ12 + σ22)/2)
where σ12 and σ22 are the variances in populations 1 and 2, respectively. This is the formula used by G*Power  when you select the n1 = n2 option in the effect size drawer.

In the case of substantially different sample sizes the n1 = n2 option should not be used because it may lead to power values that differ greatly from the true values (Cohen, 1969, p.42).

If you have unequal sample sizes and unequal variances in the populations from which the samples were or are to be drawn, then it is very reasonable to bring the samples to equal sizes.

Options

This test has no options.

Examples

We have done a study in which the sizes of our two groups are not equal. In Group A we have 20 subjects, in Group B we have 40. Given that we want to detect "large" effects according to Cohen's conventions (i.e., d = 0.8), what is the power of the t test comparing the means of both groups?

Select

Type of power analysis: Post hoc

Input

Tail(s): Two
Effect size d: 0.8
α err prob: 0.05
Sample size group  1: 20
Sample size group  2: 40

Output

Noncentrality parameter δ: 2.921187
Critical t: 2.001717
df: 58
Power (1-β err prob): 0.819257
What if we had equal sample sizes in both groups? Given n1 = n2 = 30 we arrive at a power (1-β err prob) of 0.861423.

Related tests

Means: Difference between two dependent means (matched pairs)
Means: Difference from constant (one-sample case)

Implementation notes

The H0 distribution is the central Student t distribution t(N − 2, 0). The H1 distribution is the noncentral Student t distribution t(N − 2, δ), with N = n1 + n2 and noncentrality parameter δ = d√((n1 · n2 )/(n1 + n2 )).

Validation

The results were checked against the values produced by GPower 2.0.

References

Cohen, J. (1969). Statistical power analysis for the behavioral sciences. New York, NY: Academic Press.
    Freitag, 10. 02. 2012


gpicon-128.png

Questions about this website? Contact

Axel Buchner


Letzte Änderung: 12.05.2009, 14:56
Seitenende