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

MTH6134 Statistical Modelling II

Exercises

Autumn 2022

Exercises built upon a list provided by Steve Coad, SMS (QMUL).

1.  Suppose that Yi ∼ Bin(ri,π) for i = 1, 2, . . . ,n, all independent, where the ri  are known.

(a) Write down the likelihood for the data y1 , . . . ,yn .

(b) Find the maximum likelihood estimator of π .

(c)  Prove that is an unbiased estimator of π .

2.  Suppose you have the following binomial data from a single binomial sample: r = 15,y = 3.

(a) Write down the likelihood for the data y .

(b) Find the maximum likelihood estimator of π .

(c) Using R, make a plot of the likelihood function L(π).  Examine and describe this function.

(d)  Consider the following binomial sample: r = 105,y = 21. Repeat the computation of the likelihood L(π), the maximum likelihood estimate and the plot of L(π). Compare the results with those of the original data and comment.

3.  Suppose that Yi ∼ Poisson(µ) for i = 1, 2, . . . ,n, all independent.

(a) Write down the likelihood for the data y1 , . . . ,yn .

(b) Find the maximum likelihood estimator of µ .

(c)  Prove that is an unbiased estimator of µ .

4.  The following count data 1, 2, 0, 1, 5, 1, 1, 4, are assumed to be a series of independent realizations of Poisson(µ).

(a) Write down the likelihood for the data y1 , . . . ,yn .

(b) Find the maximum likelihood estimator of µ .

(c)  Plot the likelihood function L(µ) with R. Examine and describe this function.

(d) Now suppose that you have a sample of Poisson data with the same sample value as with the data above, but with n = 16. Redo the plot of L(µ), compare with the first plot and comment.

5.  Suppose that Yi   ∼  N(βxi,σ2 ) for i  =  1, 2, . . . ,n,  all independent, where xi  is a known covariate.

(a) Write down the likelihood for the data y1 , . . . ,yn .

(b) Find the maximum likelihood estimators βˆ and 2  of β and σ 2 .

(c)  Prove that βˆ is an unbiased estimator of β .

6.  The Federal Trade Commission measured the numbers of milligrammes of tar (x) and carbon monoxide (y) per cigarette for all domestic fil- tered and mentholated cigarettes of length 100 millimetres. A sample of 12 brands yielded the following data:

Brand

x     y

Capri

9

6

Carlton

4

6

Kent

14

14

Kool Milds

12

12

Marlboro Lights

10

12

Merit Ultras

5

7

Now

3

4

Salem

17

18

Triumph

6

8

True

7

8

Vantage

8

13

Virginia Slims

15

13

(a)  Calculate the least squares regression line for these data.

(b)  Plot the points and the least squares regression line on the same

graph.

(c) Find an unbiased estimate of σ 2 .

7.  The observations 2.04, 0.79, 6.47, 2.28, 3.75, 5.61 are assumed to be independent realizations of the normal model N(µ,σ2 ).

(a) Using  R,  compute  the  likelihood  estimates =  y¯  and 2   = (yi y¯)2 /n.

(b) Formulate the estimation of µ,σ like a linear regression in R and compute the estimates , 2 . In other words, use the function lm and process its output.

8.  Suppose that Yi   ∼ N(βxi,σ2 ) for i  =  1, 2, . . . ,n,  all independent, where xi  is a known covariate.

(a) Find the Fisher information matrix.

(b)  State the asymptotic distributions of the maximum likelihood estimators βˆ and 2  of β and σ 2 .

(c) Explain why the distribution of βˆ is exact.

9.  Consider the data on manatees in Practical 1.  Use R to answer the questions below.

(a)  Produce a scatterplot of the data. Does the relationship between

y and x seem to be linear?

(b) Fit a simple linear regression model to the data. Give the values of βˆ0  and βˆ1 , and test H0  : β 1 = 0.

(c)  By examining the residual plots, comment on whether there is any reason to doubt the assumptions of the model.

10.  Suppose that Yi ∼ N(µ,σ2 ) for i = 1, 2, . . . ,n, all independent,

(a) Write down the likelihood for the data y1 , . . . ,yn .              (b)  Determine analytically the maximum likelihood estimates.

(c) Find the Fisher information matrix.

11.  Consider the model Yi ∼ N(µ,µ2 ) for i = 1, 2, . . . ,n, all independent,

(a) Write down the likelihood for the data y1 , . . . ,yn .             (b)  Determine analytically the maximum likelihood estimate.

(c) Find the Fisher information matrix.

