  We treat a random number generation from an i.i.d. probability distribution
of $P$ to that of $Q$. When $Q$ or $P$ is a uniform distribution, the problems
have been well-known as the uniform random number generation and the
resolvability problem respectively, and analyzed not only in the context of the
first order asymptotic theory but also that in the second asymptotic theory. On
the other hand, when both $P$ and $Q$ are not a uniform distribution, the
second order asymptotics has not been treated. In this paper, we focus on the
second order asymptotics of a random number generation for arbitrary
probability distributions $P$ and $Q$ on a finite set. In particular, we derive
the optimal second order generation rate under an arbitrary permissible
confidence coefficient.
