scripts for computing cached mean of vector and cached inverse of matrix