## For today you should have:- Homework 8.
- Chapter 9.
## Today:- Bayesian estimation.
- Estimators.
- Locomotive problem.
- Evaluations.
- Homework 9.
- Prepare for a quiz on Chapters 8 and 9.
## The Coin Problem
`To answer that question, we will start with coin.py, which computes a Bayesian estimate of the parameter of a (possibly) biased coin.` Download and run it, and let's discuss. Instead of the two hypotheses we saw in Chapter 7, it uses a suite of hypotheses to represent possible values of the parameter. Exercise: Write a function that takes a posterior distribution (as a Pmf) and computes a credible interval.Can we formalize the hypotheses "the coin is unbiased" and "the coin is biased" and compute a likelihood ratio? Take a look at coin2.py Let's look at locomotive.py.Exercise: If you started with the prior P(biased) = 0.1, what is your posterior?## Properties of estimatorsThe ones in the book are mean squared error and bias. There are more here.These are long-term properties of using an estimator for many iterations of the estimation game. For any particular estimate, we don't know error. If we did, we would know the answer and wouldn't need the estimator. Which is better, an MLE or an estimator that minimizes MSE? ## The Locomotive problemThis is adapted from Mosteller, Fifty Challenging Problems in Probability:"A railroad numbers its locomotives in order 1..N. One day you see a locomotive with the number 60. Estimate how many locomotives the railroad has." - What is the maximum likelihood estimator?
- What estimator minimizes mean squared error? Hint: assume that the estimator is some multiple of the observed number.
- Can you find an unbiased estimator?
- For what value of N is 60 the expected value?
- What is the Bayesian posterior distribution assuming a uniform prior?
Exercise: generalize locomotive.py for a set of observations (not just one).
## Practice quiz |

Lecture notes >