Skip to content

Instantly share code, notes, and snippets.

@mbadolato
mbadolato / WilsonConfidenceIntervalCalculator.php
Last active May 4, 2023 04:14
PHP translation of the Wilson ConfidenceInterval Calculator. Ported from Ruby and uses a hardcoded (pre-calculated) confidence (z value) instead of a dynamic calculation with a translation of Ruby's Statistics2.pnormaldist method. Since z doesn't change once it's computed, nor is the computation dependant on the passed-in values, calculating it …
<?php
/*
* (c) Mark Badolato <mbadolato@gmail.com>
*
* This content is released under the {@link http://www.opensource.org/licenses/MIT MIT License.}
*/
namespace Bado;