Agresti-Coull interval implemented in javascript