Title figure out likelihood by hand NGroups 1 Calculation Begin Matrices; E symm 2 2 ! Expected Covariance Matrix H full 1 1 ! One half T full 1 1 ! Two M full 2 1 ! Mean vector P full 1 1 ! Pi X full 2 1 ! Observed Data End Matrices; Matrix E 1 .0 1 Matrix H .5 Matrix M 0 0 Matrix P 3.141592 Matrix T 2 Matrix X 1 2 Begin Algebra; O=T*P*\sqrt\det(E); ! Fractional part, 2pi*sqrt(det(e)) Q=(X-M)'&(E~); ! Mahalanobis Distance R=\exp(-H*Q); ! e to the power -.5*Mahalanobis distance S=-T*\ln(R%O);! minus twice log-likelihood Z=-T*\ln(\pdfnor(X'_M'_E)); End Algebra; End Group;