import mir.test: shouldApprox; logisticPDF(-2.0).shouldApprox == 0.1049936; logisticPDF(-1.0).shouldApprox == 0.1966119; logisticPDF(-0.5).shouldApprox == 0.2350037; logisticPDF(0.0).shouldApprox == 0.25; logisticPDF(0.5).shouldApprox == 0.2350037; logisticPDF(1.0).shouldApprox == 0.1966119; logisticPDF(2.0).shouldApprox == 0.1049936; // Can also provide location/scale parameters logisticPDF(-1.0, 2.0, 3.0).shouldApprox == 0.06553731; logisticPDF(1.0, 2.0, 3.0).shouldApprox == 0.08106072; logisticPDF(4.0, 2.0, 3.0).shouldApprox == 0.07471913;
Ditto, with location and scale parameters (by standardizing x).