import mir.test: shouldApprox; import mir.math.common: log; studentsTLPDF(-3.0, 5).shouldApprox == log(0.01729258); studentsTLPDF(-2.0, 5).shouldApprox == log(0.06509031); studentsTLPDF(-1.0, 5).shouldApprox == log(0.2196798); studentsTLPDF(0.0, 5).shouldApprox == log(0.3796067); studentsTLPDF(1.0, 5).shouldApprox == log(0.2196798); studentsTLPDF(2.0, 5).shouldApprox == log(0.06509031); studentsTLPDF(3.0, 5).shouldApprox == log(0.01729258); // Can include location/scale studentsTLPDF(-3.0, 5, 1, 2).shouldApprox == log(0.06509031); studentsTLPDF(-2.0, 5, 1, 2).shouldApprox == log(0.1245173); studentsTLPDF(-1.0, 5, 1, 2).shouldApprox == log(0.2196798); studentsTLPDF(0.0, 5, 1, 2).shouldApprox == log(0.3279185); studentsTLPDF(1.0, 5, 1, 2).shouldApprox == log(0.3796067); studentsTLPDF(2.0, 5, 1, 2).shouldApprox == log(0.3279185); studentsTLPDF(3.0, 5, 1, 2).shouldApprox == log(0.2196798);
Ditto, with location and scale parameters (by standardizing x).