Our unplanned theme this week is leaders taking risks.

Tuesday it was Caterpillar CEO Doug Oberhelman’s high-stakes (but unsuccessful) bet on commodities and emerging markets, which is costing him his job. Yesterday it was the staggering risks that Neflix CEO Reed Hastings, Apple chief executive Tim Cook, and Alphabet head Larry Page are taking in the vast digital economy. And today’s risk-taker is Walmart CEO Doug McMillon. He’s changing strategy at the world’s largest public company, and the change will cost billions before it has a chance to pay off significantly. For investors, employees, and him personally, much depends on whether his big bets are winners.

His most visible move has been unilaterally raising the pay of entry-level workers and department managers. The logic was simple. Shoppers were giving Walmart wmt terrible scores in surveys and were visiting the stores less; sales were falling, At the same time, the company’s most important competitor strategically was and is Amazon amzn .

McMillon reasoned that to keep customers away from other stores and from Amazon, he needed to give shoppers a better experience in Walmart stores. And the way to get the happier, better qualified workers who would deliver that experience, he figured, was to pay them more. The move made sense, but it had to work in practice as well as in theory because it would immediately increase the company’s annual costs by over $1 billion.

Less visible but possibly more important was his decision to offer employees significantly more training. Their ability to perform better is only the beginning of the benefits. Training attracts higher-caliber workers who are seeking a career, not just a temporary job. So you attract better workers, then you make them still better through training—while also reducing turnover. Sounds like every retailer’s dream, but again, it costs before it pays. To pursue this initiative, Walmart is organizing some 200 training sites.

 

McMillon is making yet another big bet, last month spending $3.3 billion to buy Jet.com, an e-commerce startup that was not obviously successful. But he knows that if Walmart can’t compete strongly against Amazon, then it’s headed eventually for second-tier status in retailing. McMillon has made Walmart.com a top priority since becoming CEO in 2014, but he’s still way behind Amazon in online revenue—$14 billion worldwide in a recent 12-month period vs. Amazon’s $83 billion. Jet.com brings technology that helps customers save money, a good fit with Walmart, and it brings talent led by founder Marc Lore. But whether the hefty investment will pay a decent return is anybody’s guess.

Early signs are that McMillon’s investments in higher pay and more training are working. Customer satisfaction is way up and sales are rising again. It remains to be seen whether McMillon, who just turned 50, is the CEO Walmart badly needs for a revolutionary era in retailing, but he seems to understand that taking major risks and living with significant uncertainty is his only chance.

Sign up for daily insights, updates, and opinion on leadership and leaders in the news at the Power Sheet.