Of course, that's never the case in real life. Imagine the time you would spend worrying about your investment and analyzing when it will go out or go down or when to exit, etc. If you convert that into money say $20/hr, is it still worth it to invest as suppose to buy the PowerBook?
Better yet compare it to the efficiency you have gained by having a PowerBook, or if you are a hacker, how much more you'd have learned by having a computer then. How would you even go about quantifying that?
Now before I get blasted for that comparison, obviously the lottery which is meant to be random is not exactly equivalent to an open market where information flows can mitigate some of the risk and provide indicators of good potential investments. But, investments are always a risk regardless especially as you are just getting out of school, have loans, and don't have much money you can afford to loose in bad investments.
Having graduated from grad school two years ago myself I've been doing the following: 1) In general I've been paying off my loans as quickly as possible as their interest rates are higher than the rates of returns I would see from putting money into the market. 2) Because the market was in a special place after grad school, I've temporarily violated my #1 rule and put about half of my spare money into retirement funds tied to the market as it was fairly obvious that the market would probably rebound strongly (which it did, yay!). 3) As the market's rebound levels off I'm redirecting more and more money back to my loans. 4) If you're going the route of retirement funds, invest in Roth IRAs before you're making too much to not be able to invest in them.
Once you have reduced your debts then take your money and go play in the market, but only with money you're willing to loose.
BTW - I realize that my current investment strategy is pretty conservative, as I'm attempting to experiment with living nearly debt free. I would love to hear alternative theories if there are any.