WOLFRAM|DEMONSTRATIONS PROJECT

Comparing Two Means Using Independent Samples of Unknown Variance

​
hypotheses:
H
0
:
μ
1
-
μ
2
≤
D
0
H
a
:
μ
1
-
μ
2
>
D
0
H
0
:
μ
1
-
μ
2
≥
D
0
H
a
:
μ
1
-
μ
2
<
D
0
H
0
:
μ
1
-
μ
2
=
D
0
H
a
:
μ
1
-
μ
2
≠
D
0
variance(s):
unequal
equal (pooled)
level of significance, α
0.05
size of first sample,
n
1
30
size of second sample,
n
2
30
first sample mean,
X
1
100
second sample mean,
X
2
100
hypothesized difference,
D
0
0
standard deviation of first sample,
s
1
10
standard deviation of second sample,
s
2
10
This Demonstration illustrates the hypotheses testing of the means of two independent populations with unknown variances, based on independent samples. These are the parameters used in this example:
μ
1
=
(unknown) mean of the first population
μ
2
=
(unknown) mean of the second population
D
0
=
hypothesized difference between the two population means
α=
level of significance
n
1
=
size of the first sample
n
2
=
size of the second sample

X
1
=
mean of the first sample

X
2
=
mean of the second sample
s
1
=
standard deviation of the first sample
s
2
=
standard deviation of the second sample
You can alter all of these parameters, except for the population means that are being tested, using the provided sliders. Using the tabs, you can also test all three types of hypotheses (right-tailed, left-tailed and two-tailed) and assume that the unknown population variances are unequal or equal. This Demonstration dynamically shows the results of the hypothesis testing, with the red vertical line representing the calculated
t
-value, and the area in the appropriate tail representing the
p
-value. The black line represents the critical value, and the associated area in the appropriate tail is the level of significance. If the calculated value is more extreme (further along the appropriate tail) than the critical value, the conclusion of "reject
H
0
" is provided at the top of the graph (otherwise, if the calculated value is more toward the center compared to the critical value, the text "fail to reject
H
0
" appears).