Exercises

Exercise 4.1 The lifetime of a certain type of electrical components follows a Γ(α,β) distribution, but the values of the parameters α and β are unknown. Assume that three of these components are tried in an independent way and the following lifetimes are measured: 120, 130, and 128 hours.

  1. Obtain the moment estimators of α and β and provide its concrete value for the sample at hand.
  2. Prove the consistency in probability of the estimators by using Corollary 3.3 or Proposition 4.1.

Exercise 4.2 The proportion of impurities in each manufactured unit of a certain kind of chemical product is a rv with pdf

f(x;θ)={(θ+1)xθ,0<x<1,0,otherwise,

where θ>1. Five units of the manufactured product are taken in one day, resulting in the next impurity proportions: 0.33, 0.51, 0.02, 0.15, 0.12.

  1. Obtain the moment estimator of θ.
  2. Obtain the maximum likelihood estimator of θ.

Exercise 4.3 An industrial product is packaged in batches of N units each. The number of defective units within each batch is unknown. Since checking whether a unit is defective or not is expensive, the quality control consists in selecting n units of the batch and obtaining an estimation of the number of defective units within the batch. The batch is rejected if the estimated number of defective units exceeds N/4.

  1. Find the moment estimator of the number of defective units within a parcel.
  2. If N=20, n=5, and among these n units 2 of them are defective, is the batch rejected?

Exercise 4.4 Assume that there are 3 balls in an urn: θ of them are red and 3θ white. Two balls are extracted (with replacement).

  1. The two balls are red. Obtain the MLE of θ.
  2. If only one of the balls is red, what is now the MLE of θ?

Exercise 4.5 A particular machine may fail because of two mutually exclusive types of failures: A and B. We wish to estimate the probability of each failure by knowing that:

  • The probability of failure A is twice the one of B.
  • In 30 days we observed 2 failures of A, 3 failures of B, and 25 days without failures.

Compute the moment and maximum likelihood estimators of the probability of each failure.

Exercise 4.6 In the manufacturing process of metallic pieces of three sizes, the proportions of small, normal, and large pieces are p1=0.05, p2=0.9, and p3=0.05, respectively. It is suspected that the machine is not properly adjusted and that the proportions have changed in the following way: p1=0.05+τ, p2=0.92τ, and p3=0.05+τ. For checking this suspicion, 5000 pieces are analyzed, finding 278, 4428, and 294 pieces of small, normal, and large sizes, respectively. Compute the MLE of τ.

Exercise 4.7 Let XiN(iθ,1), i=1,,n, be independent rv’s.

  1. Obtain the MLE of θ.
  2. Is it unbiased?
  3. Obtain its asymptotic variance.

Exercise 4.8 For θ>0, let X be a rv with pdf

f(x;θ)=θx2,xθ>0.

  1. Find the MLE of θ.
  2. Try to obtain the moment estimator of θ. Is there any problem?

Exercise 4.9 Consider the rv X with pdf

f(x)={3θ3x4if xθ,0if x<θ.

  1. Find the MLE of θ.
  2. Find the moment estimator ˆθMM. Does it always makes sense?
  3. Is ˆθMM unbiased?
  4. Compute the precision of ˆθMM.

Exercise 4.10 A srs of size n from the pdf

f(x)=2θxeθx2,x>0,

where θ>0 is an unknown parameter, is available.

  1. Determine the moment estimator of θ.
  2. Determine the MLE of θ and find its asymptotic distribution.

Exercise 4.11 Let (X1,,Xn) be a srs from the inverse gamma distribution, whose pdf is

f(x;α,β)=βαΓ(α)x(α+1)eβ/x,x>0, α>0, β>0.

  1. Obtain ˆβMM assuming α is known.
  2. Obtain ˆβMLE assuming α is known.
  3. Try to obtain (ˆαMM,ˆβMM).

Exercise 4.12 Let (X1,,Xn) be a srs from the inverse Gaussian distribution, whose pdf is

f(x;μ,λ)=λ2πx3exp{λ(xμ)22μ2x},x>0, μ>0, λ>0.

Estimate μ and λ by:

  1. Maximum likelihood.
  2. The method of moments.

Exercise 4.13 Consider the pdf given by

f(x;θ)=θ21+θ(1+x)eθx,x>0, θ>0,

and assume a srs (X1,,Xn) from it is given.

  1. Obtain ˆθMLE.
  2. Obtain the asymptotic variance of ˆθMLE.

Exercise 4.14 Consider the following mixture of normal pdf’s:

\begin{align} f(x;\boldsymbol{\theta})=w\phi(x;\mu,\sigma^2)+(1-w)\phi(x;-\mu,\sigma^2),\tag{4.11} \end{align}

where \boldsymbol{\theta}=(\mu,\sigma^2,w)'\in\mathbb{R}\times\mathbb{R}_+\times[0,1]. Assume there is a srs (X_1,\ldots,X_n) from f(\cdot;\boldsymbol{\theta}). Then:

  1. Derive the moment estimators of \boldsymbol{\theta}. You can use that \mathbb{E}[\mathcal{N}(\mu,\sigma^2)^3]=\mu^3+3 \mu \sigma^2 and \mathbb{E}[\mathcal{N}(\mu,\sigma^2)^4]=\mu^4+6 \mu^2 \sigma^2+3 \sigma^4.
  2. Implement in R the moment estimator to verify its correct behavior using a simulated sample from (4.11).
  3. Try to derive the MLE of \boldsymbol{\theta}. Is it simpler or harder than deriving the moment estimators?

Exercise 4.15 Derive the Fisher information matrix in Example 4.15.

Exercise 4.16 Derive the Fisher information matrix in Example 4.16.

Exercise 4.17 Consider a srs (X_1,Y_1),\ldots,(X_n,Y_n) from a bivariate random vector distributed as \mathcal{N}_2\left(\begin{pmatrix}0\\0\end{pmatrix},\begin{pmatrix}1&\rho\\\rho&1\end{pmatrix}\right). Find:

  1. The MLE of \rho (at least in an implicit form).
  2. The asymptotic distribution of \hat{\rho}_\mathrm{MLE}.

Exercise 4.18 Replicate Figure 4.1 by coding in R the simulation study behind it.

Exercise 4.19 Replicate Figure 4.4 by coding in R the simulation study behind it. Use rgamma(n = n, shape = k, rate = theta) to simulate a srs of size n from a \Gamma(k,\theta).

Exercise 4.20 Validate empirically (4.7) in Theorem 4.2 by coding in R a simulation study that delivers a visualization of the MLE’s distribution similar to the lower plots of Figure 4.4, but for the bivariate case. For that, use scatterplots rather than histograms and contourlines of the bivariate standard normal density. Use the \Gamma(k,\theta) distribution (both parameters unknown) with Fisher information matrix given in Example 4.16.

Some help:

  • Compute numerically (\hat{\theta}_\mathrm{MLE},\hat{k}_\mathrm{MLE}) using the functionMASS::fitdistr(..., densfun = "gamma").
  • The computation of \psi and \psi' (first and second derivatives of \log\Gamma) can be done with numDeriv::grad() and numDeriv::hessian().
  • Draw contours of a bivariate normal using contour() and mvtnorm::dmvnorm().

Exercise 4.21 Perform the analogous experiment to Exercise 4.20 for the \mathrm{Beta}(\alpha,\beta) distribution (both parameters unknown) with Fisher information matrix given in Example 4.17. Additionally, show the contourplots of several (random) log-likelihood functions, as well as their maxima, in the spirit of the upper plots in Figure 4.4.

Exercise 4.22 Given a srs (X_1,\ldots,X_n) from a \Gamma(\theta,3) distribution, let us investigate the precision of the estimation of the Fisher information \mathcal{I}(\theta) using three approximations:

  1. \mathcal{I}(\hat{\theta}_\mathrm{MLE}).
  2. \hat{\mathcal{I}}(\theta).
  3. \hat{\mathcal{I}}(\hat{\theta}_\mathrm{MLE}).

Draw the above estimates as a function of n to have a plot in the spirit of Figure 4.1, but to estimate \mathcal{I}(\theta). Use \theta=2,5, N=5 repetitions, and an increasing sequence of n’s until n=300. Importantly, use the same sample to compute the estimators in a–c to allow for a better comparison. Which estimator seems to perform better? Which ones are almost equivalent?

Exercise 4.23 Use simulations to empirically validate the following asymptotic distributions of the MLE for the uniparameter case:

  1. \sqrt{n\mathcal{I}(\theta)}(\hat{\theta}_{\mathrm{MLE}}-\theta)\stackrel{d}{\longrightarrow}\mathcal{N}(0,1).
  2. \sqrt{n\hat{\mathcal{I}}(\theta)}(\hat{\theta}_{\mathrm{MLE}}-\theta)\stackrel{d}{\longrightarrow}\mathcal{N}(0,1).
  3. \sqrt{n\mathcal{I}(\hat{\theta}_{\mathrm{MLE}})}(\hat{\theta}_{\mathrm{MLE}}-\theta)\stackrel{d}{\longrightarrow}\mathcal{N}(0,1).
  4. \sqrt{n\hat{\mathcal{I}}(\hat{\theta}_{\mathrm{MLE}})}(\hat{\theta}_{\mathrm{MLE}}-\theta)\stackrel{d}{\longrightarrow}\mathcal{N}(0,1).

Consider the \mathrm{Beta}(\alpha,\theta) distribution with \alpha known and \theta unknown, and Fisher information given in Example 4.17. Then, simulate N=1000 srs’s of size n from \mathrm{Beta}(\alpha,\theta) and show the histograms for the random variables in a–d, as well as the standard normal density. Set \alpha, \theta, and n to values of your choice.

Exercise 4.24 Use simulations to empirically validate the following asymptotic distributions of the MLE for the multiparameter case:

  1. \sqrt{n}\boldsymbol{R}(\boldsymbol{\theta})'(\hat{\boldsymbol{\theta}}_\mathrm{MLE}-\boldsymbol{\theta})\stackrel{d}{\longrightarrow} \mathcal{N}_2\left(\boldsymbol{0},\boldsymbol{I}_2\right).
  2. \sqrt{n}\hat{\boldsymbol{R}}(\boldsymbol{\theta})'(\hat{\boldsymbol{\theta}}_\mathrm{MLE}-\boldsymbol{\theta})\stackrel{d}{\longrightarrow} \mathcal{N}_2\left(\boldsymbol{0},\boldsymbol{I}_2\right).
  3. \sqrt{n}\boldsymbol{R}(\hat{\boldsymbol{\theta}}_\mathrm{MLE})'(\hat{\boldsymbol{\theta}}_\mathrm{MLE}-\boldsymbol{\theta})\stackrel{d}{\longrightarrow} \mathcal{N}_2\left(\boldsymbol{0},\boldsymbol{I}_2\right).
  4. \sqrt{n}\hat{\boldsymbol{R}}(\hat{\boldsymbol{\theta}}_\mathrm{MLE})'(\hat{\boldsymbol{\theta}}_\mathrm{MLE}-\boldsymbol{\theta})\stackrel{d}{\longrightarrow} \mathcal{N}_2\left(\boldsymbol{0},\boldsymbol{I}_2\right).

Consider the \mathrm{Beta}(\alpha,\beta) distribution with \boldsymbol{\theta}=(\alpha,\beta) unknown and Fisher information matrix given in Example 4.17. Then, simulate N=1000 srs’s of size n from \mathrm{Beta}(\alpha,\beta) and show the scatterplots for the random vectors in a–d, as well as the contourlines of the bivariate standard normal density. Set \boldsymbol{\theta} and n to values of your choice. Use chol() to compute the Cholesky decomposition in R.

Exercise 4.25 The Gumbel distribution \mathrm{Gumbel}(\mu,\beta) has cdf

\begin{align*} F(x;\mu,\beta) = e^{-e^{-((x-\mu)/\beta)}}, \quad x\in \mathbb{R} \end{align*}

with \mu \in \mathbb{R} and \beta>0. It is used in extreme value theory to model the maximum of a number of samples of various distributions. Let (X_1,\ldots,X_n) be a srs from a \mathrm{Gumbel}(\mu,\beta) distribution.

  1. Obtain the system of equations to compute \hat{\mu}_\mathrm{MLE} and \hat{\beta}_\mathrm{MLE}.
  2. Obtain \hat{\boldsymbol{\mathcal{I}}}(\mu,\beta).
  3. Derive usable asymptotic distributions for \hat{\mu}_\mathrm{MLE} and \hat{\beta}_\mathrm{MLE}.