The OpenD Programming Language

studentsTInvCDF

Ditto, with location and scale parameters (by standardizing x).

  1. T studentsTInvCDF(T p, T nu)
  2. T studentsTInvCDF(T p, T nu, T mean, T stdDev)
    @safe pure nothrow @nogc
    T
    studentsTInvCDF
    (
    T
    )
    (
    const T p
    ,
    const T nu
    ,
    const T mean
    ,
    const T stdDev
    )
    if (
    isFloatingPoint!T
    )

Parameters

p T

value to evaluate InvCDF

nu T

degrees of freedom

mean T

location parameter

stdDev T

scale parameter

Examples

import mir.test: shouldApprox;

studentsTInvCDF(0.0, 5).shouldApprox == -double.infinity;
studentsTInvCDF(0.1, 5).shouldApprox == -1.475884;
studentsTInvCDF(0.2, 5).shouldApprox == -0.9195438;
studentsTInvCDF(0.3, 5).shouldApprox == -0.5594296;
studentsTInvCDF(0.4, 5).shouldApprox == -0.2671809;
studentsTInvCDF(0.5, 5).shouldApprox == 0.0;
studentsTInvCDF(0.6, 5).shouldApprox == 0.2671809;
studentsTInvCDF(0.7, 5).shouldApprox == 0.5594296;
studentsTInvCDF(0.8, 5).shouldApprox == 0.9195438;
studentsTInvCDF(0.9, 5).shouldApprox == 1.475884;
studentsTInvCDF(1.0, 5).shouldApprox == double.infinity;

// Can include location/scale
studentsTInvCDF(0.2, 5, 1, 2).shouldApprox == -0.8390876;
studentsTInvCDF(0.4, 5, 1, 2).shouldApprox == 0.4656382;
studentsTInvCDF(0.6, 5, 1, 2).shouldApprox == 1.534362;
studentsTInvCDF(0.8, 5, 1, 2).shouldApprox == 2.839088;

Meta