Main Content

nctstat

Noncentral t mean and variance

Syntax

[M,V] = nctstat(NU,DELTA)

Description

[M,V] = nctstat(NU,DELTA) returns the mean of and variance for the noncentral t pdf with NU degrees of freedom and noncentrality parameter DELTA. NU and DELTA can be vectors, matrices, or multidimensional arrays that all have the same size, which is also the size of M and V. A scalar input for NU or DELTA is expanded to a constant array with the same dimensions as the other input.

The mean of the noncentral t distribution with parameters ν and δ is

δ(ν/2)1/2Γ((ν1)/2)Γ(ν/2)

where ν > 1.

The variance is

ν(ν2)(1+δ2)ν2δ2[Γ((ν1)/2)Γ(ν/2)]2

where ν > 2.

Examples

[m,v] = nctstat(10,1)

m =
  1.0837

v =
  1.3255

References

[1] Evans, M., N. Hastings, and B. Peacock. Statistical Distributions. 2nd ed., Hoboken, NJ: John Wiley & Sons, Inc., 1993, pp. 147–148.

[2] Johnson, N., and S. Kotz. Distributions in Statistics: Continuous Univariate Distributions-2. Hoboken, NJ: John Wiley & Sons, Inc., 1970, pp. 201–219.

Extended Capabilities

C/C++ Code Generation
Generate C and C++ code using MATLAB® Coder™.

Version History

Introduced before R2006a