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

STAT3006/STAT7305 Assignment 2— Density Estimation and Regression

2022

Instructions

● The assignment consists of three (3) problems, each problem is worth 30 marks, and each mark is equally weighted.

● The mathematical elements of the assignment can be completed by hand, in LaTeX (prefer- ably), or in Word (or other typesetting software).  The mathematical derivations and ma- nipulations should be accompanied by clear explanations in English regarding necessary information required to interpret the mathematical exposition.

● Computation problems should be answered using programs in the R language.

● Computer generated plots and hand drawn graphs should be included together with the text where problems are answered.

● Submission les should include the following (which ever applies to you):

– Scans of handwritten mathematical exposition.

– Typeset mathematical exposition, outputted as a pdf le.

– Typeset answers to computational problems, outputted as a pdf le.

– Program code/scripts that you wish to submit, outputted as a txt le.

● Mathematical problems should be answered with reference to results presented in the Main      Text (refer, page numbers), Remarks, Exercises, and Corollaries/Lemma/Propositions/Theorems from the Lecture Notes, if required. If a mathematical result is used that is not presented in      the Lecture Notes, then its common name (e.g., “Bayes’ Theorem”, “Intermediate Value The-      orem”, “Borel–Cantelli Lemma”, etc.) should be cited, or else a reference to a text containing      the result should be provided (preferably a textbook).

All submission les should be labeled with your name and student number and archived together in a zip le and submitted at the TurnItIn link on Blackboard. We suggest naming using the convention:

[LastName_FirstName/StudentNumber]_STAT3006A2_ [AnythingElse] . [FileExtension] .

● As per my .uq .edu .au/information - and - services/manage -my -program/student - in tegrityand - conduct/academic - integrity - and - student - conduct, what you submit should be your own work. Even where working from sources, you should endeavour to write in your own words.  You should use consistent notation throughout your assignment and define whatever is required.

Problem 1 [30 Marks]

Let (Ω , B, P) be a probability space, and X (u), y (u), and Z (u) be random variables mapping to the measurable space Z>0 , 2Z>0. Define MZ  as the counting measure on Z.

● We say that X : Ω - F0, . . . , N} is binomial distributed, if PX  < MZ  has density of form pX (r; 9) = r(N)9x (1 . 9)N lx ,

where N ∈ 创 is a xed constant and 9 ∈ T = (0, 1).

● We say that y : Ω - Z>0  is Poisson distributed, if PY  < MZ  has density of form

9y exp (.9)

,

where 9 ∈ T = R>0 .

● We say that Z : Ω - Z>0  is negative binomial distributed, if PZ  < MZ  has density of form pZ (之 ; 9) = N +之(之) . 1(1 . 9)z 9N ,

where N R>0  is a xed constant and 9 ∈ T = (0, 1).

Suppose that we have IID samples (Xi )ie[n] , (yi )ie[n], and (Zi )ie[n], where Xi , yi , and Zi (for each i ∈ [n]) have image measures PX , PY , and PZ , respectively, each characterized by some generative 9*  ∈ T, for the respective definition of the parameter space T. Using each of the IID samples,  construct maximum likelihood estimators for each of the

binomial, Poisson, and negative binomial distribution generative parameters 9*  ∈ T. [5 Marks]

Let V (u) and W (u) be random variables mapping to ╱Z>0 , 2Z>0with probability measures PV  < MZ  and PW  < MZ , where P (V (u) = 0) > 0. We say that W : Ω - 创 is the zero-truncated form

of V : Ω - Z>0, if

pW (z; 9) =     pV (w; 9)    

for every z ∈ 创 and w ∈ Z>0 .

(b)

(c)

Let X/ , y/ , and Z/  be zero-truncated forms of X , y , and Z , respectively. Provide ex- pressions for the densities of X/ , y/ , and Z/ , as functions of their respective parameters

9 .

[5 Marks]

