So you've scouted, you saw Roaches, so you make Marauders. Then a mass of 12 Mutas comes into your base, wipes out your few marines, and demolishes your base. What happened?
It's easy to make assumptions based on what you see. It's important that you keep checking your opponent's army composition. If you watch GSL, Day9, HuskyHD, or read my previous blog posts, you may have heard the phrase "scout the front". Most players keep their armies near the front of their base, for the sole reason that it's where the attack usually comes from. This positioning means that by sending a single cheap unit to die, you can scout your opponent's army composition, and you should do it on a regular basis, so you aren't surprised.
Buildings can't tell you everything, especially against Zerg! Don't rely on the fact that he build a Roach Warren that any Roaches will come out of it. Some buildings are "just in case" structures.