\begin{Schunk}
\begin{Sinput}
 N <- 1000
 size <- 1
 prob <- 0.4
 y1 <- rbinom(N, size, prob)
 head(y1)
\end{Sinput}
\begin{Soutput}
[1] 0 0 0 0 1 0
\end{Soutput}
\begin{Sinput}
 ## The total number of 1's is
 sum(y1)
\end{Sinput}
\begin{Soutput}
[1] 383
\end{Soutput}
\end{Schunk}
