Please use D2L to turn in both the HTML output and your R Markdown file in.
Simulate the Mean and Variance of samples from a uniform(0,1) distribution.
Recall the mixture distribution from HW1
Estimate the 95% HDI for this distribution.
Use the code below to take samples and estimate the mean and variance of this distribution.
num.samples <- 1000
samples <- ifelse(runif(1000) < .5, 0, 1)
samples[samples == 1] <- rgamma(sum(samples),5,1.5)