Theory of the compensation law and its application in biology