Estimation of the random error of binary tests using adaptive polynomials