Statistics Toolbox | ![]() ![]() |
Mean and variance for the Student's t distribution
Syntax
Description
[M,V] = tstat(NU)
returns the mean and variance for Student's t distribution with parameters specified by NU
. M
and V
are the same size as NU
.
The mean of the Student's t distribution with parameter is zero for values of
greater than 1. If
is one, the mean does not exist. The variance for values of
greater than 2 is
.
Examples
Find the mean and variance for 1 to 30 degrees of freedom.
[m,v] = tstat(reshape(1:30,6,5)) m = NaN 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 v = NaN 1.4000 1.1818 1.1176 1.0870 NaN 1.3333 1.1667 1.1111 1.0833 3.0000 1.2857 1.1538 1.1053 1.0800 2.0000 1.2500 1.1429 1.1000 1.0769 1.6667 1.2222 1.1333 1.0952 1.0741 1.5000 1.2000 1.1250 1.0909 1.0714
Note that the variance does not exist for one and two degrees of freedom.
See Also
![]() | trnd | ttest | ![]() |