关键词 > MAST20005/MAST90058

MAST20005/MAST90058 Assignment 2

发布时间:2023-09-12

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

MAST20005/MAST90058 Assignment 2

1.  Robert inherits an ancient coin from his granddad which is said to be the fairest coin ever minted in history; he is determined to test whether the coin is indeed fair, by using the number of heads y turning up based on 36 independent tosses.  Formally, if p is the chance of the coin turning up a head, he tests the hypothesis

Ho  : p = o.5 vs H1; p o.5.

His test is such that he would reject Ho  whenever |y — 18|  > 4.

(a)  (R) Find the size of the test. You should irst explicitly identify the particular distribution involved for its computation, and then show how you can ind it using appropriate function(s) in R.         [2]

(b)  (R) plot a power function of the test in the range p e [o.5)1].  Label your y-axis as“power in p”and x-axis as“p”.                                                                                                                                [1]

2.  Let θ(教) be a statistic that estimate a parameter θ.  Assume that se(θ(教)) is a standard error of θ(教) and is approximately distributed as N (o)1) for any θ e 政. Let a e (o)1).

(a)  Give an approximate two-sided (1 — a)-conidence interval for θ .                                                 [1]

(b)  Give a test with approximate size a for the null hypothesis Ho  : θ = θo , for a given value θo  e .  You have to specify the rejection region and the test statistic used.                                             [1]

(c)  show that Ho  is rejected by your test in (b) if and only if θo  falls outside of your conidence interval in (a).                   [1]

(Moral: Any value in a conidence interval can be considered an “acceptable”value for the parameter θ, and hence there are generally many acceptable values for θ.  This gives another reason why modern hypothesis testing abstains from “accepting a null hypothesis” )

3.  Let x1. . . xn  be a random sample of x with a population density fθ(①) parametrized by θ e . Recall that the Fisher information is deined as

In(θ) = Eθ ln fθ(xi)] = —nEθ ln fθ(x)]

where the expectation is taken with respect to the distribution under the parameter value θ .

(a)  suppose g  :  政 is a smooth invertible function, and by deining φ = g(θ), let fφ(①) be the population density of x1). . . xn  re-parametrized in  φ .   show  that  the  Fisher  information  with respect to φ has the form

In(φ) = In(g(θ)) = In(θ)

(g (θ))2

where g (.) is the derivative of the function g(.).

Hint:  You can use the facts  (i) Eθ ln fθ(xi)]  =  o and  (ii) if h(φ)  = g-1 (φ) and  h (.) is the derivative of h(.), then h (φ) = (g (g-1 (φ)))-1  = (g (θ))-1 .                                                              [3]

(b)  Let y1. . . yn  denote a random sample of size n from a poisson distribution with mean λ.  For large n, ind an approximate one-sided  1oo(1 — a)% conidence interval for g(λ) = e-) = P (y = o) that is an uppeT bound, based on normal quantiles.

Hint: use the fact that the MLE for λ is y(-) = n-1 Σ yi , In(λ) = and part (a).                    [3]

4.  Let y1, . . . , ym  be m random variables, whose means and covariances are denoted by

μi = E[yi] for 1 i m and σij  = E[yiyj] — E[yi]E[yj] for 1 i, j m;

in particular, σii  = var(yi). Moreover, deine the mean vectoT and covaTiance matTi①,

μ = (μ1 , . . . , μm)T  and Σ = (σij)1参i参m ,

1参j参m

for the  Tandom  vectoT Y =  (y1, . . . , ym)T .   The variables y1, . . . , ym  are said to have a joint normal distribution, if the random vector Y has a probability density function of the form

f(y) = exp for y e Rm.

This is denoted as Y … Nm(μ, Σ) and generalizes the bivariate normal distribution learnt in MAST2OOO4; in particular, any component yi  of Y is distributed as N (μi, σii).   Moreover, if Y …  Nm(μ, Σ), it is well-known properties (so you can take for granted) that

. For any k-by-m constant matrix B e Rk xm , BY … Nk(, BΣBT).

