I have a confession to make: I'm a lifelong Red Sox fan.

Why did I call that a confession? Well, Red Sox fans -- at least, some Red Sox fans -- are building quite a reputation for themselves online. Unfortunately, it's a pretty lousy one.

In the world of online sports discussions, Sox fans are notorious for the way they take criticisms of their team personally. Articles and comments critical of the team are almost always answered with heated responses and ugly name-calling -- and lots of it.

It's almost as if these fans are incapable of seeing any flaws in their beloved "Sawx".

Some will argue that that passion is part of being a sports fan, and Red Sox fans just get a little carried away. And it's true that there's no real harm in their behavior, except to egos and public decorum. It's just sports, after all.

The thing is, this sort of behavior -- and more importantly, this sort of thinking -- shows up in discussions about stocks, too. And that can cost you a fortune -- and put your retirement at risk.

Expensive blindness
About 10 years ago, I bought some shares of a now-defunct company called Information Architects. I don't remember exactly what the company did, but I do remember that it sounded cool -- and I especially remember defending the company in heated battles on the Yahoo! (NASDAQ:YHOO) Finance discussion boards.

IA had other defenders in that little community, and we made common cause against the "bashers", those who were critical of, or even questioned, the company's ability to deliver on its lofty promises. The discussion often got nasty, with each side accusing the other of being paid (by the company, by "market makers", by big short-selling traders) to argue their views as part of price manipulation schemes.

It was like those baseball discussions, with one difference: Those of us who were willfully blind to the company's flaws lost a bundle when the stock's obvious (to everyone but us) weaknesses finally caught up with it -- and its shares cratered and got delisted.

Welcome to confirmation bias
Confirmation bias is the name that researchers give to the tendency to hear only what one wants to hear. It's related to another concept called anchoring, the tendency to cling to a fact or figure that sounds good -- and maybe feels good -- but that should have no bearing on an objective decision. One anchors on such a fact and then seeks out information to validate one's impression -- while overlooking contradictory evidence.

Here's an example: There has been a lot of bad news about Starbucks (NASDAQ:SBUX) lately, and that news has brought out a lot of vitriol among some folks who just don't like Starbucks. Maybe they don't like the coffee, maybe a barista was rude to them once, but for whatever reason, they argue that Starbucks the business is going down the tubes.

"I don't like Starbucks" leads one to seek confirmation that "their business fundamentals are deteriorating" leads to selling or shorting the stock. Maybe that's good, maybe not. But if it turns out that Starbucks stock is down because of some bumps on the road, rather than because of permanent flaws, then this might turn out to be a terrific time to buy. If so, those folks will never see it.

Loyalty to a brand
Sometimes, investors anchor on a stock because they're loyal to the company's brand. Sometimes that works out -- whether you prefer Coca-Cola (NYSE:KO) or Pepsi (NYSE:PEP), Apple (NASDAQ:AAPL) or Microsoft (NASDAQ:MSFT), you're likely to be OK as long as you're buying and not selling. But anchoring on bad news can also cause you to overlook stocks like Legg Mason (NYSE:LM) that might be great values -- in fact, anchoring by others might be how they got to be great values in the first place.

If you catch yourself in a fit of confirmation bias, well done! That's the trick -- to train yourself to see it as it's happening, hopefully before you click that "trade now" button. To make sure your brain is thinking rationally, ask hard questions. Don't be afraid to grill someone who is recommending a stock (politely, of course). And always check out the company on your own before you invest. Your wealthier future self will thank you.

To learn more about how your brain may be costing you money:

Starbucks, Microsoft, Legg Mason, and Coca-Cola are Motley Fool Inside Value picks. Our value-investing newsletter service is combing through battered stocks for the best bargains for your portfolio. Take a free look at what else our analysts are recommending with a 30-day trial today.

Fool contributor John Rosevear will miss the sight of Manny shambling to the plate in the late innings, but he'll get over it. He owns shares of Apple and Starbucks. Apple is a Motley Fool Stock Advisor pick. The Fool owns shares of Starbucks and Legg Mason. The Fool's disclosure policy would never dream of pouring warm beer over the heads of Yankees fans.