Better to remain silent and be thought a fool, than to open your mouth and remove all doubt.
Variant: Better to remain silent and thought a fool, than to speak and remove all doubt. (often attributed to Abraham Lincoln but taken from Solomon's Proverbs)