. y1, . . . , ym  are mutually independent if and only if all the of-diagonal entries of Σ are zero.

The following parts assume x1, . . . , xn  is a random sample from a (univariate) normal distribution with mean μ and variance σ2. In other words, X … Nn(μ1n, σ2In), where X = (x1, . . . , xn)T , 1n  is a column vector of length n illed with 1,s and In  is an n-by-n identity matrix. Let A be an n-by-n matrix deined

by

l ' ^2

' 1

A = ' ^2.3

'       . '       .(.) '


1

^n

1

^2

1

^2.3

.

.

.

1 ^(n 1)n


1

^n

O

—2

^2.3

.

.

.

. . .


1                             1

. . .

^n                      ^n

O    . . .         O

O    . . .         O

.       .           .

.       .           .

.       .           .

1

. . .    . . .    ^(n 1)n


O      '

'

O '

.(.)      '

'


in particular, if we use a1 , . . . , an  to respectively denote column vectors that are the 1-st to n-th rows of A so that A = [a1 | . . . |an]T , we have a1  = ( , . . . , )T , and for 2 三 k n

ak = ( ^ , . . .  , , , nOs )T .

It is easy to see that                                    -

AX = (x^n, U1 , U2 , . . . , Un 1 )T                                                                      (1)

where U1, U2 , . . . , Un 1  are combinations in x1, . . . , xn with coecients in A and x(-) = n 1 Σ xi.

(a) check that AAT  = In.  (Show your steps)                                                                                   [3]

(b) using (a), conclude that the components in the vector AX are mutually independent normal random variables with variance σ 2 .                                                                                                           [1]

(c) using (a), conclude that 1 ui2  = (Xi  -X(-))2 .

Hint: Note(Xi - X(-))2 = Xi(2) - nX(-)2 , and that AAT  = In  also implies AT A = In.       [1]

(d)  using (b) and (c), conclude the independence between X and S2  = (n - 1)-1 (Xi - X(-))2 .    [1]

(e) using (b) and (c), conclude that

(Xi - X(-))2 = (n - 1)S2

σ 2 σ 2

is chi-square distributed with (n - 1) degrees.  (This is an alternative way ofinding the distribution

of , where you have done it using mgfs in Tutorial week 3, question 11.)                            [1]

5.  A random number generator (RNG) can generate numbers according to a normal distribution N (μ, 1), and it purports that the mean μ for its generated numbers is exactly zero.  Robert suspects the latter claim, and consider the hypotheses

Ho  : μ = O vs H1  : μ O.

Robert decides to reject Ho  if |X|  > Φ -1 (O.975), by using a single number X requested from the RNG; he expects this test to have a size of O.O5 given what he has learnt in MAsT2OOO5.

Turns out, the RNG is glitchy, but not in the way Robert has suspected:  while  it  can  indeed  geneTate numbeTs accoTding to the N (O, 1) distTibution, a numbeT Won’t be TePoTted to RobeTt until the RNG PToduces the fTst numbeT With  absolute  value  laTgeT than O.4. precisely, the RNG will respond to Robert,s request and generate a irst number,  called y1, which is distributed according to N (O, 1).   If  |y1|   持  O.4,  the RNG will report y1  to Robert; if |y1|  参 O.4, the RNG will automatically generate another independent number y2 N (O, 1) and only report y2  to Robert if |y2|  持 O.4. If not (i.e.  |y2|  参 O.4), this process will repeat itself until the RNG produces its irst number with absolute value larger than O.4.  since Robert is oblivious to this internal mechanism of the RNG, he will take as X the irst such yi  with  |yi|  持 O.4. being generated, then X = yt, where t is deined as t = min{i : |yi|  持 O.4}.

(a)  (R) use a simulation experiment with 1 million generated instances of X to numerically approximate the actual size of Robert,s test. Remember to show your R code and result.                                  [2]

(b)  Give an exact mathematical expression for the actual size of Robert,s test.  (The evaluated value of your mathematical expression should be very close to your numerically computed approximate value in (a).)                                                                                                                                         [2]

(Moral: selection bias can produce invalid test size)

Total marks =  23