





Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!






Math 541: Statistical Theory II
Instructor: Songfeng Zheng
It is quite common to compare the properties of two distributions, for example, we would
like to see which distribution has a higher mean, or which distribution has a higher variance,
etc. This note describes how to conduct hypothesis testing regarding the mean and variance
when the two distributions under consideration are normal.
Let us consider a problem in which random samples are available from two normal distribu-
tions. The problem is to determine whether the means of the two distributions are equal.
Specifically, we assume that the random variables X 1
m
form a random sample of size
m from a normal distribution for which both the mean μ 1
and the variance σ
2
1
are unknown;
and that the variables Y 1
n
form another independent random sample of size n from
another normal distribution for which both the mean μ 2
and variance σ
2
2
are unknown. In
this section, we will discuss several frequently seen cases.
2
1
2
2
2
We shall assume at this moment that the variance σ
2
1
= σ
2
2
= σ
2 is the same for both
distributions, even though the exact values are unknown.
Suppose it is desired to test the following hypotheses at a specified level of significance α
(0 < α < 1):
0
: μ 1
= μ 2
vs. H a
: μ 1
= μ 2
Intuitively, it makes sense to reject H 0
if
m
n
is very different from zero, where
m
and
n
are the means of the two samples, respectively. In spirit of the t test, we define
2
X
m ∑
i=
i
m
2
and S
2
Y
n ∑
j=
j
n
2
Then the test statistic we shall use is
(m + n − 2)
1 / 2
(
Xm −
Yn)
(
1
m
1
n
) 1 / 2
2
X
2
Y
1 / 2
Next, let us derive the distribution of T.
For each pair of values μ 1 and μ 2 , and for each σ
2
, the sample mean
Xm has a normal
distribution with mean μ 1
and variance σ
2 /m, i.e.
m
∼ N (μ 1
, σ
2 /m)
similarly
n
∼ N (μ 2
, σ
2
/n)
because both samples are from normal distribution. Furthermore,
m
and
n
are indepen-
dent. It follows that the difference
m
n
has a normal distribution with mean μ 1
− μ 2
and variance [(1/m) + (1/n)]σ
2 , i.e.,
m
n
(
μ 1
− μ 2
, [(1/m) + (1/n)]σ
2
)
Therefore, when the null hypothesis is true, i.e. μ 1
= μ 2
, the following random variable Z
will have a standard normal distribution:
Xm −
Yn
(
1
m
1
n
) 1 / 2
σ
Also, for all values of μ 1
, μ 2
, and σ
2 , the random variable S
2
X
/σ
2 has a χ
2 distribution with
m − 1 degrees of freedom, and S
2
Y
/σ
2 has a χ
2 distribution with n − 1 degrees of freedom,
and the two random variables are independent. By the additive property of χ
2 distribution,
the following random variable W has a χ
2
distribution with m + n − 2 degrees of freedom:
2
X
σ
2
2
Y
σ
2
2
X
2
Y
σ
2
∼ χ
2
m+n− 2
Furthermore, the four random variables
m
n
2
X
, and S
2
Y
are independent. This is
because: (i)
m
and S
2
X
are functions of X 1
m
; while
n
and S
2
Y
are functions
of Y 1
n
; and we know that X 1
m
and Y 1
n
are independent. Therefore
m
2
X
} and {
n
2
Y
} are independent. (ii) By the property of sample mean and sample
variance,
Xm and S
2
X
are independent, and
Yn and S
2
Y
are independent.
It follows that Z are W are independent. When the null hypothesis is true, i.e. μ 1
= μ 2
Z ∼ N (0, 1), and W ∼ χ
2
m+n− 2
. By the definition of t-distribution, we have the following
(m + n − 2)
1 / 2
(
m
n
(
1
m
1
n
) 1 / 2
2
X
2
Y
1 / 2
¯ Xm−
¯ Yn
1
m
1
n
1 / 2
σ
[
(S
2
X
+S
2
Y
)/σ
2
m+n− 2
] 1 / 2
[W/(m + n − 2)]
1 / 2
∼ t m+n− 2
Thus, to test the hypotheses
0
: μ 1
= μ 2
vs. H a
: μ 1
= μ 2
Let us find out the distribution of T
′ when the null hypothesis is true.
Similar as before,
m
n
∼ N (μ 1
− μ 2
, σ
2
1
/m + σ
2
2
/n) = N (μ 1
− μ 2
, [(1/m) + (k/n)]σ
2
1
Therefore, when the null hypothesis is true, i.e. μ 1
= μ 2
, the following random variable Z
will have a standard normal distribution:
m
n
(
1
m
k
n
) 1 / 2
σ 1
Also, the random variable S
2
X
/σ
2
1
has a χ
2 distribution with m − 1 degrees of freedom, and
2
Y
/σ
2
2
has a χ
2
distribution with n − 1 degrees of freedom, and the two random variables
are independent. By the additive property of χ
2 distribution, the following random variable
W has a χ
2
distribution with m + n − 2 degrees of freedom:
2
X
σ
2
1
2
Y
σ
2
2
2
X
2
Y
/k
σ
2
1
∼ χ
2
m+n− 2
Z and W are independent due to the same reason as before. By the definition of t-
distribution, we have
′
=
(m + n − 2)
1 / 2 (
m
n
(
1
m
k
n
) 1 / 2
2
X
S
2
Y
k
1 / 2
¯ Xm−
¯ Yn
1
m
k
n
1 / 2
σ 1
[
(S
2
X
+S
2
Y
/k)/σ
2
1
m+n− 2
] 1 / 2
[W/(m + n − 2)]
1 / 2
∼ t m+n− 2
As we can see, if k = 1, the statistic T
′ will reduce to T. After we figure out the test statistic
′
and the null distribution, we can design a testing procedure as before.
0
1
2
a
1
2
In the above, we only checked the two means are equal or not. We can generalize the above
discussion a step further, i.e. to test
H 0 : μ 1 − μ 2 = λ vs. Ha : μ 1 − μ 2 6 = λ
where −∞ < λ < ∞ is a constant. As we can see, if λ = 0, this test reduces to the test we
discussed above.
To test these hypotheses, similar to the above discussion, when the variances of the two
normal distributions are equal, we can define the test statistic as
(m + n − 2)
1 / 2
(
Xm −
Yn − λ)
(
1
m
1
n
) 1 / 2
2
X
2
Y
1 / 2
Similarly, it can be shown that when the null hypothesis H 0
is true, T ∼ t m+n− 2
. We can
make our decision based on the value of the test statistic and the null distribution t m+n− 2
When the variances of the two normal distributions are not equal, but their relation is known
as σ
2
2
= kσ
2
1
, we can define the test statistic as
′
=
(m + n − 2)
1 / 2
(
Xm −
Yn − λ)
(
1
m
k
n
) 1 / 2
2
X
S
2
Y
k
1 / 2
It can be shown that when the null hypothesis H 0 is true, T
′
∼ tm+n− 2. We can make our
decision based on the value of the test statistic and the null distribution t m+n− 2
Similarly, we can define the test procedure for the one-sided hypotheses.
1
2
As we studied before, the confidence intervals and the hypothesis testing process are equiv-
alent. Therefore, from the testing process, we can construct the 1 − α confidence intervals
for the difference of means of two normal distributions.
Firstly, under the case, σ
2
1
= σ
2
2
, the 1 − α confidence interval for μ 1
− μ 2
is
m
n
) ± t
(
α
, m + n − 2
)
√
2
X
2
Y
m + n − 2
√
m
n
Indeed, in this case
h(X 1
m
1
n
, μ 1
, μ 2
(m + n − 2)
1 / 2
[(
m
n
) − (μ 1
− μ 2
(
1
m
1
n
) 1 / 2
2
X
2
Y
1 / 2
is the pivot to construct the confidence interval.
Similarly, under the case, σ
2
2
= kσ
2
1
, the 1 − α confidence interval for μ 1
− μ 2
is
m
n
) ± t
(
α
, m + n − 2
)
√
2
X
2
Y
/k
m + n − 2
√
m
k
n
and, in this case
h(X 1
m
1
n
, μ 1
, μ 2
(m + n − 2)
1 / 2 [(
m
n
) − (μ 1
− μ 2
(
1
m
k
n
) 1 / 2
2
X
2
Y
/k)
1 / 2
is the pivot to construct the confidence interval.
Now let us go back to the problem of comparing the variances of the two normal distributions
proposed at the beginning of this section. Suppose that finally the following hypotheses are
to be tested at given level of significance α,
0
: σ
2
1
= σ
2
2
vs. H a
: σ
2
1
= σ
2
2
As in the previous section, we define
2
X
m ∑
i=
i
m
2
and S
2
Y
n ∑
j=
j
n
2
.
As proved before, S
2
X
/(m − 1) and S
2
Y
/(n − 1) are unbiased estimators of σ
2
1
and σ
2
2
, respec-
tively. Intuitively, it makes sense that if the null hypothesis was true, the ratio
2
X
/(m − 1)
2
Y
/(n − 1)
should be close to 1. Therefore, we would reject the null hypothesis if the test statistic V is
too small or too big.
Under the null hypothesis, σ
2
1
= σ
2
2
2
X
/(m − 1)
2
Y
/(n − 1)
2
X
/σ
2
1
]/(m − 1)
2
Y
/σ
2
2
]/(n − 1)
It is well-known that
2
X
σ
2
1
∼ χ
2
m− 1
and
2
Y
σ
2
2
∼ χ
2
n− 1
by the definition of F distribution, V ∼ F (m − 1 , n − 1).
By our intuitive decision rule, we would reject H 0
either V ≤ c 1
or V ≥ c 2
, where c 1
and c 2
are two constants such that P (V ≤ c 1
) + P (V ≥ c 2
) = α. The most convenient
choice of c 1 and c 2 is the one that makes P (V ≤ c 1 ) = P (V ≥ c 2 ) = α/2. That is,
choose c 1
= F (α/ 2 , m − 1 , n − 1), the α/2 percentile of F (m − 1 , n − 1), and choose c 2
F (1 − α/ 2 , m − 1 , n − 1), the 1 − α/2 percentile of F (m − 1 , n − 1).
This procedure can also be generalized to test the hypotheses
0
: σ
2
1
= rσ
2
2
vs. H a
: σ
2
1
= rσ
2
2
where r is a positive constant, and we notice that when r = 1 this will be reduced to the
previous case. Under this new null hypothesis, the value of V would be close to r, therefore,
V /r would be close to 1. Let us have a close look at the statistic V /r:
r
2
X
/(m − 1)
rS
2
Y
/(n − 1)
[
S
2
X
σ
2
1
]
/(m − 1)
r
[
S
2
Y
σ
2
1
]
/(n − 1)
2
X
/σ
2
1
]/(m − 1)
2
Y
/σ
2
2
]/(n − 1)
It follows that the statistic V /r ∼ F (m − 1 , n − 1) for the same reason as above.
With the test statistic V /r and the sampling distribution of the statistic under H 0 , we
would reject the null hypothesis at the significant level α if V /r ≤ c 1
or V /r ≥ c 2
, with
c 1
= F (α/ 2 , m − 1 , n − 1) and c 2
= F (1 − α/ 2 , m − 1 , n − 1).
Now, let us consider the one-sided hypotheses
0
: σ
2
1
≤ σ
2
2
vs. H a
: σ
2
1
σ
2
2
As before, we use the ratio
2
X
/(m − 1)
2
Y
/(n − 1)
Since S
2
X
/(m − 1) and S
2
Y
/(n − 1) are unbiased estimators of σ
2
1
and σ
2
2
, respectively. The
data evidence prefers H a
if the ratio V is significantly big. Given a significant level α,
we would reject the null hypothesis H 0
if V > c where c is a constant, and we choose
c = F (1 − α, m − 1 , n − 1).
2
1
2
2
As we studied before, the confidence intervals and the hypothesis testing process are equiv-
alent. Therefore, from the testing process, we can construct the 1 − α confidence intervals
for the ratio of variances of two normal distributions.
Let r = σ
2
1
/σ
2
2
, then equivalently, we are looking for a 1 − α confidence intervals for r. As
proved in last subsection, we know V /r ∼ F (m − 1 , n − 1), therefore we can design the pivot
as
h(X 1
m
1
n
, r) =
r
2
X
/(m − 1)
rS
2
Y
/(n − 1)
∼ F (m − 1 , n − 1).
Choose c 1
= F (α/ 2 , m − 1 , n − 1) and c 2
= F (1 − α/ 2 , m − 1 , n − 1), then
P (c 1
≤ V /r ≤ c 2
) = 1 − α,
from which we can obtain the desired confidence interval as
F (1 − α/ 2 , m − 1 , n − 1)
σ
2
1
σ
2
2
F (α/ 2 , m − 1 , n − 1)
Exercise 1. Assume that the random variables X 1
m
form a random sample of size m
from a normal distribution for which the mean μ 1 is unknown and the variance σ
2
1
is known;