C# implementation for Wilson Score