辅导案例-MAST20005/MAST90058
MAST20005/MAST90058: Assignment 1Due date: 11am, Friday 30 August 2019Instructions: Questions labelled with ‘(R)’ require use of R. Please provide appropriate Rcommands and their output, along with sufficient explanation and interpretation of the outputto demonstrate your understanding. Such R output should be presented in an integratedform together with your explanations; do not attach them as separate sheets. Allother questions should be completed without reference to any R commands or output, except forlooking up quantiles of distributions where necessary. Make sure you give enough explanationso your tutor can follow your reasoning if you happen to make a mistake. Please also try tobe as succinct as possible. Each assignment will include marks for good presentation and forattempting all problems.Problems:1. (R) Let X be a random variable representing distance travelled (in kilometers) until atire is worn out. The following are 16 observations of X:41300 40300 43200 41100 39300 42100 42700 4130038900 41200 44600 42300 40700 43500 39800 40400(a) Give basic summary statistics for these data and produce a box plot. Briefly com-ment on center, spread and shape of the distribution.(b) Assuming a normal distribution, compute maximum likelihood estimates for theparameters.(c) Draw a density histogram and superimpose a pdf for a normal distribution using theestimated parameters.(d) Draw a QQ plot to compare the data against the fitted normal distribution. Includea reference line. Comment on the fit of the model to the data.2. A discrete random variable X has the following pmf:x 1 2 3p(x) θ2 2θ(1− θ) (1− θ)2A random sample of size n = 20 produced the following observations:1, 1, 2, 3, 1, 2, 1, 3, 2, 2, 2, 1, 3, 1, 3, 1, 1, 2, 1, 2.(a) i. Find E(X) and var(X).ii. Find the method of moments estimator and estimate of θ.iii. Find the standard error of this estimate.(b) Let F1, F2 and F3 denote the sample frequencies of 1, 2 and 3, respectively.i. Find the likelihood function in terms of F1, F2 and F3.ii. Find that the maximum likelihood estimator and estimate of θ.iii. Find the variance of this estimator.(Hint: write the estimator in terms of the sample mean.)13. Let X ∼ Unif(0, θ), a uniform distribution with an unknown endpoint θ.(a) Suppose we have a single observation on X.i. Find the method of moments estimator (MME) for θ and derive its mean andvariance.ii. Find the maximum likelihood estimator (MLE) for θ and derive its mean andvariance.(b) The mean square error (MSE) of an estimator is defined as MSE(θˆ) = E[(θˆ − θ)2].i. Let bias(θˆ) = E(θˆ)− θ. Show that,MSE(θˆ) = var(θˆ) + bias(θˆ)2.ii. Compare the MME and MLE from above in terms of their mean square errors.iii. Find an estimator with smaller MSE than either of the above estimators.(c) Suppose we have a random sample of size n from X.i. Find the MME and derive its mean, variance and MSE.ii. Find the MLE and derive its mean, variance and MSE.iii. Consider the estimator aθˆ where θˆ is the MLE. Find a that minimises the MSE.Some information that might be useful:E(X(1))=θn+ 1, E(X2(1))=2θ2(n+ 1)(n+ 2), E(X(n))=nθn+ 1, E(X2(n))=nθ2n+ 24. Let X1, . . . , Xn be a random sample from the lognormal distribution, Lognormal(µ, λ),whose pdf is:f(x | µ, λ) = 1x√2piλexp{−(lnx− µ)22λ}, x > 0.(a) Show that the MLE of µ and λ are µˆ = 1n∑ni=1 lnXi and λˆ =1n∑ni=1(lnXi − µˆ)2.(b) It is known that lnXi ∼ N(µ, λ). Derive a 100 · (1− α)% CI for λ.(c) (R) Consider the following dataset:0.27, 3.30, 4.58, 2.61, 0.38, 3.77, 1.11, 1.15, 4.11, 2.10,0.07, 1.74, 2.11, 12.79, 1.85, 0.30, 0.34, 1.31, 0.14, 0.74i. Assuming a lognormal distribution is an appropriate model for these data, com-pute the maximum likelihood estimate of λ and give a 95% CI.ii. Draw a QQ plot to compare these data to the fitted lognormal distribution,Lognormal(µˆ, λˆ). Is this model appropriate for these data?Hint: Quantiles of the lognormal distribution can be computed using the qlnorm()function.5. Let X1, X2, X3, X4 be iid rvs with E(Xi) = µ and var(Xi) = σ2 > 0, for i = 1, 2, 3, 4.Consider the following four estimators of µ:T1 =13(X1 +X2) +16(X3 +X4) T2 =16(X1 + 2X2 + 3X3 + 4X4)T3 =14(X1 +X2 +X3 +X4) T4 =13(X1 +X2 +X3) +14X24(a) Which of these estimates are unbiased? Show your working.(b) Among the unbiased estimators, which one has the smallest variance?2