Pointwise Mutual Information

Probability Theory DS practice problem on Onlearn.

Difficulty: medium.

Topics: Understanding Compute Pointwise Mutual Information, Pointwise Mutual Information, Joint Probability, Marginal Distribution, Log-Likelihood Ratio, Independence Assumption, Probability & Statistics, Information Theory, Natural Language Processing, Data Mining, Computational Linguistics, Probability Distributions, Entropy Measures, Co-occurrence Analysis, Statistical Inference, Feature Engineering.

Implement a function to compute the Pointwise Mutual Information (PMI) given the joint occurrence count of two events, their individual counts, and the total number of samples. PMI measures how much the actual joint occurrence of events differs from what we would expect by chance.