<s>
The	O
Bayes	B-General_Concept
factor	I-General_Concept
is	O
a	O
ratio	O
of	O
two	O
competing	O
statistical	O
models	O
represented	O
by	O
their	O
evidence	O
,	O
and	O
is	O
used	O
to	O
quantify	O
the	O
support	O
for	O
one	O
model	O
over	O
the	O
other	O
.	O
</s>
<s>
The	O
models	O
in	O
questions	O
can	O
have	O
a	O
common	O
set	O
of	O
parameters	O
,	O
such	O
as	O
a	O
null	B-General_Concept
hypothesis	I-General_Concept
and	O
an	O
alternative	O
,	O
but	O
this	O
is	O
not	O
necessary	O
;	O
for	O
instance	O
,	O
it	O
could	O
also	O
be	O
a	O
non-linear	O
model	O
compared	O
to	O
its	O
linear	B-Algorithm
approximation	I-Algorithm
.	O
</s>
<s>
The	O
Bayes	B-General_Concept
factor	I-General_Concept
can	O
be	O
thought	O
of	O
as	O
a	O
Bayesian	O
analog	O
to	O
the	O
likelihood-ratio	B-General_Concept
test	I-General_Concept
,	O
but	O
since	O
it	O
uses	O
the	O
(	O
integrated	O
)	O
marginal	O
likelihood	O
rather	O
than	O
the	O
maximized	O
likelihood	O
,	O
both	O
tests	O
only	O
coincide	O
under	O
simple	O
hypotheses	O
(	O
e.g.	O
,	O
two	O
specific	O
parameter	O
values	O
)	O
.	O
</s>
<s>
Also	O
,	O
in	O
contrast	O
with	O
null	B-General_Concept
hypothesis	I-General_Concept
significance	O
testing	O
,	O
Bayes	B-General_Concept
factors	I-General_Concept
support	O
evaluation	O
of	O
evidence	O
in	O
favor	O
of	O
a	O
null	B-General_Concept
hypothesis	I-General_Concept
,	O
rather	O
than	O
only	O
allowing	O
the	O
null	O
to	O
be	O
rejected	O
or	O
not	O
rejected	O
.	O
</s>
<s>
Although	O
conceptually	O
simple	O
,	O
the	O
computation	O
of	O
the	O
Bayes	B-General_Concept
factor	I-General_Concept
can	O
be	O
challenging	O
depending	O
on	O
the	O
complexity	O
of	O
the	O
model	O
and	O
the	O
hypotheses	O
.	O
</s>
<s>
Since	O
closed-form	O
expressions	O
of	O
the	O
marginal	O
likelihood	O
are	O
generally	O
not	O
available	O
,	O
numerical	O
approximations	O
based	O
on	O
MCMC	B-General_Concept
samples	I-General_Concept
have	O
been	O
suggested	O
.	O
</s>
<s>
For	O
certain	O
special	O
cases	O
,	O
simplified	O
algebraic	O
expressions	O
can	O
be	O
derived	O
;	O
for	O
instance	O
,	O
the	O
Savage	B-General_Concept
–	I-General_Concept
Dickey	I-General_Concept
density	I-General_Concept
ratio	I-General_Concept
in	O
the	O
case	O
of	O
a	O
precise	O
(	O
equality	O
constrained	O
)	O
hypothesis	O
against	O
an	O
unrestricted	O
alternative	O
.	O
</s>
<s>
Another	O
approximation	O
,	O
derived	O
by	O
applying	O
Laplace	B-General_Concept
's	I-General_Concept
approximation	I-General_Concept
to	O
the	O
integrated	O
likelihoods	O
,	O
is	O
known	O
as	O
the	O
Bayesian	B-General_Concept
information	I-General_Concept
criterion	I-General_Concept
(	O
BIC	B-General_Concept
)	O
;	O
in	O
large	O
data	O
sets	O
the	O
Bayes	B-General_Concept
factor	I-General_Concept
will	O
approach	O
the	O
BIC	B-General_Concept
as	O
the	O
influence	O
of	O
the	O
priors	O
wanes	O
.	O
</s>
<s>
In	O
small	O
data	O
sets	O
,	O
priors	O
generally	O
matter	O
and	O
must	O
not	O
be	O
improper	O
since	O
the	O
Bayes	B-General_Concept
factor	I-General_Concept
will	O
be	O
undefined	O
if	O
either	O
of	O
the	O
two	O
integrals	O
in	O
its	O
ratio	O
is	O
not	O
finite	O
.	O
</s>
<s>
The	O
Bayes	B-General_Concept
factor	I-General_Concept
is	O
the	O
ratio	O
of	O
two	O
marginal	O
likelihoods	O
;	O
that	O
is	O
,	O
the	O
likelihoods	O
of	O
two	O
statistical	O
models	O
integrated	O
over	O
the	O
prior	O
probabilities	O
of	O
their	O
parameters	O
.	O
</s>
<s>
The	O
key	O
data-dependent	O
term	O
represents	O
the	O
probability	O
that	O
some	O
data	O
are	O
produced	O
under	O
the	O
assumption	O
of	O
the	O
model	O
M	O
;	O
evaluating	O
it	O
correctly	O
is	O
the	O
key	O
to	O
Bayesian	B-General_Concept
model	I-General_Concept
comparison	I-General_Concept
.	O
</s>
<s>
When	O
the	O
two	O
models	O
have	O
equal	O
prior	O
probability	O
,	O
so	O
that	O
,	O
the	O
Bayes	B-General_Concept
factor	I-General_Concept
is	O
equal	O
to	O
the	O
ratio	O
of	O
the	O
posterior	O
probabilities	O
of	O
M1	O
and	O
M2	O
.	O
</s>
<s>
If	O
instead	O
of	O
the	O
Bayes	B-General_Concept
factor	I-General_Concept
integral	O
,	O
the	O
likelihood	O
corresponding	O
to	O
the	O
maximum	O
likelihood	O
estimate	O
of	O
the	O
parameter	O
for	O
each	O
statistical	O
model	O
is	O
used	O
,	O
then	O
the	O
test	O
becomes	O
a	O
classical	O
likelihood-ratio	B-General_Concept
test	I-General_Concept
.	O
</s>
<s>
Unlike	O
a	O
likelihood-ratio	B-General_Concept
test	I-General_Concept
,	O
this	O
Bayesian	B-General_Concept
model	I-General_Concept
comparison	I-General_Concept
does	O
not	O
depend	O
on	O
any	O
single	O
set	O
of	O
parameters	O
,	O
as	O
it	O
integrates	O
over	O
all	O
parameters	O
in	O
each	O
model	O
(	O
with	O
respect	O
to	O
the	O
respective	O
priors	O
)	O
.	O
</s>
<s>
However	O
,	O
an	O
advantage	O
of	O
the	O
use	O
of	O
Bayes	B-General_Concept
factors	I-General_Concept
is	O
that	O
it	O
automatically	O
,	O
and	O
quite	O
naturally	O
,	O
includes	O
a	O
penalty	O
for	O
including	O
too	O
much	O
model	O
structure	O
.	O
</s>
<s>
It	O
thus	O
guards	O
against	O
overfitting	B-Error_Name
.	O
</s>
<s>
with	O
the	O
caveat	O
that	O
approximate-Bayesian	O
estimates	O
of	O
Bayes	B-General_Concept
factors	I-General_Concept
are	O
often	O
biased	O
.	O
</s>
<s>
Note	O
that	O
classical	O
hypothesis	O
testing	O
gives	O
one	O
hypothesis	O
(	O
or	O
model	O
)	O
preferred	O
status	O
(	O
the	O
'	O
null	B-General_Concept
hypothesis	I-General_Concept
 '	O
)	O
,	O
and	O
only	O
considers	O
evidence	O
against	O
it	O
.	O
</s>
<s>
A	O
frequentist	B-General_Concept
hypothesis	O
test	O
of	O
M1	O
(	O
here	O
considered	O
as	O
a	O
null	B-General_Concept
hypothesis	I-General_Concept
)	O
would	O
have	O
produced	O
a	O
very	O
different	O
result	O
.	O
</s>
<s>
Such	O
a	O
test	O
says	O
that	O
M1	O
should	O
be	O
rejected	O
at	O
the	O
5%	O
significance	B-General_Concept
level	I-General_Concept
,	O
since	O
the	O
probability	O
of	O
getting	O
115	O
or	O
more	O
successes	O
from	O
a	O
sample	O
of	O
200	O
if	O
q	O
=	O
is	O
0.02	O
,	O
and	O
as	O
a	O
two-tailed	O
test	O
of	O
getting	O
a	O
figure	O
as	O
extreme	O
as	O
or	O
more	O
extreme	O
than	O
115	O
is	O
0.04	O
.	O
</s>
<s>
Thus	O
,	O
whereas	O
a	O
frequentist	B-General_Concept
hypothesis	O
test	O
would	O
yield	O
significant	B-General_Concept
results	I-General_Concept
at	O
the	O
5%	O
significance	B-General_Concept
level	I-General_Concept
,	O
the	O
Bayes	B-General_Concept
factor	I-General_Concept
hardly	O
considers	O
this	O
to	O
be	O
an	O
extreme	O
result	O
.	O
</s>
<s>
Note	O
,	O
however	O
,	O
that	O
a	O
non-uniform	O
prior	O
(	O
for	O
example	O
one	O
that	O
reflects	O
the	O
fact	O
that	O
you	O
expect	O
the	O
number	O
of	O
success	O
and	O
failures	O
to	O
be	O
of	O
the	O
same	O
order	O
of	O
magnitude	O
)	O
could	O
result	O
in	O
a	O
Bayes	B-General_Concept
factor	I-General_Concept
that	O
is	O
more	O
in	O
agreement	O
with	O
the	O
frequentist	B-General_Concept
hypothesis	O
test	O
.	O
</s>
<s>
The	O
ability	O
of	O
Bayes	B-General_Concept
factors	I-General_Concept
to	O
take	O
this	O
into	O
account	O
is	O
a	O
reason	O
why	O
Bayesian	O
inference	O
has	O
been	O
put	O
forward	O
as	O
a	O
theoretical	O
justification	O
for	O
and	O
generalisation	O
of	O
Occam	O
's	O
razor	O
,	O
reducing	O
Type	O
I	O
errors	O
.	O
</s>