Suppose that we have IID samples (X )i(/) ie[n] , (yi/ )ie[n], and (Z )i(/) ie[n], where Xi(/) , yi/ , and Zi(/)   (for each i ∈ [n]) have the same image measures as X/ , y/ , and Z/ , respectively, and where each measure is characterized by some generative parameter 9*  ∈ T, for the respective definition of T. Using each of the IID samples, construct MM algorithms to compute the maximum likelihood estimators for each of the zero-truncated binomial, Poisson and negative binomial distribution parameters 9*   ∈ T.   In the case of the negative binomial distribution, you may also assume that  N  >  1.   (Hint:  use the definition of convexity of a differentiable function in order to generate the required majorizers.)

[10 Marks]

Using R, we can generate random numbers that are realizations of random variables with binomial, Poisson and negative binomial distributions, using the respective functions rbinom(), rpois(), and rnbinom(), respectively. Note that in the case of rbinom() and rnbinom(), the variables size and prob correspond to N and 9 , respectively. For rpois(), the variable lambda corresponds to 9 .

(d)             Write R functions for generating realizations of the random variables X/ , y/ , and Z/ . Using your random number generators, demonstrate that your three MM algorithms are working by simulating realizations of (X )i(/) ie[n] , (yi/ )ie[n], and (Z )i(/) ie[n], for n = 1000, with known parameter values 9* . You may use, for instance:

● 9*  = 1/4 and N = 10 in the zero-truncated binomial distribution simulation.

 9*  = 2 in the zero-truncated Poisson distribution simulation.

● 9*  = 3/4 and N = 10 in the zero-truncated negative binomial distribution simu- lation.

In each case, plot the path of your MM algorithm sequences  9(ν)νe[1000]  over 1000 iterations, starting from some well chosen initial value 9(0)  (you may use 9(0)  = 1/2, in each case). Discuss whether the MM algorithm is working as intended, with respect to convergence.

[10 Marks]

Problem 2 [30 Marks]

Let X (u) be a random function that maps from (Ω , B, P) to a measurable space (x, Bx ), for some x c Rd  and an appropriate a-algebra Bx , where X has image measure PX   < M (where M is either the Lebesgue or the counting measure). Let

P =,pψ  : pψ (r) = p (r; w) , w ∈ $

be a set of density functions corresponding to some probability measure on (x, Bx ), with respect to M, in the sense that

pψ (r) > 0, for each r x, and  ǐx pψ (r) dM (r) = 1.                               (1)

Here $ c Rq , for some r ∈ 创.  We say that the density pX (r) = pθ (r) of PX  is a g component mixture of densities from family P if

g

pθ (r) =← z p (r; wz ) ,

z=1

where g ∈ 创, 口z   > 0 for each  ∈ [g], and !z(g)=1 口z   = 1.  We say that the measure PX  is a g component mixture of measures with densities from P, or simply a g component nite mixture of P. Here, 9 = (口1 , . . . , 口g , w1 , . . . , wg ) ∈ T, and

T = !(口1 , . . . , 口g ) : 口z  > 0, 之 ∈ [g] ,  z  = 1 } 8 $g .

Prove that (i) pθ (r) satisfies the usual definition of a density function (i.e., (1) holds for 9 instead of w), for any xed g ∈ 创 and class P. Further, prove that (ii) the set of mixtures of countable number of components of class P is convex:

 = !pθ (r) =  z p (r; wz ) , z  > 0, wz  ∈ $, 之 ∈ [g] ,  z  = 1, g ∈ 创} .

[5 Marks]

Let 7 : R>0  - R be a convex function, and let a R0  be a xed constant vector.

Show that if

u (9) = 7 ((a, 9)) ,

for 9 = (91 , . . . , 9g ) ∈ T c R0 , then u (9) is majorized by

m (9, r) =  7 9z ,

where r = (r1 , . . . , rg ) ∈ T.

[5 Marks]

(c)

Let PPois  be defined as the family of Poisson density functions:

PPois  = {pψ  : pψ (r) = , w ∈ $ = R>0} .

Use (2) to derive a majorizer for the loss function corresponding to the negative loga- rithm of the g component nite mixture of PPois , i.e,

1θ (r) = . log pθ (r)

= . log !  z p (r; wz ) } ,

where 9 = (口1 , . . . , 口g , w1 , . . . , wg ) ∈ T,

T = !(口1 , . . . , 口g ) : 口z  > 0, 之 ∈ [g] ,  z  = 1 } 8 R0 .

[5 Marks]

