代写STAT3016/6016 - Introduction to Bayesian Data Analysis Test 1 - Practice Paper B代写Web开发
- 首页 >> Algorithm 算法Research School of Finance, Actuarial Studies and Statistics
Test 1 - Practice Paper B
STAT3016/6016 - Introduction to Bayesian Data Analysis
Problem 1 [10 marks]
COVID-19 travel restrictions brought migration to Australia to a halt. In turn, hundreds of thousands of temporary migrants (mainly international students and working holiday makers) left Australia to return to their home country. This disruption to migration has led to a shortage of available workers in the hospitality industry (among other industries). Accommodation and food service businesses are unable to find the staff to keep up with the demand for their services.
Suppose George owns a cafe and needs to find a new kitchen hand to assist with kitchen duties such as washing dishes and food preparation. Let Y denote the number of unsuccessful phone calls he makes before he finds a suitable person who is willing to take on the job. Let θ denote the probability of securing a kitchen hand on each phone call. We assume θ is the same for all phone calls and the outcome of each phone call is independent of any other phone call.
(a) [1 mark] Write down the likelihood function p(y|θ).
(b) [2 marks] Let’s assume a Beta(a, b) prior on θ. Setting values for the hyperparameters a and b will depend on which labour market economist you talk to. You gather the opinion of 5 economists. Two of the economists think the labour market is very tight, and would assume a prior mean on θ of 0.05. Two economists are slightly more optimistic and suggest to assume a prior mean on θ of 0.15 to reflect the relaxation of travel restrictions and gradual pick up in migration levels. The fifth economist is the most optimistic and believes the labour market is much looser than portrayed in the media, and suggests a prior mean on θ of 0.30.
Write down a weakly informative prior distribution that incorporates all 3 types of prior opinions.
(c) [4 marks] On the 16th phone call, (that is, after 15 unsuccessful calls), George finds a person who agrees to take on the job. Derive your posterior distribution p(θ|y). Make sure your final answer is a proper posterior distribution.
(d) [1 mark] Find the posterior mean of θ.
(e) [2 marks] A week later, George has to find another kitchen hand. Find the posterior predictive probability that George will need to make more than 16 phone calls to find another kitchen hand.
Problem 2 [5 marks]
The lognormal distribution is a continuous probability distribution of a random variable whose logarithm is normally distributed. That is, if Y is log-normally distributed, then X = ln Y is normally distributed. The lognormal distribution can be used to describe the behaviour of random variables that can only take on positive real values. For example in finance, the lognormal distribution is sometimes used to describe the behaviour of stock prices.
Let Y ∼ Lognormal(µ, σ2 ). The likelihood function of Y is
(note E[Y |µ, σ2 ] ≠ µ and V ar[Y |µ, σ2 ] ≠ σ 2 ).
Let’s assume µ is known and data y1, ..., yn are observed. Find a conjugate prior distribution for σ 2 and state the resulting posterior distribution p(σ 2 |µ, y1, ..., yn).