Distance Correlation for Measuring Metadata Dependence
Statistical Inference DS practice problem on Onlearn.
Difficulty: hard.
Topics: Understanding Non-linear Dependence via Distance Correlation, Distance Covariance, Distance Variance, Double Centering Matrix, Pairwise Distance Matrix, U-statistics, Probability Theory, Statistical Inference, Multivariate Analysis, Linear Algebra, Non-parametric Statistics, Independence Testing, Euclidean Distance Metrics, Matrix Double Centering, Covariance Structures, Dimension Reduction.
Implement a function 'distance correlation(x, y)' that computes the distance correlation between two vectors x and y. Unlike Pearson correlation, distance correlation is capable of capturing non linear relationships. Your implementation must compute the Euclidean distance matrices, perform double centering, and return the final correlation coefficient.