Visit your childhood home, and you might find the back yard smaller than you remember it. Grab a familiar package of food today, and it might also seem smaller. But while the yard is probably the same size it always was, that package of chips or tuna probably has shrunk. That's a bummer for consumers, but it can be a boon to investors.

Prices generally rise over time -- that's an economic fact of life. In response, companies gradually raise the prices they charge us. However, prices for many commodities have recently surged so dramatically that companies incorporating those items in their wares aren't comfortable hiking prices enough to cover those increases. Thus, many companies are quietly shrinking the size of their products -- sometimes in tandem with price increases.

Lumber prices have nearly doubled over the past year, but Procter & Gamble (NYSE: PG) can't get away with doubling the prices of its Bounty paper products. Instead, it cut the number of sheets in a Bounty roll by 7%. Salty-snack giant PepsiCo (NYSE: PEP) has shrunk the chip content in its Lay's, Doritos, Tostitos, and Fritos packages by roughly 12% to 20% in the past two years.

This situation stinks for those who buy various foodstuffs, but it's good news for investors, since smaller portions can help a company to boost its profit margins. Even if commodities rise a lot, profit margins won't take as big a hit as they would have, had products stayed the same size.

Skyrocketing commodities
Ketchup purveyor H.J. Heinz (NYSE: HNZ) has seen wholesale tomato prices more than triple in the last year or so, with further increases expected. Thus, it cut the size of its Heinz 57 sauce bottles by 11%. Hershey (NYSE: HSY), facing a more than 100% rise in cocoa futures over the past three years, responded with a new "Reese's Minis" product. It costs a little more than regular Reese's Miniatures, even though it comes in an 8-ounce package instead of the old 12-ounce bag. The company also hiked almost all its prices by about 10%.

When commodities surge so strongly in value, it can be hard for companies to keep up -- but they do what they can to minimize their pain. More happily for investors, commodities tend to be volatile. If they fall just as sharply in value, don't expect food companies to quickly cut their prices. The higher costs and smaller packages are likely to stick, plumping up bottom lines.

When you consider that many of these products are huge sellers, bringing in more than $1 billion apiece annually, it's clear that a relatively small price hike or portion reduction can have a huge effect on the bottom line. Such shrewd moves can make already compelling stocks even more appealing.

If you like the idea of having more winners in your portfolio, take a look at these five stocks. The Motley Fool bought them all, and our analysts think they're good long-term prospects.