12.  Suppose that Yi ∼ N(µi,σi(2)) for i = 1, 2, . . . ,n, all independent, where µi = xiβ and the σi  are known.

(a) Write down the likelihood for the data y1 , . . . ,yn .

(b)  Show that βˆ =  (X⊤ Σ−1 X)1 XΣ1Y is the maximum likeli- hood estimator of β . Here Σ = diag(σ1(2) , . . . ,σn(2)).

(c) Find the Fisher information matrix.

13.  Consider the following data (-1,1),  (-1,-0.4),  (0,5.7),  (0,2.8),  (1,5.7), (1,7.6), which is given as pairs (xi,yi).  Implement in R the results of the model Yi  ∼ N(µi,σi(2)) for i = 1, 2, . . . ,n, all independent, where µi  = β0  + β 1xi .  The σi  are known as σ 1(2)  = σ2(2)  = 1, σ3(2)  = σ4(2)  = 2, σ5(2) = σ6(2) = 4.

In particular,  compute the maximum likelihood estimate βˆ and its asymptotic variance-covariance matrix.

14.  Suppose that Yi ∼ Bin(ri,πi) for i = 1, 2, . . . ,n, all independent, where the ri  are known, πi = β0 + β1xi  and xi  is a known covariate.

(a) Write down the likelihood for the data y1 , . . . ,yn .

(b)  Obtain the likelihood equations.

(c) Find the Fisher information matrix.

15.  Suppose that Yi  ∼  Poisson(µi) for i =  1, 2, . . . ,n, all independent, where µi = β0 + β1xi  and xi  is a known covariate.

(a) Write down the likelihood for the data y1 , . . . ,yn .

(b)  Obtain the likelihood equations.

(c) Find the Fisher information matrix.

16.  Consider the data on diabetics in Practical 2.  Use R to answer the questions below.

(a)  Produce scatterplots of y against each of the explanatory vari-

ables. Does y appear to be linearly related to them?

(b) Fit a multiple linear regression model to the full data.  Give the

values of the estimated regression coefficients and test H0  : β 1  = 0.

(c)  Remove x1  from the model.   By examining the residual plots, comment on whether there is any reason to doubt the assumptions of the reduced model.

17.  Suppose that Yi  ∼ Poisson(µ) for i = 1, 2, . . . ,n, all independent, and consider testing H0  : µ = µ0  against H1  : µ µ0 , where µ0  is known.

(a) Write down the restricted maximum likelihood estimate 0  of µ

under H0  and the maximum likelihood estimate .

(b)  Obtain the generalised likelihood ratio.

(c) Use Wilks’ theorem to find the critical region of a test with ap- proximate significance level α for large n.

18.  Consider the  data  1,  2,  0,  1,  5,  1,  1,  4 which  are  assumed to be independent realizations of the Poisson distribution with expectation µ . We want to test H0  : µ = µ0  with µ0 = 3.

(a)  Obtain the numerical value of the generalised likelihood ratio

Λ(y) and discuss about the distribution of this statistic to per- form the test H0  : µ = µ0 .

(b) Use Wilk’s theorem to test H0  : µ = µ0  and write your conclu-

sions.

(c)  (extra) Using the normal approximation to the data, perform the test H0  : µ = µ0  and compare with the earlier results.

19.  Suppose that Y ∼ Bin(r,π), where r is known.

(a)  Show that this distribution is a member of the exponential family.

(b) Explain why the distribution is in canonical form and write down

the natural parameter.

(c) Use the general results for E{a(Y)} and Var{a(Y)} to verify that E(Y) = rπ and Var(Y) = rπ(1 − π).

20.  Suppose that Y ∼ N(µ,σ2 ), where σ 2  is known.

(a)  Show that this distribution is a member of the exponential family.

(b) Explain why the distribution is in canonical form and write down

the natural parameter.

(c) Use the general results for E{a(Y)} and Var{a(Y)} to verify that E(Y) = µ and Var(Y) = σ 2 .

21.  Suppose that Yi ∼ Bin(ri,πi) for i = 1, 2, . . . ,n, all independent, where the ri  are known, log{πi/(1 − πi)} = β0  + β 1xi  and xi  is a known covariate.

(a) Find the Fisher information matrix.

(b)  Obtain the asymptotic distributions of the maximum likelihood estimators βˆ0  and βˆ1  of β0  and β 1 .

(c)  State the approximate standard errors of βˆ0  and βˆ1 .

