Problem 1. Basic Optimization, MLE for IID Poisson Data

Suppose \(y_i\) is a count then a very common model is to assume the Poisson disttribuion: \[ P(Y=y \;|\; \lambda) = \frac{e^{-\lambda} \, \lambda^y}{y!}, \; y = 0,1,2,\ldots \]

Given \(Y_i \sim Poisson(\lambda)\) iid, (that is, \(Y_i = y_i\)), what is the MLE of \(\lambda\)?

Problem 2. Constrained Optimization, Minimum Variance Portfolio

Suppose we are considering investing in \(p\) stocks where the uncertain return on the \(i^{th}\) stock is denoted by \(R_i\), \(i=1,2,\ldots,p\). Let \(R=(R_1,R_2,\ldots,R_p)'\).

A portfolio is a given by \(w=(w_1,w_2,\ldots,w_p)'\) where \(w_i\) is the fraction of wealth invested in asset \(i\).

The \(\{w_i\}\) must satisfy \(\sum w_i = 1\).

The return on the portfolio is then \[ P = w'R = \sum w_i R_i. \]

We want to find the global minimum variance portfolio: \[ \underset{w}{\min} \, Var(P), \;\; \text{subject to} \sum w_i = 1. \]

If we let \(\iota = (1,1,\ldots,1)'\), the vector of ones, and \(Var(R) = \Sigma\) then our problem is \[ \underset{w}{\min} \, w'\Sigma w \;\; \text{subject to} \; w' \iota= 1. \] Find the global minimum variance portfolio in terms of \(\Sigma\) and \(\iota\).

Problem 3. Polynomial Regression

A basic idea in nonlinear regression is to use polynomial terms.

With one \(x\) variable, this means we consider the models: \[ Y_i = \beta_0 + \beta_1 x_i + \beta_2 x_i^2 + \ldots + \beta_p x_i^p + \epsilon_i \]

Using the simple used cars data (with \(n\)=1,000) with Y= price and x=mileage, find the best choice of \(p\).

Fit your chosen polynomial mode using all the data and plot the fit on top of the data. Do you like it?
Also plot the fits for a \(p\) that is “way to big”. Whais wrong with it?

598 only, compute the posterior model probabilites for a range of \(p\) using the BIC approximation.

Problem 4, Basic Bayesian Statistics, the Beta/Bernoulli

So far this season, the Leafs have scored on 7 out of 25 powerplays.

Assuming whether or not they score on a power play is iid \(\text{Bernoulli}(p)\), choose a Beta prior for \(p\).

Plot the Beta prior and the Beta posterio in the same plot so that we can gauge the impact of the data.