your example does not work and contradicts with your statement.

Original article can be found here (source): Artificial Intelligence on Medium

For this to work q(xi) cannot be zero if the corresponding p(xi) is not zero. Let’s demonstrate it with an example. Let’s first calculate Ep[f(x)] and Eq[f(x)]. They should be d…