History is a scientific doctrine, not an exact science, so Math can fail if applied to it. And this is due to a very simple reason: free will. Humans are partially irrational, it's our nature. This make math partially useless to examine history.