fix typos in confidence calculations
tweaks to doc