Confidence isn't optimism or pessimism, and it's not a character attribute. It's the expectation of a positive outcome.
The beauty of mathematics is that it is one of the few areas of human endeavor where absolute truth can be known.