# FP Exercises 01 (10 pts)


# Exercise 1.1 (5 pts): Baby girls given placenta previa.
# From Gelman et al. (2013, chap. 2).
#
# Placenta previa is a certain complication during pregnancy. A study
# concerning the sex of placenta previa births in Germany found that of a
# total of 980 births, 437 were female. How much evidence does this provide
# for the claim that the proportion of female births in the population of
# placenta previa births is less than 0.485, the proportion of female births
# in the general population?
#
# (a) Use Stan to draw from the posterior distribution.
#
# (b) Make a histogram of the draws.
#
# (c) Estimate a 95% posterior interval and add it to the histogram.


# Exercise 1.2 (5 pts): Miles per gallon and horse power.
#
# Consider the mtcars data in R.
#
# (a) Make a scatter plot of miles per gallon as a function of horse power.
#
# (b) Determine Bayesian estimates of the parameters of a simple regression
# model.
#
# (c) Repeatedly plot random samples of the posterior predictive distribution
# of miles per gallon as a function of horse power and compare it to the
# original data. What does the model miss? (Hint: The plot should look like
# below.)

# Prior info
# https://mpgbuddy.com/