<s>
The	O
ratio	B-Algorithm
of	I-Algorithm
uniforms	I-Algorithm
is	O
a	O
method	O
initially	O
proposed	O
by	O
Kinderman	O
and	O
Monahan	O
in	O
1977	O
for	O
pseudo-random	B-Algorithm
number	I-Algorithm
sampling	I-Algorithm
,	O
that	O
is	O
,	O
for	O
drawing	O
random	O
samples	O
from	O
a	O
statistical	B-General_Concept
distribution	I-General_Concept
.	O
</s>
<s>
Like	O
rejection	B-Algorithm
sampling	I-Algorithm
and	O
inverse	B-Algorithm
transform	I-Algorithm
sampling	I-Algorithm
,	O
it	O
is	O
an	O
exact	O
simulation	O
method	O
.	O
</s>
<s>
The	O
basic	O
idea	O
of	O
the	O
method	O
is	O
to	O
use	O
a	O
change	O
of	O
variables	O
to	O
create	O
a	O
bounded	B-Algorithm
set	I-Algorithm
,	O
which	O
can	O
then	O
be	O
sampled	O
uniformly	O
to	O
generate	O
random	O
variables	O
following	O
the	O
original	O
distribution	O
.	O
</s>
<s>
A	O
convenient	O
technique	O
to	O
sample	O
a	O
statistical	B-General_Concept
distribution	I-General_Concept
is	O
rejection	B-Algorithm
sampling	I-Algorithm
.	O
</s>
<s>
When	O
the	O
probability	O
density	O
function	O
of	O
the	O
distribution	O
is	O
bounded	B-Algorithm
and	O
has	O
finite	O
support	O
,	O
one	O
can	O
define	O
a	O
bounding	O
box	O
around	O
it	O
(	O
a	O
uniform	O
proposal	O
distribution	O
)	O
,	O
draw	O
uniform	O
samples	O
in	O
the	O
box	O
and	O
return	O
only	O
the	O
x	O
coordinates	O
of	O
the	O
points	O
that	O
fall	O
below	O
the	O
function	O
(	O
see	O
graph	O
)	O
.	O
</s>
<s>
One	O
can	O
still	O
use	O
rejection	B-Algorithm
sampling	I-Algorithm
,	O
but	O
with	O
a	O
non-uniform	O
proposal	O
distribution	O
.	O
</s>
<s>
The	O
method	O
of	O
the	O
ratio	B-Algorithm
of	I-Algorithm
uniforms	I-Algorithm
offers	O
a	O
solution	O
to	O
this	O
problem	O
,	O
by	O
essentially	O
using	O
as	O
proposal	O
distribution	O
the	O
distribution	O
created	O
by	O
the	O
ratio	O
of	O
two	O
uniform	O
random	O
variables	O
.	O
</s>
<s>
However	O
,	O
the	O
interest	O
of	O
this	O
method	O
is	O
that	O
under	O
mild	O
conditions	O
on	O
(	O
namely	O
that	O
and	O
for	O
all	O
are	O
bounded	B-Algorithm
)	O
,	O
is	O
bounded	B-Algorithm
.	O
</s>
<s>
One	O
can	O
define	O
the	O
rectangular	O
bounding	O
box	O
such	O
thatThis	O
allows	O
to	O
sample	O
uniformly	O
the	O
set	O
by	O
rejection	B-Algorithm
sampling	I-Algorithm
inside	O
.	O
</s>
<s>
The	O
definition	O
of	O
is	O
already	O
convenient	O
for	O
the	O
rejection	B-Algorithm
sampling	I-Algorithm
step	O
.	O
</s>
<s>
Here	O
parameterized	O
only	O
with	O
,	O
the	O
ratio	B-Algorithm
of	I-Algorithm
uniforms	I-Algorithm
can	O
be	O
described	O
with	O
a	O
more	O
general	O
class	O
of	O
transformations	O
.	O
</s>
<s>
Assume	O
that	O
we	O
want	O
to	O
sample	O
the	O
exponential	O
distribution	O
,	O
with	O
the	O
ratio	B-Algorithm
of	I-Algorithm
uniforms	I-Algorithm
method	O
.	O
</s>
<s>
To	O
apply	O
the	O
method	O
of	O
the	O
ratio	B-Algorithm
of	I-Algorithm
uniforms	I-Algorithm
,	O
with	O
a	O
given	O
,	O
one	O
should	O
first	O
determine	O
the	O
boundaries	O
of	O
the	O
rectangular	O
bounding	O
box	O
enclosing	O
the	O
set	O
.	O
</s>
<s>
The	O
rust	O
and	O
Runuran	O
contributed	O
packages	O
in	O
R	B-Language
.	O
</s>
