Hello, dear friend, you can consult us at any time if you have any questions, add WeChat: daixieit

MATH5806 Applied Regression Analysis

Term 2, 2022

Assignment 1

Exercise 1 [15 marks]

The truncated Normal distribution corresponds to a restriction of the Normal distribution to some subset [a,b];a,b ∈ R,a < b of the real line (R). We consider X to be a random variable following the truncated Normal distribution with location µ ∈ R and scale σ > 0 if it has probability density

function (pdf)

fX (x;µ,σ,a,b) =   ,    x [a,b],

where ϕ() and Φ() respectively denote the pdf and cumulative distribution function (cdf) of the standard Normal distribution.

In this exercise we will consider a truncation on [1, ∞) (i.e., a = 1 and b = ∞) and set σ = 2 to focus on a one parameter distribution.

1.  Calculate the expected value of X for general µ and then evaluate it at µ = 2.5 (Provide details of your working).  [1 mark]

2. What is the probability that X take a value less than 3 for general µ and for µ = 2.5? (Provide details of your working) [1 mark]

3.  Show that this one parameter distribution belongs to the exponential family of distribution. Specify whether it is of canonical form and if so, what the natural parameter is.  (Provide details of your working) [1 mark]

4. Using the R package  extraDistr we generate a sample x of 300 observations from the truncated normal distribution on [1, ∞) with µ = 2.5 and σ = 2 using the following lines of code:

1   #   Install   the   package   if   needed                                                                                                         2   #   install . packages (" extraDistr ")                                                                                                      3    library (extraDistr)                                                                                                                                     4    5   mu   < -   2.5                                                                                                                                                             6    set . seed (2022)                                                                                                                                                 7   n   < -   300                                                                                                                                                                8    data   < -  rtnorm(n=n,  mean=mu,   sd=2,   a=1)                                                                                     

For the observed sample x (object data in the above code), write down the log-likelihood function and evaluate it at the true parameter value θ = 2.5 (Provide details of your working).

[1 mark]

5. For the observed sample x, write down the expression for the score statistic U(µ;x) and evaluate it at the true parameter value µ = 2.5 (Provide details of your working).  [1 mark]

6. Implement the Newton-Raphson algorithm to find an estimate of µ such that the score function is equal to zero. Considering the starting value µ0  = 0, print out the value of µ (m) for m = 1, . . . , 6.  [1 mark]

7. It is clear that we need to use numerical methods to calculate the maximum likelihood esti- mator. The previous question considered the Newton-Raphson algorithm but other options are also possible.  For the observed sample x, find numerically the value of the maximum likelihood estimator  by considering:

(a)  Solving U(;x) = 0 using the uniroot() function available in R. [1 mark]

(b) Maximising the log-likelihood function using the optim() function available in R (con-

sider the optimisation method "Brent").  [1 mark]

8. What is the mean and variance of the Score Statistic U(θ;X)? Deduce the sampling distri- butions of U(θ;X) and  =  P Xi  (Provide details of your working).  [3 marks]

9. Provide a 95% confidence interval for µ using the maximum likelihood estimator  .   [2

marks]

10. Let us know consider that σ is also a free parameter. We fit the two-parameter (µ,σ) trun- cated Normal distribution to the data generated in (4) and obtained the following maximum likelihood parameters:  = 2.735677 and  = 1.812815.

Use the deviance to test whether we should reject the null hypothesis H0  : σ = 2 for a level of significance α = 0.01.  What is the observed value of the test statistic and what is the value of the critical value? What conclusion can you draw?  [2 marks]