Wilson score interval implemented in javascript