Solution

ID: past-exam-of-the-simulation-and-statistical-programming-course-of-the-university-of-oxford/2023/3/c/iii/solution

The Cholesky decomposition gives . If , reversal of factors in a matrix inverse gives
Hence the required R implementation is
invsigma <- function(sigma) {
  L <- mychol(sigma)
  B <- ltinv(L)
  crossprod(B)
}
Here crossprod(B) computes . Using tcrossprod(B) would compute , which generally differs from . Both helper functions preserve the one-by-one matrix case.

New to topics? Read the docs here!