The t Test - University of Arizona
The t Test
April 3-8, 2008
Again, we begin with independent normal observations X1. . . . , Xn with unknown mean ? and unknown variance 2. The likelihood function
L(?, 2|x)
=
1 (22)n/2
1 exp - 22
n
(xi - ?)2
i=1
Thus, ?^ = x?.
ln
L(?, 2|x)
=
n - (ln
2
2
+
ln
2)
-
1 22
n
(xi - ?)2
i=1
?
ln
L(?,
2|x)
=
-
1 2
n
(xi - ?)
i=1
Thus, For the hypothesis
2
ln L(?, 2|x)
=
n - 22
+
1 2(2)2
n
(xi - ?)2.
i=1
^2 = 1 n
n
(xi - x?)2.
i=1
H0 : ? = ?0 versus H1 : ? = ?0,
the likelihood ratio test
(x)
=
L(?0, ^02|x) L(?^, ^2|x)
where the value
^02
=
1 n
n
(xi - ?0)2
i=1
gives the maximum likelihood on the set ? = ?0.
L(?0, ^02|x)
=
1 (2^02)n/2
1 exp - 2^02
n
(xi
i=1
-
?0)2
=
1 (2^02)n/2
2 exp - ,
n
1
L(?^, ^2|x))
=
1 (2^2)n/2
1 exp - 2^2
n
(xi - x?)2
=
1
2
(2^2)n/2 , exp - n ,
i=1
and
^2 n/2
(x) = ^02
=
The critical region )x) 0 is equivalent to
ni=1(xi - ?0)2 -n/2 ni=1(xi - x?)2
c
ni=1(xi - ?0)2 ni=1(xi - x?)2
=
1+
n(x? - ?0)2
n i=1
(xi
-
x?)2
or T (x)2 (c - 1)(n - 1)
where
T (x) = x? -?0 s/ n
and we write s for the square root of the unbiased estimator of the variance
s2 = 1 n-1
n
(xi - x?)2.
i=1
1 Deriving the t distribution
For the hypothesis test, our next goal is to understand the distribution of T (X).
Step 1. n(X? - ?0)/ is a standard normal random variable.
For
this,
notice
that
X?
is
a
normal
random
variable
with
mean
?0
and
standard
deviation
/ n
Step 2. For each i, Xi - X? and X? are independent.
For normal random variables, uncorrelated random variables are independent. Thus, it suffices to show that the covariance is 0. To that end, note that
Cov(Xi - X? , X? ) = Cov(Xi, X? ) - Cov(X? , X? ).
For the first term, use the fact that Cov(X1, Xj) = 0 if i = j and Cov(X1, Xi) = Var(Xi) = 2. Then,
Cov(Xi, X? )
=
1 n
n
Cov(Xi, Xj)
=
1 2. n
j=1
From Step 1, we know that
Cov(X? , X? ) = Var(X? ) = 1 2. n
Now combine to see that Cov(Xi - X? , X? ) = 0.
Step 3. ni=1(Xi - X? )2/2 is a -square random variable with n - 1 degrees of freedom.
2
Let Zi = (Xi - ?)/ and Z? be the average of the Zi. Then Zi are independent standard normal random
variables.
1 2
n
(Xi - X? )2 =
n
(Zi - Z?)2 =
n
Zi2 - nZ?2
i=1
i=1
i=1
or
n
n
Zi2 = (Zi - Z?)2 + nZ?2.
i=1
i=1
Let's write this
Y = U + V.
By step 2, the sum is of independent random variables. So, if we use the properties of moment generating functions
MY (r) = MU (r) ? MV (r).
Now Y is a 2n random variable. So, MY (r) = (1 - 2r)-n/2. V is a 21 random variable. So, MY (r) = (1 - 2r)1/2. Consequently,
MU (r)
=
MY (r) MV (r)
=
(1 - 2r)-n/2 (1 - 2r)-1/2
=
(1 - 2r)-(n-1)/2
and U is a 2n-1 random variable. In summary, we can write
Z T=
U/(n - 1)
where Z is a standard random variable, U is a 2n-1 random variable, and Z and U are independent. Consequently, their densities are
fZ (z)
=
1 e-z2/2 2
and
fU (u)
=
un/2-3/2 2(n-1)/2((n -
e-u/2. 1)/2)
Step 4. Finding the density of T , fT (t). Z and U have joint density
fZ,U (z, u)
=
1 e-z2/2
un/2-3/2
e-u/2.
2
2(n-1)/2((n - 1)/2)
Define the one to one transformation t=
z and v = u.
u/(n - 1)
Then, the inverse transformation
z = t v and u = v.
n-1
3
the joint density
tv
fT ,V
(t,
v)
=
fZ,U
(
n
-
1
,
v)|J
(t,
v)|.
where |J(z, u)| is the absolute value of the Jacobian of the inverse transformation. In this case,
J(t, v) = det
z/t z/v u/t u/v
= det
v/ n - 1 t/(2 v(n - 1)
0
1
= v .
n-1
Then,
fT,V (t, v)
=
1
22(n-1)/2((n
vn/2-3/2 exp - 1)/2)
v -
2
t2 1+
n-1
v
n-1
Finally, to find the marginal density for T , we integrate with respect to v to obtain
1
fT (t)
=
22(n-1)/2((n
-
1)/2) n
-
1
vn/2-1 exp
0
v -
2
t2 1+
n-1
dv.
Change variables by setting w = v(1 + t2/(n - 1))/2.
fT (t)
=
1
22(n-1)/2((n - 1)/2) n - 1 0
2w 1 + t2/(n - 1)
n/2-1
e-w
2 1 + t2/(n - 1)
dw
=
1
t2 1+
-n/2
wn/2-1e-w dw
(n - 1)((n - 1)/2)
n-1
0
(n/2)
t2
-n/2
=
1+
.
(n - 1)((n - 1)/2)
n-1
Note that
t2 -n/2
t2
1+
exp -
n-1
2
and n . Thus, for large n, the t density is very close to the density of a standard normal.
2 Tests and confidence intervals using t distribution
We can now return to our original hypothesis. The critical region for an alpha level test is determined by the extreme values of the t statistic.
C = {x; |T (x)| t/2}
where
P {T
> t/2} =
. 2
Correspondingly, the -level confidence interval is obtained by choosing = 1 - and setting
s
x?
?
n
t/2.
4
For a one-sided hypothesis the critical region becomes
H0 : ? ?0 versus H1 : ? ?0, C = {x; T (x) t}
3 Two sample t test
We now have a three dimensional parameter space = {(?1, ?2, 2); ?1 R, ?2 R, 2 R}.. The two-sided test is H0 : ?1 = ?2 versus H1 : ?1 = ?2,
The data X1,j, . . . , Xnj,j are independent N (?j, 2) random variables, j = 1, 2. The likelihood function is
L(?1, ?2, 2|x1, x2)
=
1 (22)(n1+n2)/2
1 exp - 22
n1
n2
(xi,1 - ?1)2 + (xi,2 - ?2)2 .
i=1
i=1
Then, the likelihood ratio,
(x1, x2))
=
L(?^, ?^, ^122|x1, x2) L(?^1, ?^2, ^2|x1, x2)
Write the unbiased estimators for the mean and the variance
1 nj
x?j
=
nj
xi,j
i=1
and
s2j
=
1 nj -
1
nj
(xi,j
i=1
- x?j)2,
j = 1, 2.
Then, the overall maximum likelihood estimators are
?^1 = x?1
?^2 = x?2,
^2 = (n1 - 1)s21 + (n2 - 1)s22 . n1 + n2
The maximum likelihood estimators in the numerator takes place on the set ?1 = ?2.
?^ = n1x?1 + n2x?2 , n1 + n2
^122
=
n1
1 +
n2
n1
n2
(xi,1 - ?^)2 + (xi,2 - ?^)2
i=1
i=1
.
The yields the test statistic
T (x1, x2) =
x?1 - x?2
1 n1
+
1 n2
(n1 -1)s21 +(n2 -1)s22 n1 +n2 -2
from the fact that the likelihood ratio
(x1, x2) =
n1 + n2 - 2 n1 + n2 - 2 + T (x1, x2)2
2/(n1 +n2 )
.
5
................
................
In order to avoid copyright disputes, this page is only a partial summary.
To fulfill the demand for quickly locating and searching documents.
It is intelligent file search solution for home and business.
Related download
- chapter 9 matched pairs or dependent t test university of new mexico
- t test nist
- the t test university of arizona
- understanding the dependent t test northern arizona university
- understanding the independent samples t test northern arizona university
- t test formula summary sheet peggy s website
- tests one sample two independent sample and or related samples
- ap statistics college board
- correcting two sample z and t tests for correlation an ed
- t tests part 1 copyright © 2000 2014 2016 j toby mordkoff
Related searches
- university of arizona salaries
- university of arizona salary list
- university of arizona salary 2018
- university of arizona financial
- university of arizona address tucson
- university of arizona admissions status
- university of arizona application 2020
- university of arizona arthritis center
- university of arizona rheumatology
- university of arizona body donation
- university of arizona employment
- university of arizona salary grades