<s>
A	O
t-test	B-General_Concept
is	O
any	O
statistical	O
hypothesis	O
test	O
in	O
which	O
the	O
test	B-General_Concept
statistic	I-General_Concept
follows	O
a	O
Student	O
's	O
t-distribution	O
under	O
the	O
null	B-General_Concept
hypothesis	I-General_Concept
.	O
</s>
<s>
It	O
is	O
most	O
commonly	O
applied	O
when	O
the	O
test	B-General_Concept
statistic	I-General_Concept
would	O
follow	O
a	O
normal	O
distribution	O
if	O
the	O
value	O
of	O
a	O
scaling	O
term	O
in	O
the	O
test	B-General_Concept
statistic	I-General_Concept
were	O
known	O
(	O
typically	O
,	O
the	O
scaling	O
term	O
is	O
unknown	O
and	O
therefore	O
a	O
nuisance	O
parameter	O
)	O
.	O
</s>
<s>
When	O
the	O
scaling	O
term	O
is	O
estimated	O
based	O
on	O
the	O
data	O
,	O
the	O
test	B-General_Concept
statistic	I-General_Concept
—	O
under	O
certain	O
conditions	O
—	O
follows	O
a	O
Student	O
's	O
t	O
distribution	O
.	O
</s>
<s>
The	O
t-test	B-General_Concept
'	O
s	O
most	O
common	O
application	O
is	O
to	O
test	O
whether	O
the	O
means	O
of	O
two	O
populations	O
are	O
different	O
.	O
</s>
<s>
The	O
term	O
"	O
t-statistic	O
"	O
is	O
abbreviated	O
from	O
"	O
hypothesis	O
test	B-General_Concept
statistic	I-General_Concept
"	O
.	O
</s>
<s>
Hence	O
a	O
second	O
version	O
of	O
the	O
etymology	O
of	O
the	O
term	O
Student	O
is	O
that	O
Guinness	O
did	O
not	O
want	O
their	O
competitors	O
to	O
know	O
that	O
they	O
were	O
using	O
the	O
t-test	B-General_Concept
to	O
determine	O
the	O
quality	O
of	O
raw	O
material	O
(	O
see	O
Student	O
's	O
t-distribution	O
for	O
a	O
detailed	O
history	O
of	O
this	O
pseudonym	O
,	O
which	O
is	O
not	O
to	O
be	O
confused	O
with	O
the	O
literal	O
term	O
student	O
)	O
.	O
</s>
<s>
Although	O
it	O
was	O
William	O
Gosset	O
after	O
whom	O
the	O
term	O
"	O
Student	O
"	O
is	O
penned	O
,	O
it	O
was	O
actually	O
through	O
the	O
work	O
of	O
Ronald	O
Fisher	O
that	O
the	O
distribution	O
became	O
well	O
known	O
as	O
"	O
Student	O
's	O
distribution	O
"	O
and	O
"	O
Student	B-General_Concept
's	I-General_Concept
t-test	I-General_Concept
"	O
.	O
</s>
<s>
Gosset	O
devised	O
the	O
t-test	B-General_Concept
as	O
an	O
economical	O
way	O
to	O
monitor	O
the	O
quality	O
of	O
stout	O
.	O
</s>
<s>
The	O
t-test	B-General_Concept
work	O
was	O
submitted	O
to	O
and	O
accepted	O
in	O
the	O
journal	O
Biometrika	O
and	O
published	O
in	O
1908	O
.	O
</s>
<s>
The	O
most	O
frequently	O
used	O
t-tests	B-General_Concept
are	O
one-sample	O
and	O
two-sample	O
tests	O
:	O
</s>
<s>
A	O
one-sample	O
location	B-General_Concept
test	I-General_Concept
of	O
whether	O
the	O
mean	O
of	O
a	O
population	O
has	O
a	O
value	O
specified	O
in	O
a	O
null	B-General_Concept
hypothesis	I-General_Concept
.	O
</s>
<s>
A	O
two-sample	O
location	B-General_Concept
test	I-General_Concept
of	O
the	O
null	B-General_Concept
hypothesis	I-General_Concept
such	O
that	O
the	O
means	O
of	O
two	O
populations	O
are	O
equal	O
.	O
</s>
<s>
All	O
such	O
tests	O
are	O
usually	O
called	O
Student	B-General_Concept
's	I-General_Concept
t-tests	I-General_Concept
,	O
though	O
strictly	O
speaking	O
that	O
name	O
should	O
only	O
be	O
used	O
if	O
the	O
variances	O
of	O
the	O
two	O
populations	O
are	O
also	O
assumed	O
to	O
be	O
equal	O
;	O
the	O
form	O
of	O
the	O
test	O
used	O
when	O
this	O
assumption	O
is	O
dropped	O
is	O
sometimes	O
called	O
Welch	B-General_Concept
's	I-General_Concept
t-test	I-General_Concept
.	O
</s>
<s>
These	O
tests	O
are	O
often	O
referred	O
to	O
as	O
unpaired	O
or	O
independent	O
samples	O
t-tests	B-General_Concept
,	O
as	O
they	O
are	O
typically	O
applied	O
when	O
the	O
statistical	O
units	O
underlying	O
the	O
two	O
samples	O
being	O
compared	O
are	O
non-overlapping	O
.	O
</s>
<s>
Most	O
test	B-General_Concept
statistics	I-General_Concept
have	O
the	O
form	O
,	O
where	O
and	O
are	O
functions	O
of	O
the	O
data	O
.	O
</s>
<s>
where	O
is	O
the	O
sample	O
mean	O
from	O
a	O
sample	O
,	O
of	O
size	O
,	O
is	O
the	O
standard	B-General_Concept
error	I-General_Concept
of	O
the	O
mean	O
,	O
is	O
the	O
estimate	O
of	O
the	O
standard	B-General_Concept
deviation	I-General_Concept
of	O
the	O
population	O
,	O
and	O
is	O
the	O
population	O
mean	O
.	O
</s>
<s>
The	O
assumptions	O
underlying	O
a	O
t-test	B-General_Concept
in	O
the	O
simplest	O
form	O
above	O
are	O
that	O
:	O
</s>
<s>
In	O
the	O
t-test	B-General_Concept
comparing	O
the	O
means	O
of	O
two	O
independent	O
samples	O
,	O
the	O
following	O
assumptions	O
should	O
be	O
met	O
:	O
</s>
<s>
If	O
using	O
Student	O
's	O
original	O
definition	O
of	O
the	O
t-test	B-General_Concept
,	O
the	O
two	O
populations	O
being	O
compared	O
should	O
have	O
the	O
same	O
variance	O
(	O
testable	O
using	O
F-test	B-General_Concept
,	O
Levene	B-General_Concept
's	I-General_Concept
test	I-General_Concept
,	O
Bartlett	B-General_Concept
's	I-General_Concept
test	I-General_Concept
,	O
or	O
the	O
Brown	B-General_Concept
–	I-General_Concept
Forsythe	I-General_Concept
test	I-General_Concept
;	O
or	O
assessable	O
graphically	O
using	O
a	O
Q	B-Application
–	I-Application
Q	I-Application
plot	I-Application
)	O
.	O
</s>
<s>
If	O
the	O
sample	O
sizes	O
in	O
the	O
two	O
groups	O
being	O
compared	O
are	O
equal	O
,	O
Student	O
's	O
original	O
t-test	B-General_Concept
is	O
highly	O
robust	O
to	O
the	O
presence	O
of	O
unequal	O
variances	O
.	O
</s>
<s>
Welch	B-General_Concept
's	I-General_Concept
t-test	I-General_Concept
is	O
insensitive	O
to	O
equality	O
of	O
the	O
variances	O
regardless	O
of	O
whether	O
the	O
sample	O
sizes	O
are	O
similar	O
.	O
</s>
<s>
For	O
partially	O
paired	O
data	O
,	O
the	O
classical	O
independent	O
t-tests	B-General_Concept
may	O
give	O
invalid	O
results	O
as	O
the	O
test	B-General_Concept
statistic	I-General_Concept
might	O
not	O
follow	O
a	O
t	O
distribution	O
,	O
while	O
the	O
dependent	O
t-test	B-General_Concept
is	O
sub-optimal	O
as	O
it	O
discards	O
the	O
unpaired	O
data	O
.	O
</s>
<s>
Most	O
two-sample	B-General_Concept
t-tests	I-General_Concept
are	O
robust	O
to	O
all	O
but	O
large	O
deviations	O
from	O
the	O
assumptions	O
.	O
</s>
<s>
For	O
exactness	B-General_Concept
,	O
the	O
t-test	B-General_Concept
and	O
Z-test	B-General_Concept
require	O
normality	O
of	O
the	O
sample	O
means	O
,	O
and	O
the	O
t-test	B-General_Concept
additionally	O
requires	O
that	O
the	O
sample	O
variance	O
follows	O
a	O
scaled	O
χ	O
distribution	O
,	O
and	O
that	O
the	O
sample	O
mean	O
and	O
sample	O
variance	O
be	O
statistically	O
independent	O
.	O
</s>
<s>
However	O
,	O
if	O
the	O
sample	O
size	O
is	O
large	O
,	O
Slutsky	O
's	O
theorem	O
implies	O
that	O
the	O
distribution	O
of	O
the	O
sample	O
variance	O
has	O
little	O
effect	O
on	O
the	O
distribution	O
of	O
the	O
test	B-General_Concept
statistic	I-General_Concept
.	O
</s>
<s>
Two-sample	B-General_Concept
t-tests	I-General_Concept
for	O
a	O
difference	O
in	O
means	O
involve	O
independent	O
samples	O
(	O
unpaired	O
samples	O
)	O
or	O
paired	O
samples	O
.	O
</s>
<s>
Paired	B-General_Concept
t-tests	I-General_Concept
are	O
a	O
form	O
of	O
blocking	O
,	O
and	O
have	O
greater	O
power	B-General_Concept
(	O
probability	O
of	O
avoiding	O
a	O
type	O
II	O
error	O
,	O
also	O
known	O
as	O
a	O
false	O
negative	O
)	O
than	O
unpaired	O
tests	O
when	O
the	O
paired	O
units	O
are	O
similar	O
with	O
respect	O
to	O
"	O
noise	O
factors	O
"	O
(	O
see	O
confounder	O
)	O
that	O
are	O
independent	O
of	O
membership	O
in	O
the	O
two	O
groups	O
being	O
compared	O
.	O
</s>
<s>
In	O
a	O
different	O
context	O
,	O
paired	B-General_Concept
t-tests	I-General_Concept
can	O
be	O
used	O
to	O
reduce	O
the	O
effects	O
of	O
confounding	O
factors	O
in	O
an	O
observational	O
study	O
.	O
</s>
<s>
The	O
independent	O
samples	O
t-test	B-General_Concept
is	O
used	O
when	O
two	O
separate	O
sets	O
of	O
independent	O
and	O
identically	O
distributed	O
samples	O
are	O
obtained	O
,	O
and	O
one	O
variable	O
from	O
each	O
of	O
the	O
two	O
populations	O
is	O
compared	O
.	O
</s>
<s>
In	O
this	O
case	O
,	O
we	O
have	O
two	O
independent	O
samples	O
and	O
would	O
use	O
the	O
unpaired	O
form	O
of	O
the	O
t-test	B-General_Concept
.	O
</s>
<s>
Paired	B-General_Concept
samples	I-General_Concept
t-tests	I-General_Concept
typically	O
consist	O
of	O
a	O
sample	O
of	O
matched	O
pairs	O
of	O
similar	O
units	O
,	O
or	O
one	O
group	O
of	O
units	O
that	O
has	O
been	O
tested	O
twice	O
(	O
a	O
"	O
repeated	O
measures	O
"	O
t-test	B-General_Concept
)	O
.	O
</s>
<s>
A	O
typical	O
example	O
of	O
the	O
repeated	O
measures	O
t-test	B-General_Concept
would	O
be	O
where	O
subjects	O
are	O
tested	O
prior	O
to	O
a	O
treatment	O
,	O
say	O
for	O
high	O
blood	O
pressure	O
,	O
and	O
the	O
same	O
subjects	O
are	O
tested	O
again	O
after	O
treatment	O
with	O
a	O
blood-pressure-lowering	O
medication	O
.	O
</s>
<s>
That	O
way	O
the	O
correct	O
rejection	O
of	O
the	O
null	B-General_Concept
hypothesis	I-General_Concept
(	O
here	O
:	O
of	O
no	O
difference	O
made	O
by	O
the	O
treatment	O
)	O
can	O
become	O
much	O
more	O
likely	O
,	O
with	O
statistical	B-General_Concept
power	I-General_Concept
increasing	O
simply	O
because	O
the	O
random	O
interpatient	O
variation	O
has	O
now	O
been	O
eliminated	O
.	O
</s>
<s>
However	O
,	O
an	O
increase	O
of	O
statistical	B-General_Concept
power	I-General_Concept
comes	O
at	O
a	O
price	O
:	O
more	O
tests	O
are	O
required	O
,	O
each	O
subject	O
having	O
to	O
be	O
tested	O
twice	O
.	O
</s>
<s>
Because	O
half	O
of	O
the	O
sample	O
now	O
depends	O
on	O
the	O
other	O
half	O
,	O
the	O
paired	O
version	O
of	O
Student	B-General_Concept
's	I-General_Concept
t-test	I-General_Concept
has	O
only	O
degrees	O
of	O
freedom	O
(	O
with	O
being	O
the	O
total	O
number	O
of	O
observations	O
)	O
.	O
</s>
<s>
A	O
paired	B-General_Concept
samples	I-General_Concept
t-test	I-General_Concept
based	O
on	O
a	O
"	O
matched-pairs	O
sample	O
"	O
results	O
from	O
an	O
unpaired	O
sample	O
that	O
is	O
subsequently	O
used	O
to	O
form	O
a	O
paired	O
sample	O
,	O
by	O
using	O
additional	O
variables	O
that	O
were	O
measured	O
along	O
with	O
the	O
variable	O
of	O
interest	O
.	O
</s>
<s>
Paired	B-General_Concept
samples	I-General_Concept
t-tests	I-General_Concept
are	O
often	O
referred	O
to	O
as	O
"	O
dependent	O
samples	O
t-tests	B-General_Concept
"	O
.	O
</s>
<s>
Explicit	O
expressions	O
that	O
can	O
be	O
used	O
to	O
carry	O
out	O
various	O
t-tests	B-General_Concept
are	O
given	O
below	O
.	O
</s>
<s>
In	O
each	O
case	O
,	O
the	O
formula	O
for	O
a	O
test	B-General_Concept
statistic	I-General_Concept
that	O
either	O
exactly	O
follows	O
or	O
closely	O
approximates	O
a	O
t-distribution	O
under	O
the	O
null	B-General_Concept
hypothesis	I-General_Concept
is	O
given	O
.	O
</s>
<s>
Each	O
of	O
these	O
statistics	O
can	O
be	O
used	O
to	O
carry	O
out	O
either	O
a	O
one-tailed	B-General_Concept
or	I-General_Concept
two-tailed	I-General_Concept
test	I-General_Concept
.	O
</s>
<s>
Once	O
the	O
t	O
value	O
and	O
degrees	O
of	O
freedom	O
are	O
determined	O
,	O
a	O
p-value	B-General_Concept
can	O
be	O
found	O
using	O
a	O
table	O
of	O
values	O
from	O
Student	O
's	O
t-distribution	O
.	O
</s>
<s>
If	O
the	O
calculated	O
p-value	B-General_Concept
is	O
below	O
the	O
threshold	O
chosen	O
for	O
statistical	B-General_Concept
significance	I-General_Concept
(	O
usually	O
the	O
0.10	O
,	O
the	O
0.05	O
,	O
or	O
0.01	O
level	O
)	O
,	O
then	O
the	O
null	B-General_Concept
hypothesis	I-General_Concept
is	O
rejected	O
in	O
favor	O
of	O
the	O
alternative	O
hypothesis	O
.	O
</s>
<s>
where	O
is	O
the	O
sample	O
mean	O
,	O
is	O
the	O
sample	O
standard	B-General_Concept
deviation	I-General_Concept
and	O
is	O
the	O
sample	O
size	O
.	O
</s>
<s>
We	O
want	O
to	O
test	O
the	O
null	B-General_Concept
hypothesis	I-General_Concept
that	O
the	O
slope	O
is	O
equal	O
to	O
some	O
specified	O
value	O
(	O
often	O
taken	O
to	O
be	O
0	O
,	O
in	O
which	O
case	O
the	O
null	B-General_Concept
hypothesis	I-General_Concept
is	O
that	O
and	O
are	O
uncorrelated	O
)	O
.	O
</s>
<s>
has	O
a	O
t-distribution	O
with	O
degrees	O
of	O
freedom	O
if	O
the	O
null	B-General_Concept
hypothesis	I-General_Concept
is	O
true	O
.	O
</s>
<s>
The	O
standard	B-General_Concept
error	I-General_Concept
of	O
the	O
slope	O
coefficient	O
:	O
</s>
<s>
where	O
r	B-Language
is	O
the	O
Pearson	O
correlation	O
coefficient	O
.	O
</s>
<s>
Here	O
is	O
the	O
pooled	B-General_Concept
standard	I-General_Concept
deviation	I-General_Concept
for	O
and	O
and	O
are	O
the	O
unbiased	O
estimators	O
of	O
the	O
population	O
variance	O
.	O
</s>
<s>
The	O
denominator	O
of	O
is	O
the	O
standard	B-General_Concept
error	I-General_Concept
of	O
the	O
difference	O
between	O
two	O
means	O
.	O
</s>
<s>
is	O
the	O
pooled	B-General_Concept
standard	I-General_Concept
deviation	I-General_Concept
of	O
the	O
two	O
samples	O
:	O
it	O
is	O
defined	O
in	O
this	O
way	O
so	O
that	O
its	O
square	O
is	O
an	O
unbiased	O
estimator	O
of	O
the	O
common	O
variance	O
whether	O
or	O
not	O
the	O
population	O
means	O
are	O
the	O
same	O
.	O
</s>
<s>
This	O
test	O
,	O
also	O
known	O
as	O
Welch	B-General_Concept
's	I-General_Concept
t-test	I-General_Concept
,	O
is	O
used	O
only	O
when	O
the	O
two	O
population	O
variances	O
are	O
not	O
assumed	O
to	O
be	O
equal	O
(	O
the	O
two	O
sample	O
sizes	O
may	O
or	O
may	O
not	O
be	O
equal	O
)	O
and	O
hence	O
must	O
be	O
estimated	O
separately	O
.	O
</s>
<s>
is	O
not	O
a	O
pooled	B-General_Concept
variance	I-General_Concept
.	O
</s>
<s>
The	O
true	O
distribution	O
of	O
the	O
test	B-General_Concept
statistic	I-General_Concept
actually	O
depends	O
(	O
slightly	O
)	O
on	O
the	O
two	O
unknown	O
population	O
variances	O
(	O
see	O
Behrens	B-Algorithm
–	I-Algorithm
Fisher	I-Algorithm
problem	I-Algorithm
)	O
.	O
</s>
<s>
The	O
test	O
deals	O
with	O
the	O
famous	O
Behrens	B-Algorithm
–	I-Algorithm
Fisher	I-Algorithm
problem	I-Algorithm
,	O
i.e.	O
,	O
comparing	O
the	O
difference	O
between	O
the	O
means	O
of	O
two	O
normally	O
distributed	O
populations	O
when	O
the	O
variances	O
of	O
the	O
two	O
populations	O
are	O
not	O
assumed	O
to	O
be	O
equal	O
,	O
based	O
on	O
two	O
independent	O
samples	O
.	O
</s>
<s>
The	O
test	O
is	O
developed	O
as	O
an	O
exact	B-General_Concept
test	I-General_Concept
that	O
allows	O
for	O
unequal	O
sample	O
sizes	O
and	O
unequal	O
variances	O
of	O
two	O
populations	O
.	O
</s>
<s>
This	O
is	O
an	O
example	O
of	O
a	O
paired	B-General_Concept
difference	I-General_Concept
test	I-General_Concept
.	O
</s>
<s>
where	O
and	O
are	O
the	O
average	O
and	O
standard	B-General_Concept
deviation	I-General_Concept
of	O
the	O
differences	O
between	O
all	O
pairs	O
.	O
</s>
<s>
We	O
will	O
carry	O
out	O
tests	O
of	O
the	O
null	B-General_Concept
hypothesis	I-General_Concept
that	O
the	O
means	O
of	O
the	O
populations	O
from	O
which	O
the	O
two	O
samples	O
were	O
taken	O
are	O
equal	O
.	O
</s>
<s>
The	O
sample	O
standard	B-General_Concept
deviations	I-General_Concept
for	O
the	O
two	O
samples	O
are	O
approximately	O
0.05	O
and	O
0.11	O
,	O
respectively	O
.	O
</s>
<s>
Since	O
the	O
sample	O
sizes	O
are	O
equal	O
,	O
the	O
two	O
forms	O
of	O
the	O
two-sample	B-General_Concept
t-test	I-General_Concept
will	O
perform	O
similarly	O
in	O
this	O
example	O
.	O
</s>
<s>
The	O
test	B-General_Concept
statistic	I-General_Concept
is	O
approximately	O
1.959	O
,	O
which	O
gives	O
a	O
two-tailed	B-General_Concept
test	I-General_Concept
p-value	B-General_Concept
of	O
0.09077	O
.	O
</s>
<s>
The	O
test	B-General_Concept
statistic	I-General_Concept
is	O
approximately	O
equal	O
to	O
1.959	O
,	O
which	O
gives	O
a	O
two-tailed	O
p-value	B-General_Concept
of	O
0.07857	O
.	O
</s>
<s>
The	O
t-test	B-General_Concept
provides	O
an	O
exact	B-General_Concept
test	I-General_Concept
for	O
the	O
equality	O
of	O
the	O
means	O
of	O
two	O
i.i.d.	O
</s>
<s>
(	O
Welch	B-General_Concept
's	I-General_Concept
t-test	I-General_Concept
is	O
a	O
nearly	O
exact	B-General_Concept
test	I-General_Concept
for	O
the	O
case	O
where	O
the	O
data	O
are	O
normal	O
but	O
the	O
variances	O
may	O
differ	O
.	O
)	O
</s>
<s>
For	O
moderately	O
large	O
samples	O
and	O
a	O
one	O
tailed	O
test	O
,	O
the	O
t-test	B-General_Concept
is	O
relatively	O
robust	O
to	O
moderate	O
violations	O
of	O
the	O
normality	O
assumption	O
.	O
</s>
<s>
In	O
large	O
enough	O
samples	O
,	O
the	O
t-test	B-General_Concept
asymptotically	O
approaches	O
the	O
z-test	B-General_Concept
,	O
and	O
becomes	O
robust	O
even	O
to	O
large	O
deviations	O
from	O
normality	O
.	O
</s>
<s>
If	O
the	O
data	O
are	O
substantially	O
non-normal	O
and	O
the	O
sample	O
size	O
is	O
small	O
,	O
the	O
t-test	B-General_Concept
can	O
give	O
misleading	O
results	O
.	O
</s>
<s>
See	O
Location	B-General_Concept
test	I-General_Concept
for	I-General_Concept
Gaussian	I-General_Concept
scale	I-General_Concept
mixture	I-General_Concept
distributions	I-General_Concept
for	O
some	O
theory	O
related	O
to	O
one	O
particular	O
family	O
of	O
non-normal	O
distributions	O
.	O
</s>
<s>
When	O
the	O
normality	O
assumption	O
does	O
not	O
hold	O
,	O
a	O
non-parametric	B-General_Concept
alternative	O
to	O
the	O
t-test	B-General_Concept
may	O
have	O
better	O
statistical	B-General_Concept
power	I-General_Concept
.	O
</s>
<s>
However	O
,	O
when	O
data	O
are	O
non-normal	O
with	O
differing	O
variances	O
between	O
groups	O
,	O
a	O
t-test	B-General_Concept
may	O
have	O
better	O
type-1	O
error	O
control	O
than	O
some	O
non-parametric	B-General_Concept
alternatives	O
.	O
</s>
<s>
Furthermore	O
,	O
non-parametric	B-General_Concept
methods	I-General_Concept
,	O
such	O
as	O
the	O
Mann-Whitney	B-General_Concept
U	I-General_Concept
test	I-General_Concept
discussed	O
below	O
,	O
typically	O
do	O
not	O
test	O
for	O
a	O
difference	O
of	O
means	O
,	O
so	O
should	O
be	O
used	O
carefully	O
if	O
a	O
difference	O
of	O
means	O
is	O
of	O
primary	O
scientific	O
interest	O
.	O
</s>
<s>
For	O
example	O
,	O
Mann-Whitney	B-General_Concept
U	I-General_Concept
test	I-General_Concept
will	O
keep	O
the	O
type	O
1	O
error	O
at	O
the	O
desired	O
level	O
alpha	O
if	O
both	O
groups	O
have	O
the	O
same	O
distribution	O
.	O
</s>
<s>
It	O
will	O
also	O
have	O
power	B-General_Concept
in	O
detecting	O
an	O
alternative	O
by	O
which	O
group	O
B	O
has	O
the	O
same	O
distribution	O
as	O
A	O
but	O
after	O
some	O
shift	O
by	O
a	O
constant	O
(	O
in	O
which	O
case	O
there	O
would	O
indeed	O
be	O
a	O
difference	O
in	O
the	O
means	O
of	O
the	O
two	O
groups	O
)	O
.	O
</s>
<s>
However	O
,	O
there	O
could	O
be	O
cases	O
where	O
group	O
A	O
and	O
B	O
will	O
have	O
different	O
distributions	O
but	O
with	O
the	O
same	O
means	O
(	O
such	O
as	O
two	O
distributions	O
,	O
one	O
with	O
positive	O
skewness	B-General_Concept
and	O
the	O
other	O
with	O
a	O
negative	O
one	O
,	O
but	O
shifted	O
so	O
to	O
have	O
the	O
same	O
means	O
)	O
.	O
</s>
<s>
In	O
such	O
cases	O
,	O
MW	O
could	O
have	O
more	O
than	O
alpha	O
level	O
power	B-General_Concept
in	O
rejecting	O
the	O
Null	B-General_Concept
hypothesis	I-General_Concept
but	O
attributing	O
the	O
interpretation	O
of	O
difference	O
in	O
means	O
to	O
such	O
a	O
result	O
would	O
be	O
incorrect	O
.	O
</s>
<s>
In	O
the	O
presence	O
of	O
an	O
outlier	O
,	O
the	O
t-test	B-General_Concept
is	O
not	O
robust	O
.	O
</s>
<s>
For	O
example	O
,	O
for	O
two	O
independent	O
samples	O
when	O
the	O
data	O
distributions	O
are	O
asymmetric	O
(	O
that	O
is	O
,	O
the	O
distributions	O
are	O
skewed	B-General_Concept
)	O
or	O
the	O
distributions	O
have	O
large	O
tails	O
,	O
then	O
the	O
Wilcoxon	B-General_Concept
rank-sum	I-General_Concept
test	I-General_Concept
(	O
also	O
known	O
as	O
the	O
Mann	B-General_Concept
–	I-General_Concept
Whitney	I-General_Concept
U	I-General_Concept
test	I-General_Concept
)	O
can	O
have	O
three	O
to	O
four	O
times	O
higher	O
power	B-General_Concept
than	O
the	O
t-test	B-General_Concept
.	O
</s>
<s>
The	O
nonparametric	B-General_Concept
counterpart	O
to	O
the	O
paired	B-General_Concept
samples	I-General_Concept
t-test	I-General_Concept
is	O
the	O
Wilcoxon	B-General_Concept
signed-rank	I-General_Concept
test	I-General_Concept
for	O
paired	O
samples	O
.	O
</s>
<s>
For	O
a	O
discussion	O
on	O
choosing	O
between	O
the	O
t-test	B-General_Concept
and	O
nonparametric	B-General_Concept
alternatives	O
,	O
see	O
Lumley	O
,	O
et	O
al	O
.	O
</s>
<s>
One-way	O
analysis	B-General_Concept
of	I-General_Concept
variance	I-General_Concept
(	O
ANOVA	B-General_Concept
)	O
generalizes	O
the	O
two-sample	B-General_Concept
t-test	I-General_Concept
when	O
the	O
data	O
belong	O
to	O
more	O
than	O
two	O
groups	O
.	O
</s>
<s>
Alternatively	O
making	O
use	O
of	O
all	O
of	O
the	O
available	O
data	O
,	O
assuming	O
normality	O
and	O
MCAR	O
,	O
the	O
generalized	O
partially	O
overlapping	O
samples	O
t-test	B-General_Concept
could	O
be	O
used	O
.	O
</s>
<s>
A	O
generalization	O
of	O
Student	O
's	O
t	O
statistic	O
,	O
called	O
Hotelling	B-General_Concept
's	I-General_Concept
t-squared	I-General_Concept
statistic	I-General_Concept
,	O
allows	O
for	O
the	O
testing	O
of	O
hypotheses	O
on	O
multiple	O
(	O
often	O
correlated	O
)	O
measures	O
within	O
the	O
same	O
sample	O
.	O
</s>
<s>
Because	O
measures	O
of	O
this	O
type	O
are	O
usually	O
positively	O
correlated	O
,	O
it	O
is	O
not	O
advisable	O
to	O
conduct	O
separate	O
univariate	O
t-tests	B-General_Concept
to	O
test	O
hypotheses	O
,	O
as	O
these	O
would	O
neglect	O
the	O
covariance	O
among	O
measures	O
and	O
inflate	O
the	O
chance	O
of	O
falsely	O
rejecting	O
at	O
least	O
one	O
hypothesis	O
(	O
Type	O
I	O
error	O
)	O
.	O
</s>
<s>
Usually	O
,	O
T	O
is	O
converted	O
instead	O
to	O
an	O
F	B-General_Concept
statistic	I-General_Concept
.	O
</s>
<s>
The	O
test	B-General_Concept
statistic	I-General_Concept
is	O
Hotelling	O
's	O
t	O
:	O
</s>
<s>
The	O
test	B-General_Concept
statistic	I-General_Concept
is	O
Hotelling	O
's	O
two-sample	O
t	O
:	O
</s>
<s>
The	O
two-sample	B-General_Concept
t-test	I-General_Concept
is	O
a	O
special	O
case	O
of	O
simple	O
linear	B-General_Concept
regression	I-General_Concept
as	O
illustrated	O
by	O
the	O
following	O
example	O
.	O
</s>
<s>
Data	O
and	O
code	O
are	O
given	O
for	O
the	O
analysis	O
using	O
the	O
R	B-Language
programming	I-Language
language	I-Language
with	O
the	O
t.test	O
and	O
lmfunctions	O
for	O
the	O
t-test	B-General_Concept
and	O
linear	B-General_Concept
regression	I-General_Concept
.	O
</s>
<s>
Here	O
are	O
the	O
(	O
fictitious	O
)	O
data	O
generated	O
in	O
R	B-Language
.	O
</s>
<s>
Perform	O
the	O
t-test	B-General_Concept
.	O
</s>
<s>
Notice	O
that	O
the	O
assumption	O
of	O
equal	O
variance	O
,	O
var.equal	O
=	O
T	O
,	O
is	O
required	O
to	O
make	O
the	O
analysis	O
exactly	O
equivalent	O
to	O
simple	O
linear	B-General_Concept
regression	I-General_Concept
.	O
</s>
<s>
Running	O
the	O
R	B-Language
code	I-Language
gives	O
the	O
following	O
results	O
.	O
</s>
<s>
Perform	O
a	O
linear	B-General_Concept
regression	I-General_Concept
of	O
the	O
same	O
data	O
.	O
</s>
<s>
Calculations	O
may	O
be	O
performed	O
using	O
the	O
R	B-Language
function	O
lm( )	O
for	O
a	O
linear	O
model	O
.	O
</s>
<s>
The	O
linear	B-General_Concept
regression	I-General_Concept
provides	O
a	O
table	O
of	O
coefficients	O
and	O
p-values	B-General_Concept
.	O
</s>
<s>
The	O
p-value	B-General_Concept
that	O
the	O
slope	O
of	O
4	O
is	O
different	O
from	O
0	O
is	O
p	O
=	O
0.00805	O
.	O
</s>
<s>
The	O
coefficients	O
for	O
the	O
linear	B-General_Concept
regression	I-General_Concept
specify	O
the	O
slope	O
and	O
intercept	O
of	O
the	O
line	O
that	O
joins	O
the	O
two	O
group	O
means	O
,	O
as	O
illustrated	O
in	O
the	O
graph	O
.	O
</s>
<s>
Compare	O
the	O
result	O
from	O
the	O
linear	B-General_Concept
regression	I-General_Concept
to	O
the	O
result	O
from	O
the	O
t-test	B-General_Concept
.	O
</s>
<s>
From	O
the	O
t-test	B-General_Concept
,	O
the	O
difference	O
between	O
the	O
group	O
means	O
is	O
6-2	O
=	O
4	O
.	O
</s>
<s>
The	O
t-test	B-General_Concept
p-value	B-General_Concept
for	O
the	O
difference	O
in	O
means	O
,	O
and	O
the	O
regression	O
p-value	B-General_Concept
for	O
the	O
slope	O
,	O
are	O
both	O
0.00805	O
.	O
</s>
<s>
This	O
example	O
shows	O
that	O
,	O
for	O
the	O
special	O
case	O
of	O
a	O
simple	O
linear	B-General_Concept
regression	I-General_Concept
where	O
there	O
is	O
a	O
single	O
x-variable	O
that	O
has	O
values	O
0	O
and	O
1	O
,	O
the	O
t-test	B-General_Concept
gives	O
the	O
same	O
results	O
as	O
the	O
linear	B-General_Concept
regression	I-General_Concept
.	O
</s>
<s>
Recognizing	O
this	O
relationship	O
between	O
the	O
t-test	B-General_Concept
and	O
linear	B-General_Concept
regression	I-General_Concept
facilitates	O
the	O
use	O
of	O
multiple	O
linear	B-General_Concept
regression	I-General_Concept
and	O
multi-way	O
analysis	B-General_Concept
of	I-General_Concept
variance	I-General_Concept
.	O
</s>
<s>
These	O
alternatives	O
to	O
t-tests	B-General_Concept
allow	O
for	O
the	O
inclusion	O
of	O
additional	O
explanatory	O
variables	O
that	O
are	O
associated	O
with	O
the	O
response	O
.	O
</s>
<s>
Including	O
such	O
additional	O
explanatory	O
variables	O
using	O
regression	O
or	O
anova	B-General_Concept
reduces	O
the	O
otherwise	O
unexplained	O
variance	O
,	O
and	O
commonly	O
yields	O
greater	O
power	B-General_Concept
to	O
detect	O
differences	O
than	O
do	O
two-sample	B-General_Concept
t-tests	I-General_Concept
.	O
</s>
<s>
Many	O
spreadsheet	B-Application
programs	I-Application
and	O
statistics	O
packages	O
,	O
such	O
as	O
QtiPlot	B-Language
,	O
LibreOffice	B-Operating_System
Calc	I-Operating_System
,	O
Microsoft	B-Application
Excel	I-Application
,	O
SAS	B-Language
,	O
SPSS	B-Algorithm
,	O
Stata	B-Algorithm
,	O
DAP	B-Application
,	O
gretl	B-Application
,	O
R	B-Language
,	O
Python	B-Language
,	O
PSPP	B-Language
,	O
MATLAB	B-Language
and	O
Minitab	B-Application
,	O
include	O
implementations	O
of	O
Student	B-General_Concept
's	I-General_Concept
t-test	I-General_Concept
.	O
</s>
