Investing IS Gambling
Some investors will claim that investing is not gambling if you conservatively invest in a business you understand, with high quality management, low valuation and large margin of safety but the fact is, even under those conditions (if you can find them!) you are dependent on the status quo persisting. There are always unknowns, and uncertainties and therefore the best you can generally hope for is to be right more often than you are wrong and control your losses when you are.
You can, of course, do a lot to ensure the probabilities work in your favour by understanding companies, building in a margin of safety and being conscious of valuations but you will still get it wrong at times which is why diversification is important.
There is significant debate over how much diversification is necessary. Some funds invest in hundreds of stocks, some in as few as 25 to 30. If you have high conviction fewer stocks will generate higher returns but given you always have a black swan risk it will also increase the downside risk.
This is why I invest in a combination of funds and specific stocks since funds provide a cheap way of diversifying across a large number of companies and geographies but I also have the opportunity of increasing my potential returns when I do have conviction that a company is undervalued.