<< Noncentral T Distribution Noncentral T Distribution distfun_nctinv >>

distfun >> distfun > Noncentral T Distribution > distfun_nctcdf

distfun_nctcdf

Noncentral T CDF

Calling Sequence

p = distfun_nctcdf ( x , v , delta )
p = distfun_nctcdf ( x , v , delta , lowertail )

Parameters

x :

a matrix of doubles, the outcome.

v :

a matrix of doubles, the number of degrees of freedom, v>0.

delta :

a matrix of doubles, the noncentrality parameter, delta is real

lowertail :

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).

p :

a matrix of doubles, the probability.

Description

Computes the Noncentral T cumulated distribution function.

Any scalar input argument is expanded to a matrix of doubles of the same size as the other input arguments.

Caution This distribution is known to have inferior accuracy in some cases.

Examples

p = distfun_nctcdf(8,2,10)
expected=0.2164194

// Plot the function
h=scf();
x = linspace(-5,10,1000);
p1 = distfun_nctcdf(x,1,0);
p2 = distfun_nctcdf(x,4,0);
p3 = distfun_nctcdf(x,1,2);
p4 = distfun_nctcdf(x,4,2);
plot(x,p1,"r")
plot(x,p2,"g")
plot(x,p3,"b")
plot(x,p4,"k")
legend(["v=1, delta=0", ..
"v=4, delta=0", ..
"v=1, delta=2", ..
"v=4, delta=2"]);
xtitle("Noncentral T CDF","x","$P(X\leq x)$");

Authors


Report an issue
<< Noncentral T Distribution Noncentral T Distribution distfun_nctinv >>