Covariance Matrix
Statistical Inference DS practice problem on Onlearn.
Difficulty: easy.
Topics: Understanding Calculate Covariance Matrix, Covariance Estimation, Outer Product, Mean Centering, Bessel's Correction, Symmetric Matrices, Linear Algebra, Probability Theory, Multivariate Statistics, Data Preprocessing, Numerical Computing, Matrix Operations, Random Variables, Dimensionality Reduction, Feature Engineering, Vector Calculus.
Write a Python function to calculate the covariance matrix for a given set of vectors. The function should take a list of lists, where each inner list represents a feature with its observations, and return a covariance matrix as a list of lists. Additionally, provide test cases to verify the correctness of your implementation.