Exchange-traded funds offer a convenient way to invest in sectors or niches that interest you. If you expect the pharmaceutical industry to thrive as our global population grows, ages, and develops medical conditions needing treatment, the SPDR S&P Pharmaceuticals ETF (NYSE: XPH) could save you a lot of trouble. Instead of trying to figure out which companies will perform best, you can use this ETF to invest in lots of them simultaneously.

The basics
ETFs often sport lower expense ratios than their mutual fund cousins. The pharmaceuticals ETF's expense ratio -- its annual fee -- is a relatively low 0.35%. The fund is somewhat small, too, so if you're thinking of buying, beware of possible large spreads between its bid and ask prices. Consider using a limit order if you want to buy in.

This ETF has performed well, beating the S&P 500, on average, over the past three- and five-year periods. As with most investments, of course, we can't expect outstanding performances in every quarter or year. Investors with conviction need to wait for their holdings to deliver.

What's in it?
Several pharmaceutical companies had strong performances over the past year. Strong is sometimes too mild a word, though, as VIVUS (Nasdaq: VVUS) soared nearly 250% over the past year, roughly doubling overnight as the FDA approved its experimental weight-loss drug, Qnexa. Less exciting is the company's plan to raise big bucks by issuing new shares of stock that will dilute the value of existing ones.

Jazz Pharmaceuticals (Nasdaq: JAZZ) surged 79% as the company raised expectations for how profitable its acquisition of Azur Pharma will be and how rapid sales of its narcolepsy drug Xylem will be. (It helps that Xylem has little in the way of competition -- that gives Jazz pricing power.)

President Obama has called for increased spending on developing treatments for Alzheimer's disease, and that could benefit Eli Lilly (NYSE: LLY), among others. Lilly, up 18% over the past year, has seen disappointing results for one of its Alzheimer's treatments, semagacestat, but it also has solanezumab in the pipeline. The stock also offers a 5% dividend yield.

Other companies didn't do as well last year but could see their fortunes change in years to come. Hospira (NYSE: HSP), for example, shed 36%, but it's positioning itself to profit from "biosimilar" drugs, which look to play a bigger role in tomorrow's drug world. Still, its near-term future isn't clearly rosy, as it has been dealing with FDA warning letters.

The big picture
Demand for pharmaceuticals isn't going away anytime soon. A well-chosen ETF can grant you instant diversification across any industry or group of companies -- and make investing in and profiting from it that much easier.

Learn about the 5 ETFs That Could Soar in 2012. And if you're looking for some great investments beyond ETFs, consider these 12 Dividend Stocks for 2012.

Editor's note: A previous version of this article referred to plant shutdowns that Hospira has suffered in the past. The Fool regrets any implication that these shutdowns were still ongoing.