I recently returned from a trip to California. While there, I heard a radio ad for the state lottery, encouraging people to play, because the listener could "win big!" Dollar signs dance in front of our eyes when we hear this. We dream of what we can do with the $19.9 million a recent player of Powerball won.

Don't retire yet, though. Lotto games like Powerball have been called nothing but a tax on people who are bad at math. Me? I would much rather see dollar signs dancing in my broker's account. Buying stocks is a much more effective path to wealth than gambling through state-sponsored lotteries.

What are the odds of that?
The Powerball lottery, playable in many states, offers a 1-in-120 million chance of winning the jackpot. How is this calculated? In Powerball, there are five white balls drawn from a pool of 53, and one red ball drawn from a pool of 42. For the white balls, the first one chosen has a 1-in-53 chance of being a winner. The next one has a 1-in-52 chance, because one has already been taken out. Similarly for the third, fourth and fifth balls, your odds are 1-in-51, 1-in-50, and 1-in-49. The order of the balls does not matter, since you are a winner no matter how the numbers are arranged. Finally, the red ball has a 1-in-42 chance.

To calculate the chance that any single combination of balls will be chosen, where the order is unimportant, multiply the chance for each white ball individually and divide by the number of ways those five can be arranged. Then multiply by the chance for the red ball. This is 1 in 53 x 52 x 51 x 50 x 49 / 120) x 42 -- or 1 in 120,526,770. This means you will not win the jackpot 99.99999917% of the time. You have a better chance of flipping a coin and getting heads 26 times in a row than you do of winning the Powerball jackpot. Don't believe me? Try it and see.

In an honest lottery, every single combination has an equal chance of "hitting." Yet hucksters of improve-your-lottery-chances "systems" like Ken Silver of the Honest Lotto Link System make statements like "The system works mainly by eliminating the millions of number combinations that won't win. For example, you'll never see 1, 2, 3, 4, 5, 6 in a winning draw... that is next to impossible." Well, sorry to disillusion you, Mr. Silver, but that particular combination is just as likely as 32, 17, 50, 9, 23, 27, or any other combination. It only appears to be unlikely because we humans think it is less random.

Finally, in lotto games, not only are your chances of winning poor, but your expected payback is less than half of what you expected. The "house" -- that is various state governments -- keeps, on average, 50% or more of what is wagered. At least in Las Vegas or Atlantic City, the house only keeps about 8% of the money bet in slots, 5.26% of wagers in double-zero roulette, and about 0.5% from standard play blackjack. Companies like MGM Mirage (NYSE:MGM) and Caesars Entertainment (NYSE:CZR) make a very good living doing this. Despite these facts, thousands upon thousands of people play state-sponsored lotteries every day. I admit, on occasion, I have too.

Isn't buying stocks gambling, too?
Many people argue that buying stocks is gambling, and that your chances of losing money are just as bad. This kind of thinking is wrong on several counts. First, the expected annual return is roughly 10-11% (the 30-year average for the S&P 500), which at least enables you to recover your original principal and then some, unlike most instances of gambling. The house does not have a take, aside from commissions, which generally amount to substantially less. Second, gambling is based on precise rules of probability; the stock market is not. Third, when you buy a stock, you are buying a portion of a business that is in existence to make money and return that money to its owners. You are not wagering your money on the impersonal spin of a wheel.

Rather than randomly picking stocks, by doing some simple research you can improve your "odds." Read what the company has to say about itself, both now and in the past. Read the annual report. Crunch a few numbers, such as Return on Equity. If you need help, the Fool has some tutorials. People take hours deciding what car to buy -- for something that loses value over time. Shouldn't you put some time into a decision about an asset that you want to gain in value?

Of course, buying stocks can be akin to gambling. Buy on a tip (guilty!), because the sector is "hot" (guilty!), or without doing any more research than reading one article (did this one, too). Just don't be surprised if, like gambling, you end up losing money (as I did). However, if you want to actually make money, you will have to invest some time. Educate yourself about investing and the companies that interest you. Take the idea of margin of safety to heart.

If you want decent returns and do not have the time or inclination for picking your own stocks wisely, at least put your money into a broad market index fund. Over long periods of time, the broad market has returned an average of 11% per year, which is a lot better than the expected loss of 5.26% each time you make a bet at the roulette table.

Investing and growing your money is a long-term strategy. Unfortunately, there are no shortcuts to getting rich, despite what that California lottery ad might have said.

For more on gambling:

Love to talk about gambling? Check out our Gamblin' Fools message board.

Fool contributor Jim Mueller hasn't bought a lottery ticket in some years, but he does occasionally play blackjack. He does not own shares in any company mentioned. The Fool is investors writing for investors.