Both yes and no.
Stocks is not just pure probability like the Lottery.
There is a WAY WAY greater chance of making a profit in the stock market than the lottery.
Look at the portfolio for Berkshire Hathaway. The stocks in the portfolio are good companies to invest in.