When NCTCDF is used to calculate the value for the noncentral t-distribution with a nonzero noncentrality parameter in the following format,
P = nctcdf(X,NU,DELTA)
it produces incorrect values when X = Inf and X = -Inf. For example, with a noncentrality parameter of 1.5:
>> nctcdf(Inf,4,1.5) % incorrect - should be 1
ans = 0>> nctcdf(-Inf,4,1.5) % incorrect - should be 0
ans = 1
This function works correctly for Inf and -Inf only when the noncentrality parameter is 0 because the function handles this as a special case:
>> nctcdf(Inf,4,0) % correctly returns 1
ans = 1>> nctcdf(-Inf,4,0) % correctly returns 0
ans = 0
Best Answer