We continue from Part (c).  Given IID data (Xi )ie[n], where each Xi   (i ∈ [n]) maps to  太>0 , 2>0、, and has identical image measure to X:  PX   < M , where M  is the

counting measure on 太.   Further suppose that PX   has a density function of the g component nite mixture of PPois  form:

g

pθ *  (r) =← z*p (r; wz*) ,

z=1

for some 9*  = (口1* , . . . , 口g*, w1* , . . . , wg*) ∈ T.  Construct an MM algorithm for com-

puting a maximum likelihood estimator of 9* , using the data (Xi )ie[n] . [5 Marks]

The following table describes the number of deaths of Women older than 80 years in London per day, between 1910 and 1912.

Deaths per day

Frequency 

Deaths per day

Frequency

0

1

2

3

4

162

267

271

185

111

 

5

6

7

8

9

61

27

8

3

1

Assuming that the random sample (Xi )ie[n]  (here n = 1096), corresponding to the data above, is IID, where each Xi  has the same density as X, as per Part (d), for g = 2 and generative parameter 9* . Write an R script using the algorithm developed in Part (d) to estimate 9* .  Comment on the suitability of the assumption that X has an image measure describable by a two component mixture of Poisson densities.

[10 Marks]

Problem 3 [30 Marks]

Let X (u) = (W, y), where W : Ω - w c Rd and y : Ω - $ c R. We shall assume that (Ω , B, P) is a measure space and that (w 8 $, 1 (w) · 1 ($)) is endowed with the probability measure PX . We wish to t the regression model

y s 9 (W) = a + βW ,

where 9 = (a, β) ∈ T c Rd+1 .  Using IID data (Xi )ie[n], where each Xi  = (Wi , yi ) is identical in image measure to X = (W, y), we wish to estimate the property

9*  = arg min E [1θ (W, y)],

θeT           )/     k

=(θ)

where

1θ (z, 夕) = . a . β T w 

is taken to be the l1-norm loss.

(a)              Construct an MM algorithm for computing

9ˆn  = arθ(g)eT(m)in   yi . a . β T W ,

based on (Xi )ie[n] .  (Hint: Use the fact that |a| = ^a2 , and that a -e ^a is a concave function.) Comment on any potential numerical problems, in practice, that may arise when implementing the MM algorithm that you have constructed.

[5 Marks]

A good approximation of the divergence D (a, b)  =  |a . b| is the approximate absolute value divergence

Dε (a, b) = (a . b)2 + e,

where e > 0 is small.

Fact.  Let f : 应 - R be a convex function on an open set  c Rp , and let (fm )me  be a sequence of convex functions fm  : 应 - R, such that fm (r) - f (r), for every r ∈ 应.  Then fm converges uniformly to f , on every compact set , as m - o.

(b)             Use the fact above to prove that Dε (x, 0)  : R - R>0   converges uniformly to a -e

From Part (b), we suspect that

9*  = arg min E [ y . a . β T W ]

θeT

can be well approximated by

9ε  = arg min E [Dε  ╱y, a + βT W] .

θeT

(c)

(d)

Construct an MM algorithm for computing

9ˆn,ε  = arθ(g)eT(m)in   Dε  y, a + βW,

for any e > 0, based on (Xi )ie[n] .

[5 Marks]

Describe a set of assumptions under which we can conclude that 9ˆn,ε  converges almost surely to 9ε , as n - o.

[5 Marks]

The data set cars in R contains a realization of random data ((Wi , yi ))ie[n], where Wi  ∈ R corre- sponding to the speed of car i ∈ [n] (in miles per hour), and yi  corresponds to the distance taken for car i to stop (in feet).

(e)              Assume that ((Wi , yi ))ie[n] is IID, where each (Wi , yi ) (i ∈ [n]) is identically distributed

to some random pair (W, y).  Use the algorithm constructed in Part (c) to estimate the parameter

9ε  = (aε , 8ε )

= arg min E [Dε (y, a + 8W)]

θeT

required for describing the regression relationship

y s 9ε (W) = aε + 8ε W .

Compare the estimate for different approximation parameters e > 0, and comment on whether the regression function 9ε (z) is particularly sensitive to the choice of e.

[10 Marks]