I don't understand the advantages of pool mining if you want to maximize your return. It seems like all it does is even out your return to make it more predictable by paying you smaller amounts more often rather than nothing for long periods punctuated by an occasional 25 BTC. But in the end won't you end up making the same amount, if not less (considering the pool operator's profit) by joining a pool?
Yes, but it's a similar situation to taking out insurance - many people would rather pay a known regular amount to insure their car than take the chance that they'll have to pay a large amount occasionally. Like pool mining, insurance usually works out in favour of the other party, but it's still valuable in order to reduce your variability.
If you have enough mining hardware operating that your payments are relatively regular, then it would likely earn you more to solo mine. If you would only solve a block very occasionally, you are taking a significant risk you'll get a low reward or nothing at all.
However, you also need to run bitcoind to solo mine, whereas you don't when pool mining. The more mining hashpower you have, the more bandwidth pool mining will use, but running a node will use a roughly constant amount of bandwidth. Update: pools are now available that avoid this problem (Thanks, Dr Haribo).
Back in the days when I mined with my GPU, I would've had to upgrade my internet account if I left the client running 24/7, which would have cancelled out any benefit from solo mining.
While correct in principle, consider that mining difficulty has a pretty strong upward trend. This indicates that your relative hashing power (you compared to the difficulty/whole network) is greatest when you first start mining and it decreases over time. With some very rough estimates at the present difficulty of 10 million, 1 gigahash of computing should average one block solution every 16 months or so. But that's if the difficulty doesn't increase, which it will. As the difficulty increases, that extends the number of days it will take, on average, to solve a block.
It is certainly possible that you will solve the first block you attempt. But you also may not solve a block for a year or more. If you're on the unlucky side, you will have nothing to show for the duration of time when your relative hashing power was greatest. Consider somebody who engaged in CPU mining back near the beginning. Once the GPUs came on board, his chance of solving a block became miniscule. With ASICs joining the fray, the CPU miner has a completely unprofitable situation. If he was solo mining and didn't get lucky early on, at this point, he's probably never going to pay for his mining investment.
Bottom line: pool mining is a way to nearly guarantee that you will profit from your mining equipment's most profitable days. If your solo mining setup is such that your average block solution can be measured in days rather than months, you may come out ahead by solo mining.
Another consideration: solo mining involves running a node, which is good for the network. It is also good for the network to have hashing power spread out among many pools, and solo mining is a pool of 1.
Yes, on average the expected return would be the same if not lower while mining in a pool due to fees. However, it greatly reduces the variance.
If you have 0.01% of the total mining speed, you would be expected to generate a block every 10000 blocks at a 50% probability. Reaching 95% probability would be a few times less often, about 1 in 50k. Joining a pool would mean you get smaller payouts more readily, so your income is less of a lottery and more of a steady pay check.