<s>
In	O
numerical	O
analysis	O
and	O
computational	B-Algorithm
statistics	I-Algorithm
,	O
rejection	B-Algorithm
sampling	I-Algorithm
is	O
a	O
basic	O
technique	O
used	O
to	O
generate	O
observations	O
from	O
a	O
distribution	O
.	O
</s>
<s>
It	O
is	O
also	O
commonly	O
called	O
the	O
acceptance-rejection	B-Algorithm
method	I-Algorithm
or	O
"	O
accept-reject	O
algorithm	O
"	O
and	O
is	O
a	O
type	O
of	O
exact	O
simulation	O
method	O
.	O
</s>
<s>
Rejection	B-Algorithm
sampling	I-Algorithm
is	O
based	O
on	O
the	O
observation	O
that	O
to	O
sample	O
a	O
random	O
variable	O
in	O
one	O
dimension	O
,	O
one	O
can	O
perform	O
a	O
uniformly	O
random	O
sampling	O
of	O
the	O
two-dimensional	O
Cartesian	O
graph	O
,	O
and	O
keep	O
the	O
samples	O
in	O
the	O
region	O
under	O
the	O
graph	O
of	O
its	O
density	O
function	O
.	O
</s>
<s>
To	O
visualize	O
the	O
motivation	O
behind	O
rejection	B-Algorithm
sampling	I-Algorithm
,	O
imagine	O
graphing	O
the	O
density	O
function	O
of	O
a	O
random	O
variable	O
onto	O
a	O
large	O
rectangular	O
board	O
and	O
throwing	O
darts	O
at	O
it	O
.	O
</s>
<s>
The	O
visualization	O
as	O
just	O
described	O
is	O
equivalent	O
to	O
a	O
particular	O
form	O
of	O
rejection	B-Algorithm
sampling	I-Algorithm
where	O
the	O
"	O
proposal	O
distribution	O
"	O
is	O
uniform	O
(	O
hence	O
its	O
graph	O
is	O
a	O
rectangle	O
)	O
.	O
</s>
<s>
The	O
general	O
form	O
of	O
rejection	B-Algorithm
sampling	I-Algorithm
assumes	O
that	O
the	O
board	O
is	O
not	O
necessarily	O
rectangular	O
but	O
is	O
shaped	O
according	O
to	O
the	O
density	O
of	O
some	O
proposal	O
distribution	O
that	O
we	O
know	O
how	O
to	O
sample	O
from	O
(	O
for	O
example	O
,	O
using	O
inversion	B-Algorithm
sampling	I-Algorithm
)	O
,	O
and	O
which	O
is	O
at	O
least	O
as	O
high	O
at	O
every	O
point	O
as	O
the	O
distribution	O
we	O
want	O
to	O
sample	O
from	O
,	O
so	O
that	O
the	O
former	O
completely	O
encloses	O
the	O
latter	O
.	O
</s>
<s>
Rejection	B-Algorithm
sampling	I-Algorithm
works	O
as	O
follows	O
:	O
</s>
<s>
Thus	O
,	O
the	O
algorithm	O
can	O
be	O
used	O
to	O
sample	O
from	O
a	O
distribution	O
whose	O
normalizing	O
constant	O
is	O
unknown	O
,	O
which	O
is	O
common	O
in	O
computational	B-Algorithm
statistics	I-Algorithm
.	O
</s>
<s>
The	O
rejection	B-Algorithm
sampling	I-Algorithm
method	O
generates	O
sampling	O
values	O
from	O
a	O
target	O
distribution	O
with	O
arbitrary	O
probability	O
density	O
function	O
by	O
using	O
a	O
proposal	O
distribution	O
with	O
probability	O
density	O
.	O
</s>
<s>
There	O
are	O
a	O
number	O
of	O
extensions	O
to	O
this	O
algorithm	O
,	O
such	O
as	O
the	O
Metropolis	B-Algorithm
algorithm	I-Algorithm
.	O
</s>
<s>
This	O
method	O
relates	O
to	O
the	O
general	O
field	O
of	O
Monte	B-Algorithm
Carlo	I-Algorithm
techniques	O
,	O
including	O
Markov	B-General_Concept
chain	I-General_Concept
Monte	I-General_Concept
Carlo	I-General_Concept
algorithms	O
that	O
also	O
use	O
a	O
proxy	O
distribution	O
to	O
achieve	O
simulation	O
from	O
the	O
target	O
distribution	O
.	O
</s>
<s>
It	O
forms	O
the	O
basis	O
for	O
algorithms	O
such	O
as	O
the	O
Metropolis	B-Algorithm
algorithm	I-Algorithm
.	O
</s>
<s>
Rejection	B-Algorithm
sampling	I-Algorithm
is	O
most	O
often	O
used	O
in	O
cases	O
where	O
the	O
form	O
of	O
makes	O
sampling	O
difficult	O
.	O
</s>
<s>
Rejection	B-Algorithm
sampling	I-Algorithm
is	O
thus	O
more	O
efficient	O
than	O
some	O
other	O
method	O
whenever	O
M	O
times	O
the	O
cost	O
of	O
these	O
operations	O
—	O
which	O
is	O
the	O
expected	O
cost	O
of	O
obtaining	O
a	O
sample	O
with	O
rejection	B-Algorithm
sampling	I-Algorithm
—	O
is	O
lower	O
than	O
the	O
cost	O
of	O
obtaining	O
a	O
sample	O
using	O
the	O
other	O
method	O
.	O
</s>
<s>
Rejection	B-Algorithm
sampling	I-Algorithm
can	O
be	O
far	O
more	O
efficient	O
compared	O
with	O
the	O
naive	O
methods	O
in	O
some	O
situations	O
.	O
</s>
<s>
by	O
inverse	B-Algorithm
transform	I-Algorithm
sampling	I-Algorithm
)	O
:	O
</s>
<s>
Moreover	O
,	O
even	O
when	O
you	O
apply	O
the	O
Rejection	B-Algorithm
sampling	I-Algorithm
method	O
,	O
it	O
is	O
always	O
hard	O
to	O
optimize	O
the	O
bound	O
for	O
the	O
likelihood	O
ratio	O
.	O
</s>
<s>
Rejection	B-Algorithm
sampling	I-Algorithm
criterion	O
:	O
for	O
,	O
if	O
holds	O
,	O
accept	O
the	O
value	O
of	O
;	O
if	O
not	O
,	O
continue	O
sampling	O
new	O
and	O
new	O
until	O
acceptance	O
.	O
</s>
<s>
For	O
the	O
above	O
example	O
,	O
as	O
the	O
measurement	O
of	O
the	O
efficiency	O
,	O
the	O
expected	O
number	O
of	O
the	O
iterations	O
the	O
NEF-Based	O
Rejection	B-Algorithm
sampling	I-Algorithm
method	O
is	O
of	O
order	O
b	O
,	O
that	O
is	O
,	O
while	O
under	O
the	O
naive	O
method	O
,	O
the	O
expected	O
number	O
of	O
the	O
iterations	O
is	O
,	O
which	O
is	O
far	O
more	O
inefficient	O
.	O
</s>
<s>
Rejection	B-Algorithm
sampling	I-Algorithm
can	O
lead	O
to	O
a	O
lot	O
of	O
unwanted	O
samples	O
being	O
taken	O
if	O
the	O
function	O
being	O
sampled	O
is	O
highly	O
concentrated	O
in	O
a	O
certain	O
region	O
,	O
for	O
example	O
a	O
function	O
that	O
has	O
a	O
spike	O
at	O
some	O
location	O
.	O
</s>
<s>
For	O
many	O
distributions	O
,	O
this	O
problem	O
can	O
be	O
solved	O
using	O
an	O
adaptive	O
extension	O
(	O
see	O
adaptive	O
rejection	B-Algorithm
sampling	I-Algorithm
)	O
,	O
or	O
with	O
an	O
appropriate	O
change	O
of	O
variables	O
with	O
the	O
method	O
of	O
the	O
ratio	B-Algorithm
of	I-Algorithm
uniforms	I-Algorithm
.	O
</s>
<s>
See	O
curse	B-Algorithm
of	I-Algorithm
dimensionality	I-Algorithm
.	O
</s>
<s>
In	O
high	O
dimensions	O
,	O
it	O
is	O
necessary	O
to	O
use	O
a	O
different	O
approach	O
,	O
typically	O
a	O
Markov	B-General_Concept
chain	I-General_Concept
Monte	I-General_Concept
Carlo	I-General_Concept
method	I-General_Concept
such	O
as	O
Metropolis	B-Algorithm
sampling	I-Algorithm
or	O
Gibbs	B-Algorithm
sampling	I-Algorithm
.	O
</s>
<s>
(	O
However	O
,	O
Gibbs	B-Algorithm
sampling	I-Algorithm
,	O
which	O
breaks	O
down	O
a	O
multi-dimensional	O
sampling	O
problem	O
into	O
a	O
series	O
of	O
low-dimensional	O
samples	O
,	O
may	O
use	O
rejection	B-Algorithm
sampling	I-Algorithm
as	O
one	O
of	O
its	O
steps	O
.	O
)	O
</s>
<s>
An	O
extension	O
of	O
rejection	B-Algorithm
sampling	I-Algorithm
that	O
can	O
be	O
used	O
to	O
overcome	O
this	O
difficulty	O
and	O
efficiently	O
sample	O
from	O
a	O
wide	O
variety	O
of	O
distributions	O
(	O
provided	O
that	O
they	O
have	O
log-concave	O
density	O
functions	O
,	O
which	O
is	O
in	O
fact	O
the	O
case	O
for	O
most	O
of	O
the	O
common	O
distributions	O
—	O
even	O
those	O
whose	O
density	O
functions	O
are	O
not	O
concave	O
themselves	O
)	O
is	O
known	O
as	O
adaptive	O
rejection	B-Algorithm
sampling	I-Algorithm
(	O
ARS	O
)	O
.	O
</s>
<s>
Furthermore	O
,	O
different	O
combinations	O
of	O
ARS	O
and	O
the	O
Metropolis-Hastings	B-Algorithm
method	O
have	O
been	O
designed	O
in	O
order	O
to	O
obtain	O
a	O
universal	O
sampler	O
that	O
builds	O
a	O
self-tuning	O
proposal	O
densities	O
(	O
i.e.	O
,	O
a	O
proposal	O
automatically	O
constructed	O
and	O
adapted	O
to	O
the	O
target	O
)	O
.	O
</s>
<s>
This	O
class	O
of	O
methods	O
are	O
often	O
called	O
as	O
Adaptive	O
Rejection	O
Metropolis	B-Algorithm
Sampling	I-Algorithm
(	O
ARMS	O
)	O
algorithms	O
.	O
</s>
