1
$\begingroup$

As per my understanding KL divergence can be used to check the divergence between two probability distributions, but is there a cutoff value of KLD, above which we say the distributions are different and below which we say they are same?

Edit: I understand 2 distributions are same if any only if kld is 0, but is there a statistical check like hypothesis checking and p values. for example the p value need not be 0 but even if p <0.05 we treat the means/proportions are different in hypothesis testing

Here is the usecase, I have in mind for using KLD to compare distributions. say I am doing an AB test, I randomized users into Test and control, wanted to check if the proportion/distribution of different covariates (age, usage type) in test and control are same and for this, I wanted to use KLD to check for the distribution divergence and looking to see if there is a cutoff above which we can say the distributions are different.

$\endgroup$
5
  • 3
    $\begingroup$ Two probability distributions are the same if and only if the KL divergence is 0: see en.wikipedia.org/wiki/Gibbs%27_inequality. So if the KL divergence is greater than zero, the two probability distributions must be different. $\endgroup$ Commented Aug 17, 2020 at 3:09
  • $\begingroup$ Thanks, but instead of exactly 0, is there a a way to check for any other small values of KLD. please see my edit $\endgroup$
    – tjt
    Commented Aug 17, 2020 at 3:13
  • 1
    $\begingroup$ You have added the "hypothesis testing" tag. Are you asking about what to do when you have some sample of data and wish to test whether the data belong to some distribution using an estimate of the KLD between some statistics of the sample and a particular distribution? Or something else? $\endgroup$
    – Sycorax
    Commented Aug 17, 2020 at 3:14
  • $\begingroup$ @Sycorax the tag might not be completely relevant, please edit to add appropriate tag, I couldn't locate one. please see the edit for the question, based on your comment $\endgroup$
    – tjt
    Commented Aug 17, 2020 at 3:21
  • $\begingroup$ @Sycorax If my answer is 'Yes' to your question (I have a sample and wish to test if the data belong to some distribution using an estimate of KLD between the sample and a fixed distribution or estimate of KLD between 2 samples), can you please let me know, if there is a way $\endgroup$
    – tjt
    Commented Oct 16, 2020 at 6:02

1 Answer 1

3
$\begingroup$

Two things you might think of, but that don't work

  1. $P$ is a distribution, $\{X_1,\dots,X_n\}$ a set of $n$ iid observations giving empirical cdf $\mathbb{P}_n$. What is the distribution of $KL(\mathbb{P}_n,P)$ (or the reverse) when the data are sampled from $P$, and is the observed $\mathbb{P}_n$ consistent with that

  2. $\{X_1,\dots,X_n\}$ and $\{Y_1,\dots,Y_m\}$ are each an iid sample from some distribution, with empirical CDFs $\mathbb{P}_X$ and $\mathbb{P}_Y$ respectively. Is $KL(\mathbb{P}_X, \mathbb{P}_Y)$ consistent with them being sampled from the same distribution?

The reason these don't work is that (at least for continuous underlying distributions) the KL divergence will typically be infinite because the distributions aren't mutually absolutely continuous. More precisely, any continuous and any discrete distribution have infinite KL divergence, and any two empirical distributions have infinite KL divergence if each one has a value that doesn't occur in the other.

In situations with discrete data and large enough sample size, where you can compare two empirical distributions or a theoretical distribution and an empirical distribution, this will reduce to something close to the multinomial likelihood ratio test.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.