Gambling inspired her to create a mathematical model of high stakes betting in 1851. The idea failed, however, and she lost thousands of pounds.