Noncentral T PDF
y = distfun_nctpdf ( x , v , delta )
a matrix of doubles, the outcome.
a matrix of doubles, the number of degrees of freedom, v>0.
a matrix of doubles, the noncentrality parameter, delta is real
a matrix of doubles, the density
Computes the Noncentral T probability 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.
If Z is a normal random variable with mean 0 and standard deviation 1, and T is a Chi-squared random variable with v degrees of freedom, then the variable
has a Noncentral T distribution with v degrees of freedom and delta noncentrality parameter.
When the number of degrees of freedom v increases, the Noncentral T distribution approaches the Normal distribution with mean 0 and variance 1.
y=distfun_nctpdf(7,2,10) expected = 0.0750308 // Plot the function h=scf(); x = linspace(-5,10,1000); p1 = distfun_nctpdf(x,1,0); p2 = distfun_nctpdf(x,4,0); p3 = distfun_nctpdf(x,1,2); p4 = distfun_nctpdf(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 PDF","x","y"); | ![]() | ![]() |
http://en.wikipedia.org/wiki/Noncentral_t-distribution