For the period 1987 to 2012, the S&P Index has risen about 550% yielding an average annual return of more than 20% (S&P 500 Index History by Prime Rate, S&P 500 History). For the same period, residential home prices only rose about 186%, amounting to less than 8% annual return (S&P/Case - Shiller National Home Price Index).
So it seems that stocks give you a greater return but it is without risk so you have to know what you are doing. Real estate is an active business. Compared to stocks, where you sit back and collect divided checks, there's a ton more work to real estate investing. If you don't know how much money you can make on an investment property, you should figure that out before venturing in to one.