A Deep Dive into the Mathematics of Gambling