---
title: "Warm-up worksheet #3"
author: "Fantastic Students"
date: "`r Sys.Date()`"
output: pdf_document
---
<!-- The author of this template is Dr. Gordan Zitkovic.-->
<!-- The code chunk below contains some settings that will  -->
<!-- make your R code look better in the output pdf file.  -->
<!-- If you are curious about what each option below does, -->
<!-- go to https://yihui.org/knitr/options/ -->
<!-- If not, feel free to disregard everything ...  -->
```{r echo=FALSE, warning=FALSE, include=FALSE}
knitr::opts_chunk$set(
  collapse = TRUE,
  fig.align="center",
  fig.pos="t",
  fig.width=12,
  strip.white = TRUE
)
```
<!-- ... down to here. -->

# Simulations
## Problem 1.  
Draw 100 simulated values from $Bernoulli(p=0.2)$. What is the proportion of "successes" in your simulated batch?

*Solution:*

## Problem 2.  
Draw 1000 simulated values from $Binomial(n=100, p=0.2)$. Plot the histogram of your simulated values.

*Solution:*


## Problem 3.  
Consider the following two-step experiment. First you draw a simulated value from a Bernoulli(p=1/3). If the drawn value from the Bernoulli equals $0$, then you draw a simulated value from Binomial(n=50,p=0.5). On the other hand, if the drawn value from the Bernoulli equals $1$, then you draw a simulated value from Binomial(100,0.5). 

You should repeat the above two-step experiment $10000$ times and draw the histogram of the simulated values. 

*Solution:*
