HW3

Dear all,

Here is HW3.

1. Consider a dice with Dirchlet prior with all parameters equal to 2. If I throw a dice 10 times and get one 1, two 2's , three 3's, and four 4's, what is the chance I get a four for the next throw based on a) Bayesian estimate and b) MAP?

2. Consider a department store and that the number of arriving customers in an hour is modeled by a Poisson likelihood and a Gamma prior (with a=2 and b=1). Let say we observed that in the first hour, there are 20 customers arrived. And we observed in the next hour, there are 22 customers arrived. a) What is the Bayesian estimate of the number of customer arrived in the third hour? b) What is the MAP estimate of the number of customer arrived in the third hour? c) What is the Bayesian estimate of the number of customer arrives in the third and fourth hours (two hour period)? d) What is the MAP estimate of the number of customer arrives in the third and fourth hours (two hour period)?

3. Consider a discrete memoryless source with 6 different symbols a,b,c,d,e,f. And the corresponding probabilities are 0.05,0.05,0.1,0.2,0.2,0.4. a). Please construct a Huffmann code for the source. b). What is the code rate of the constructed code?

4. Let f(x,y) = x^2+(y-1)^2 and g(x,y) = x^2+y^2-4 a) Find the maximum of f(x,y) subject to g(x,y)=0 b) Find the minimum of f(x,y) subject to g(x,y)=0 c) Try to repeat a) and b) but replace the constraint by g(x,y)<=0

Best,

Sam