discrepancy formulas