The Phi Coefficient
Statistical Inference DS practice problem on Onlearn.
Difficulty: easy.
Topics: Understanding Calculate the Phi Coefficient, Phi Coefficient, Confusion Matrix, Pearson Correlation, Cross-Tabulation, Binary Encoding, Probability & Statistics, Linear Algebra, Information Theory, Data Preprocessing, Statistical Inference, Correlation Analysis, Contingency Tables, Binary Classification Metrics, Vector Operations, Hypothesis Testing.
Implement a function to calculate the Phi coefficient, a measure of the correlation between two binary variables. The function should take two lists of integers (0s and 1s) as input and return the Phi coefficient rounded to 4 decimal places.