In The Invisible Gorilla the authors discuss various cognitive biases or typical errors in thinking they have found in their psychological research. Among them is the illusion of competence created by an air of confidence. They relate an incident in which one of them discovered a rash on his leg and went to see a doctor. The doctor looked through a book on skin rashes to reach a diagnosis, and then consulted another book for the appropriate treatment. Her need to consult books made the author uneasy. It made her seem less competent than a doctor who could diagnose the condition and prescribe treatment without having to look it up. Later research he conducted confirmed that most people shared his feelings, and felt the doctor who had to look things up was less competent. But why was this?
The authors hypothesize that we tend to judge a person's competence by their confidence. A doctor who confidently diagnoses a condition seems more competent than one who is less certain and needs to consult a reference. This is likely because confidence is usually the result of experience. A doctor who had seen a particular condition many times will confidently diagnose and treat it. Where confidence is a result of experience, which it typically is, it really is a valid measure of competence. But what about when the confidence displayed is not warranted?
Would it have been better for the author's doctor to confidently assert she knew the cause of his rash when she wasn't certain? Obviously not. By checking her references, she confirmed her diagnosis and was able to find the proper treatment. Checking was clearly better than confidently giving an unjustified diagnosis. Yet the author would have trusted her diagnosis more if she had done just that.
I think the cognitive bias of confidence is part of the explanation for why many people perceive religious doctrine to be more trustworthy than scientific conclusions. Religious doctrine confidently asserts its truths. Science, on the other hand, can give only tentative conclusions, contingent on the evidence. Religion steadfastly maintains confidence in its doctrines, while scientific theories are often refined and occasionally completely overthrown as more information becomes available. Who is more believable, the rav who confidently asserts that evolution is nonsense, or the scientist who says that the evidence leads him to conclude that different species evolved, though he can't be sure about the mechanism for this detail and who used to think that dinosaurs were scaly, but now says they had feathers!?
Unfortunately, the confidence with which religious doctrines are asserted is not the result of expertise, but of faith. They are accepted primarily because the religion requires acceptance of those doctrines and vilifies disagreement with them as heresy. No one has expertise in the unity of God, or the resurrection of the dead. Yet these and many other religious precepts are confidently asserted, and that confidence creates an unwarranted sense of their reliability.
 Chabris, C. F., & Simons, D. J. (2010). The invisible gorilla: And other ways our intuitions deceive us. New York: Crown.