Humans generalize to make life livable. I assume that all glass shards should be avoided, even though I only ate the one. However, we often incorrectly assume that each individual member of a group has the attributes of the whole group. For instance, it's a mistake to assume that if your lawn looks green, each blade of grass has to be green.

The so-called "division fallacy" shows up in investing when we make rash decisions based on how The Market or A Sector is performing. Sometimes this move is justified because the sector and each stock are so closely linked. Sometimes the sell-off is reactionary and just costs us money. Let's examine a recent "baby out with the bathwater" scenario to see where things went wrong, and where smart investors can look for bargains in the future.

The new razor/blade model
Green Mountain Coffee Roasters (Nasdaq: GMCR) got hammered recently when it missed expected K-Cup sales. The Fool's CAPS community has never been impressed with the company and has given Green Mountain a paltry two-star rating. In this scenario, Green Mountain was the bathwater, and it deserved to be chucked out.

SodaStream (Nasdaq: SODA) is the little pink baby that's flying out the window. The brew-your-own-soda company's stock fell 11% in the two days after Green Mountain's earnings announcement. Why did SodaStream get punished for the sins of its weird, unicycling neighbor? A vague similarity.

Doesn't look, quack, or swim like a duck
SodaStream suffered because it also sells drinks that you make at home in a base unit system. Green Mountain focuses on coffee, selling brewers and little cups of grounds that make a single cup of java on your counter. SodaStream's base is a carbonator that, like a Bed Bath & Beyond-bound alchemist, allows users to turn water into water with bubbles.

The business grew revenue by 39% in 2011 and raised its net margin to 10%. In its recent earnings release it announced a 37% increase in revenue from the same quarter in 2011. As if that wasn't enough, it also increased its net income margin to 11.5%.

As it turns out, it was a great time to invest in SodaStream. If you had picked up shares on the Friday after the fall, you'd be up more than 10% right now. That's exactly what good investors should always be looking for.

But don't take my word for it
In his book in The Intelligent Investor, Benjamin Graham points out that "the market is fond of making mountains out of molehills and exaggerating ordinary vicissitudes into major setbacks." In short: The market overreacts. To take advantage of this reality, a savvy investor can learn to spot the difference between a genuine mountain and a molehill.

The Green Mountain earnings release ended up being a Green Molehill for SodaStream. There was no reason to think that a fizzy-water producer would be in the same boat as coffee company. The companies sell two different products, in different markets, with different audiences in mind. SodaStream's earnings report confirmed that it's a different company. Specifically, it's a good company.

How to find them
In his 2008 article, Fool author Morgan Housel called out seven stocks that he determined were undervalued. If you'd picked up an evenly divided basket of them when he published the article, you'd be up more than 110% today.

Morgan's system is just one of many, but it makes sense: Look for strong companies that earn money consistently yet have depressed stock prices for no good reason. He was generous enough to link to the stock screener that he used, so you can go play around with it.

There will always be SodaStream scenarios -- just watch this video on the recent fallout from the JPMorgan Chase (NYSE: JPM) loss. People overreact to market conditions, and good companies experience minor setbacks. If you pay close attention, you can get a great deal on a great company just because some other company is bad.

The Fool has put together a free report on a down-and-out sector and some of the bargains investors can find. Get your copy of "The Stocks Only the Smartest Investors Are Buying" and turn the market's panic to your advantage.