The Theory Behind Confidence