import mir.test: shouldApprox; logisticCDF(-2.0).shouldApprox == 0.1192029; logisticCDF(-1.0).shouldApprox == 0.2689414; logisticCDF(-0.5).shouldApprox == 0.3775407; logisticCDF(0.0).shouldApprox == 0.5; logisticCDF(0.5).shouldApprox == 0.6224593; logisticCDF(1.0).shouldApprox == 0.7310586; logisticCDF(2.0).shouldApprox == 0.8807971; // Can also provide location/scale parameters logisticCDF(-1.0, 2.0, 3.0).shouldApprox == 0.2689414; logisticCDF(1.0, 2.0, 3.0).shouldApprox == 0.4174298; logisticCDF(4.0, 2.0, 3.0).shouldApprox == 0.6607564;
Ditto, with location and scale parameters (by standardizing x).