Let $U \in \text{Uniform} [0, 1]$ be a D4624: Standard unsigned uniform random real number such that
(i) | $\theta \in [0, 1]$ is a D993: Real number |
(ii) | \begin{equation} X : = I_{\{ U \leq \theta \}} \end{equation} |
Then
\begin{equation}
X
\in \text{Bernoulli}(\theta)
\end{equation}