22.  Suppose that the continuous random variables Y1 , . . . ,Yn  have distri- butions depending on the parameters θ 1 , . . . ,θp  and that their ranges do not depend on the parameters.  Let L(θ;y) and l(θ;y) denote the likelihood and log-likelihood of the parameter vector θ, respectively.

(a)  Show that

l(θ;y) 1 L(θ;y)

=

∂θj             L(θ;y)     ∂θj       .

(b)  Prove that

E { } = 0.

(c)  By differentiating the identity in part (a) with respect to θk, prove

that

E { } = E { } .

23.  Consider the data on beetles in Practical 3.   Use R to answer the questions below.

(a) Fit the logistic, probit and extreme value models. Which of these

provides the best description of the data?

(b) Using suitable plots, assess which of the link functions is best.

(c)  Obtain the fitted values of the chosen model. Plot both the pro- portions and the fitted values against the doses.

24.  Suppose that Yi   ∼ Poisson(µi) for i  =  1, 2, . . . ,n,  all independent, where log(µi) = β0 + β1xi  and xi  is a known covariate.

(a) Find the Fisher information matrix.

(b)  Obtain the asymptotic distributions of the maximum likelihood estimators βˆ0  and βˆ1  of β0  and β 1 .

(c)  State the approximate standard errors of βˆ0  and βˆ1 .

25.  Suppose that Yi ∼ Bin(ri,πi) for i = 1, 2, . . . ,n, all independent, where the ri  are known, log{πi/(1 − πi)} = β0  + β 1xi  and xi  is a known covariate.

(a)  Show that the maximum likelihood estimate of πi in the maximal

model is yi/ri .

(b)  Obtain the generalised likelihood ratio.

(c) Use Wilks’ theorem to find the critical region of a test with ap- proxinate significance level α for large n.

26. A researcher wishes to know if consumption of caffeine improves per- formance on a memory test.  There were 30 volunteers for each dose of caffeine  (x), in milligrammes, and the number of volunteers who achieved a grade A in the memory test (y) is recorded. Below are the results.

x

0

50

100

150

200

250

300

350

400

450

500

y

10

13

17

15

10

5

4

3

3

1

0

(a) Fit a logistic regression model to the data. Give the values of the

estimated regression coefficients and assess the goodness of fit of the model.

(b) Add x2  to the model.  Is there evidence that this model is an

improvement over the two-parameter one?

(c)  Obtain the fitted values of the new model. Plot both the propor- tions and the fitted values against the doses.

27.  Consider the count data in Practical 4. Use R to answer the questions below.

(a)  Produce a scatterplot of the data. Is the variance constant?

(b) Fit a linear model to the data. Give the fitted Poisson regression

model and assess its goodness of fit.

(c) Now fit a log-linear model. Which of the two models provides the best description of the data?

28.  Suppose that Yi   ∼ Poisson(µi) for i  =  1, 2, . . . ,n,  all independent, where log(µi) = β0 + β1xi  and xi  is a known covariate.

(a)  Show that the maximum likelihood estimate of µi in the maximal

model is yi .

(b)  Obtain the generalised likelihood ratio.

(c) Use Wilks’ theorem to find the critical region of a test with ap- proximate significance level α for large n.

29.  Consider the cloth data in Practical 6. Use R to answer the questions below.

(a)  Produce a scatterplot of the data. Is the variance constant?

(b) Fit a linear model without an intercept to the data.  Give the

fitted Poisson regression model and assess its goodness of fit.

(c)  Obtain the Anscombe residuals for the model. Plot their ordered values against the expected normal quantiles.

30.  Suppose that  Yi   ∼ N(βxi,σ2 ) for i  =  1, 2, . . . ,n,  all independent, where xi  is a known covariate and σ is known.

(a) Write down the Pearson residual ei(P) .

(b) Find the transformation A(x).

(c)  Obtain the Anscombe residual ei(A) .

31. In an experiment designed to assess the potency of two test prepara- tions of an insecticide relative to a standard, 60 aphids were placed on each of 12 Chinese cabbage plants. The three insecticides (w) were then applied in various doses (x), in milligrammes per litre of water, to each of four plants.  The number of aphids still alive after three days (y) is determined and the results are as follows:

x

1.2

2.4

4.8

9.6

1.2

2.4

4.8

9.6

1.2

2.4

4.8

9.6

w

1

1

1

1

2

2

2

2

3

3

3

3

y

43

37

26

15

35

27

18

7

52

44

36

28

Analyse the data by fitting probit regression models in which the probit of the proportion of aphids killed by the insecticide is related to the logarithm of the dose.