The OpenD Programming Language

studentsTCDF

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

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

Parameters

x T

value to evaluate CDF

nu T

degrees of freedom

mean T

location parameter

stdDev T

scale parameter

Examples

import mir.test: shouldApprox;

studentsTCDF(-3.0, 5).shouldApprox == 0.01504962;
studentsTCDF(-2.0, 5).shouldApprox == 0.05096974;
studentsTCDF(-1.0, 5).shouldApprox == 0.1816087;
studentsTCDF(0.0, 5).shouldApprox == 0.5;
studentsTCDF(1.0, 5).shouldApprox == 0.8183913;
studentsTCDF(2.0, 5).shouldApprox == 0.9490303;
studentsTCDF(3.0, 5).shouldApprox == 0.9849504;

// Can include location/scale
studentsTCDF(-3.0, 5, 1, 2).shouldApprox == 0.05096974;
studentsTCDF(-2.0, 5, 1, 2).shouldApprox == 0.09695184;
studentsTCDF(-1.0, 5, 1, 2).shouldApprox == 0.1816087;
studentsTCDF(0.0, 5, 1, 2).shouldApprox == 0.3191494;
studentsTCDF(1.0, 5, 1, 2).shouldApprox == 0.5;
studentsTCDF(2.0, 5, 1, 2).shouldApprox == 0.6808506;
studentsTCDF(3.0, 5, 1, 2).shouldApprox == 0.8183913;

Meta