Confidence is closely linked to how well our perceptions match reality