How to understand the math behind Andrew Price's embedding his beer within his glass
Putting the liquid inside of the glass wall forces the ratio given by Snell's law. Blender gives the inverse of the refraction index when exiting the glass. This brings the refraction back to that of the environment. So, if the ray enters the fluid just before it exits the glass, you get the ratio you're looking for. Yes, this means an inaccurate IOR for the small distance between these surfaces, but unless you're doing an extreme closeup of the edge of this manifold, I don't think you will ever see it in a render. 

Your other options are creating a mesh for the liquid that has an ior that corrects for this ratio, but where does that mesh lie? Is it exactly on the glass mesh? In this case you get the same flickering artifacts seen with doubled faces elsewhere. If you space this mesh just beyond where the ray exits the glass, you will have inaccurate results which are more visible in renders. You can of course make a completely new mesh at the interface that is a combination of the glass and the beer, but what happens if you need the beer to slosh around? This turns into a very complex animation. 

So, basically putting the beer slightly inside of the glass gives you semi accurate results that seem to give the best trade-offs for accuracy and usability. It's easy to animate, it eliminates the need for multiple meshes and separate materials for the sides and top of the beer. I'm trying to explain this without illustrations, but hopefully you follow.