Ambrose Bierce said this quote

Lottery: A tax on people who are bad at math.