Accelerating the pace of engineering and science

# 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

$\frac{\delta {\left(\nu /2\right)}^{1/2}\Gamma \left(\left(\nu -1\right)/2\right)}{\Gamma \left(\nu /2\right)}$

where ν > 1.

The variance is

$\frac{\nu }{\left(\nu -2\right)}\left(1+{\delta }^{2}\right)-\frac{\nu }{2}{\delta }^{2}{\left[\frac{\Gamma \left(\left(\nu -1\right)/2\right)}{\Gamma \left(\nu /2\right)}\right]}^{2}$

where ν > 2.

## Examples

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

m =
1.0837

v =
1.3255```