(bimplement the em algorithm pseudo code in python comment on which factor you think is important in determining the labor participation rate of women living in the usa in the let be projection matrix show that the diagonal elements of all lie in the interval [ in particularfor xxin theorem the leverage value pi :pii satisfies pi for all consider the linear model xb in ( )with being the model matrix and having expectation vector and covariance matrix in suppose that - is the least-squares estimate obtained by omitting the -th observationyi that isx - argmin ( > ) , - be the corresponding fitted value at xi alsoy- > where > is the -th row of let define bi as the least-squares estimator of based on the response data ( :[ yi- - yi+ yn ](aprove that - bi that isthe linear model obtained from fitting all responses except the -th is the same as the one obtained from fitting the data ( (buse the previous result to verify that yi - (yi yi )/( pii )where xxis the projection matrix onto the columns of hencededuce the press formula in theorem take the linear model xb ,where is an model matrixe and cov(es in let xxbe the projection matrix onto the columns of (ausing the properties of the pseudo-inverse (see definition )show that ppp (blet be the (randomvector of residualswhere py show that the -th residual has normal distribution with expectation and variance ( pii (that iss times minus the -th leverage(cshow that can be unbiasedly estimated via : ky yk ky xb bk np np ( [hintuse the cyclic property of the trace as in example consider normal linear model xb ewhere is an model matrix and ( in exercise shows that for any such model the -th standardized residual ei /( pii has standard normal distribution this motivates the use of the leverage pii to assess whether the -th observation is an outlier depending on the size of the -th residual relative to pii more robust approach is to include an estimate for using