T CDF
p = distfun_tcdf ( x , v ) p = distfun_tcdf ( x , v , lowertail )
a matrix of doubles, the outcome.
a matrix of doubles, the number of degrees of freedom, v>0.
a 1-by-1 matrix of booleans, the tail (default lowertail=%t). If lowertail is true (the default), then considers P(X<=x) otherwise P(X>x).
a matrix of doubles, the probability.
Computes the T cumulated distribution function.
Any scalar input argument is expanded to a matrix of doubles of the same size as the other input arguments.
p = distfun_tcdf(1,2) // 0.7886751 // With lower tail p = distfun_tcdf(1,2,%f) // 0.2113249 // Plot the function h=scf(); x = linspace(-5,5,1000); p1 = distfun_tcdf(x,1); p2 = distfun_tcdf(x,2); p3 = distfun_tcdf(x,5); p4 = distfun_tcdf(x,%inf); plot(x,p1,"r") plot(x,p2,"g") plot(x,p3,"b") plot(x,p4,"k") legend(["v=1" "v=2" "v=5" "v=Inf"]); xtitle("T CDF","x","$P(X\leq x)$"); // An extreme case distfun_tcdf(40,10,%f) // 1.140D-12 | ![]() | ![]() |