Semiconductor specialists Micron Technology (MU -5.10%) and NVIDIA (NVDA -10.19%) were big stock market winners last year. NVIDIA shares were boosted by the company's rapidly growing gaming and data center businesses, as well as its laserlike focus on artificial intelligence (AI).

Micron, on the other hand, took advantage of strong memory pricing to score revenue and earnings growth. Not surprisingly, both stocks easily outperformed the NASDAQ-100 Technology Sector Index by a substantial margin in 2017.

NVDA Chart

NVDA data by YCharts

It is likely that both Micron and NVIDIA will be able to sustain their impressive momentum in 2018, making it tough for investors to choose one over the other. If you're having trouble deciding, maybe it's best to consider the stocks in terms of your appetite for risk.

The case for Micron

Micron's biggest catalyst in 2017 was the surge in memory pricing. The prices of both dynamic random access memory (DRAM) and NAND flash memory increased substantially thanks to tight supply. Demand, meanwhile, remained robust due to the use of DRAM and NAND memory in a variety of applications ranging from data centers to solid-state drives (SSDs) and even automotive uses.

The trend of tight memory supply looks to continue in 2018. According to DRAMeXchange, DRAM supply is expected to increase 19.6% this year. By comparison, demand could grow at a faster rate than last year's 22% jump. This is great news for Micron as it gets two-thirds of its total revenue from the DRAM market.

However, a different story might unfold in the NAND market. DRAMeXchange forecasts that NAND pricing might fall 5% during the first quarter of the year as a result of lower demand from smartphones, notebooks, and tablets. The trend of NAND oversupply could continue in the second quarter as well.

But a recovery is expected in the latter half once demand comes back, thanks to an increase in the production of consumer electronic devices. Moreover, device manufacturers are expected to deploy more memory content. Counterpoint Research forecasts that the average NAND storage capacity of a smartphone will hit 60 GB this year as compared to 51.3 GB in 2017.

Smartphone production in 2018 is expected to grow 5% from last year. This should help push up demand and pricing of NAND as the year progresses, allowing Micron to sustain its momentum. Moreover, the initial weakness in NAND prices shouldn't weigh on Micron's performance as it gets the majority of its business from DRAM, with NAND representing 27% of its total revenue.

The case for NVIDIA

NVIDIA consolidated its lead in the graphics processing unit (GPU) market last year, increasing its market share to 72.8% during the third quarter of 2017. This bodes well for the chipmaker as the GPU market should witness growth not in 2018 and beyond thanks to applications across several industries.

Allied Market Research forecasts that the global GPU market will expand at an annual pace of 35.6% until 2022. NVIDIA is in the driver's seat to take advantage of this rapid growth, and it is unlikely to lose its viselike grip over this market because of the superiority of its products when compared to rival AMD.

Additionally, NVIDIA's dominating position in the GPU space means that it will become the biggest beneficiary of an increase in graphics card pricing this year. Taiwanese daily DIGITIMES says that the price of midrange and high-end graphics cards could rise anywhere between $5 and $20 this quarter, with more increases expected throughout the year.

The potential price increase will be driven by an increase in GPU demand for cryptocurrency mining, as well as from China, where graphics card demand is surging because of games such as PlayerUnknown's Battlegrounds.

So, NVIDIA's video gaming business looks set to sustain its impressive momentum, which bodes well for the company as it gets almost 60% of its revenue from this segment. However, the chipmaker will probably run into stiff competition in other areas such as data centers and automotive.

Intel (NASDAQ: INTC), for instance, is aggressively pushing its field-programmable gate arrays (FPGAs) in the data center market. These FPGA chips are programmable, so they have a flexible architecture as compared to GPUs that can only perform specific tasks. In fact, Allied Market Research forecasts that FPGAs will be in stronger demand for AI applications as compared to GPUs, creating a potential headwind for NVIDIA.

Meanwhile, Intel is also pushing efforts in autonomous cars after its Mobileye acquisition last year. And NVIDIA's automotive growth has stalled despite its early lead in this market.

Man standing in front of chalkboard on which are drawn questions marks.

Image Source: Getty Images.

The verdict

The biggest mistake that NVIDIA investors could make is remaining under the assumption that it will have a free hand in fast-growing markets such as AI and automotive. The competition is already getting intense .

So NVIDIA looks like a risky bet for conservative investors given its trailing price-to-earnings (P/E) ratio of 55, which is far above the 25.7 industry average. Micron, on the other hand, looks like a value play as it trades at just 6.7 times last year's earnings. Of course, Micron might run into some rough weather this year thanks to a possible weakness in NAND pricing, but investors won't be paying dearly to buy into its growth.

Finally, analysts seem to be more bullish on Micron, projecting an annual five-year earnings growth rate of 27% as compared to NVIDIA's 15%, making it clear which stock is a better bet considering the valuation.