Replacing the stdev_factor variable with a dg_confidence