# hw9 - 36-226 Summer 2010Homework 9Due Aug 4START EARLY SO...

This preview shows pages 1–2. Sign up to view the full content.

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: 36-226 Summer 2010Homework 9Due Aug. 4START EARLY SO THAT YOU CAN STUDY FOR THE FINAL1. LetX1,...,Xn∼exp(θ). Show that the Inv-Gamma(α,β) is conjugate for exponential andfind the form of the posterior. Use the following forms for the Exponential and Inv-Gammadistributions:p(X|θ) =1θe-x/θp(θ|α,β) =βαΓ(α)1θα+1e-β/θ2. I want to know the typical amount of time that I will wait for a 500 bus at 5thand Moorewood.According to the bus schedule, busses should arrive every 15 minutes or so. Waiting timesare typically modelled as exponential distributions. I therefore decide to check how long Iwait for a few days and use a Inv-Gamma prior to make inferences about the true waitingtime.(a) Choosehyperparameters(the fixed, knownαandβvalues in the Gamma distribution)by using the followingRfunction.fcn = function(a,b){x = seq(0,20,len=200)y = (b^a)/(gamma(a)) * x^(-a-1) * exp(-b/x)plot(x,y,main=paste(’a=’,a,’, b=’,b,’\n mean=’,round(b/(a-1),3),’, sd=’,round(b/((a-1)*sqrt(a-2)),3),sep=’’),ty=’l’)}This function will plot yourpriorbeliefs aboutθfor different values of the hyperparam-...
View Full Document

## This document was uploaded on 07/14/2011.

### Page1 / 2

hw9 - 36-226 Summer 2010Homework 9Due Aug 4START EARLY SO...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online