People have likely been betting since the beginning of human history. There is evidence of gambling from China on tiles unearthed from around 2000BC which look like they were used for a game of chance. A pair of dice have been uncovered from an Egyptian tomb from 3000BC. Ancient Greeks and Romans gambled on all sorts of things
The first playing cards appeared in China around 800AD. Nowadays, cards and dice are used in casinos and in homes all over the world for playing games of chance.
The modern mathematics of chance began with two French mathematicians, Fermat and Pascal in 1654. They answered a question about how money should be divided between two players playing a game of chance that couldn’t be finished. In the game, each player had an equal chance of winning each point and three points were needed to win. Both players had bet 32 gold coins, winner takes all, but the game was stopped when one player had two points and the other had one point. How should the 64 gold coins be divided?
Fermat gave his answer in terms of the chances. At most, it would take two more points to decide who wins the game. There are four possible ways for the two points to be shared, each equally likely.
So there are three ways for player one to win but only one way for player two to win. This is a ratio of 3:1 and the 64 gold coins should be shared out in this ratio.
Player two gets gold coins and player one gets the rest, 48.
Pascal solved the question in a slightly different way.
The game is stopped at two-one to player one. Suppose player two wins the next point. Then the game would be level at two points each. If the game stopped at two-two, then each player would be entitled to 32 gold pieces. Player one gets his 32 pieces because he already has two points but player two’s depends on what really happens in the previous round. That round can be treated as a single game for the 32 gold pieces. Each player has an equal chance of winning the 32 gold pieces, so each player should get half of this which is 16 gold pieces. So, player one gets 32 + 16 = 48, and player two gets 16.