Q Estimation via the Discriminant Method Based on Error Modeling