Please write the day and time of your tutorial class on your homework.
You should also work through the R exercise in Q3. It is very important that you make progress with R now: do not leave it until just before the first Computer Practical. If you are struggling with Q3 you should attend the Computing Office Hours.
Suppose that X∼iidExponential(λ) , so that the log-likelihood is
ℓ(λ;x)=logfn(x;λ)=c+nlogλ−λxˉ
where xˉ:=n−1∑i=1nxi , and c is some constant. This is a differentiable function of λ,and so to find the Maximum Likelihood estimate (ML estimate), we can differentiate and then solve the first-order conditions. Differentiating gives
ℓ′(X;λ)=λn−nxˉ
Setting this equal to zero and solving for λ gives
λn−nxˉ=0⟹λ=xˉ1.
Note that ℓ′′(λ;X)=−λ2n<0 for all λ , so this value maximizes ℓ . Hence the ML estimate is
λ^(X)=xˉ1
Now derive the ML estimates for the following distributions in a similar manner. Note that the final distribution must be handled differently, as you will see that f(x;a,b) is not a smooth function of a or b.
(a)X∼iidPoisson(λ)
(b) X∼Binomial(n,p) , where n is specified (i.e. only p is unknown).
(c) X∼iidNormal(μ,σ2)
(d) X∼iidUniform(a,b)
In this question and the next we will use the Pareto distribution, whose PDF may be written
fX(x;x0,θ)=xθ+1θx0θI(x≥x0),
where x0>0 and θ>0.
(a) Show that the CDF, or distribution function, of X is
FX(x;x0,θ)={1−(xx0)θI(x≥x0)
(b) Show that the quantile function of X is
FX−1(u;x0,θ)=x0(1−u)−1/θ
for0<u<1.
[Hint: the quantile function is defined as follows: for any ( u∈(0,1) ) one wants to find the smallest ( x∈R ) such that
FX(x)≥u,
that is more formally,
x=FX−(u):=inf{y∈R:FX(y)≥u}.
FX− is a generalized inverse, as in general Fx need not be continuous and strictly increasing. In the present case you can find FX−1 , the actual inverse of Fx , e.g. by finding x∈R such that Fx(x)=u for an arbitrary u∈(0,1)].
(c) How can we generate random quantities from this distribution?
[ Hint: show that the CDF of the r.v. Y=FX−1(U) for U∼Uniform(0,1) is the same as X∼Pareto(x0,θ) ]
In R we can write functions ppareto, dpareto, qpareto, and rpareto, to compute the probability function of x, the density function of x, the quantile function of u, and n random realizations of X.