That's completely different.
You can run an ice cream shop better than other ice cream shops. You can differentiate your product. You can do all kinds of things to "beat" those small business statistics.
In a market, your money is the same as anyone else's money. You don't have an edge. If you put $1 into a stock, it's the same as someone else putting $1 into that stock. You can't differentiate your dollar from theirs and make it perform better in the same stock/share.
It's similar to the ice cream shop because you can do lots of things better than a lot of people. It's your ability to analyze the financial information, the overall strategy you are using, you can do due diligence on who is running the company, you can already have an expertise in the industry the company is in, you can choose to buy the stock at a relative low point and sell at a relative high point. You can look at very small companies that the big players won't bother with. You can find or strongly consider information that most ignore. You can wait until the economy is in the middle of a recession to start investing in individual stocks and hold them until the economy recovers and then sell them and invest it back in an index fund. There's like an unlimited amount of things you can do to beat the market.