# Estimation of Error Variance

0). Our deÖnitions of the univariate and multivariate normal distributions require non-singularity ( 2 > 0 and > 0) but in some cases it is useful for the deÖnitions to be extended to the singular case. For example, if 2 = 0 then X N (; 0) = with probability one. This extension can be made easily by re-deÖning the multivariate normal distribution by the moment generating function M(t) = exp t 0 + 1 2 t 0t . This allows for both non-singular and singular covariance matrices. An important property of normal random vectors is that a¢ ne functions are also multivariate normal. Theorem 5.4 If X N (; ) and Y = a + BX, then Y N (a + B; BB0 ): The proof is presented in Section 5.20. One simple implication of Theorem 5.4 is that if X is multivariate normal, then each component of X is univariate normal. Another useful property of the multivariate normal distribution is that uncorrelatedness is the same as independence. That is, if a vector is multivariate normal, subsets of variables are independent if and only if they are uncorrelated. Theorem 5.5 If X = (X0 1 ; X0 2 ) 0 is multivariate normal, X1 and X2 are uncorrelated if and only if they are independent. The proof is presented in Section 5.20. The normal distribution is frequently used for inference to calculate critical values and p-values. This involves evaluating the normal cdf (x) and its inverse. Since the cdf (x) is not available in closed form, statistical textbooks have traditionally provided tables for this purpose. Such tables are not used currently as now these calculations are embedded in statistical software. For convenience, we list the appropriate commands in MATLAB, R, and Stata to compute the cumulative distribution function of commonly used statistical distribu CHAPTER 5. NORMAL REGRESSION AND MAXIMUM LIKELIHOOD 147 Numerical Cumulative Distribution Function To calculate P(X x) for given x MATLAB R Stata N (0; 1) normcdf(x) pnorm(x) normal(x) 2 r chi2cdf(x,r) pchisq(x,r) chi2(r,x) tr tcdf(x,r) pt(x,r) 1-ttail(r,x) Fr;k fcdf(x,r,k) pf(x,r,k) F(r,k,x) 2 r (d) ncx2cdf(x,r,d) pchisq(x,r,d) nchi2(r,d,x) Fr;k(d) ncfcdf(x,r,k,d) pf(x,r,k,d) 1-nFtail(r,k,d,x) Here we list the appropriate commands to compute the inverse probabilities (quantiles) of the same distributions. Numerical Quantile Function To calculate x which solves p = P(X x) for given p MATLAB R Stata N (0; 1) norminv(p) qnorm(p) invnormal(p) 2 r chi2inv(p,r) qchisq(p,r) invchi2(r,p) tr tinv(p,r) qt(p,r) invttail(r,1-p) Fr;k finv(p,r,k) qf(p,r,k) invF(r,k,p) 2 r (d) ncx2inv(p,r,d) qchisq(p,r,d) invnchi2(r,d,p) Fr;k(d) ncfinv(p,r,k,d) qf(p,r,k,d) invnFtail(r,k,d,1-p)