Properties of the Distribution
Calculation of Mean and Variance
To calculate the mean of the t distribution, we can simply integrate x *( t PDF), per the definition of mathematical expectation.
> restart;
> with(plots):
> interface(showassumed=0):
When nu=1 the integral of x*f(x) diverges so the expected value does not exist. We consider the case where nu>1 below.
> assume(nu > 1);
> f(x):=TPDF(nu,x);
> EX:=int(x*f(x),x=-infinity..infinity);
Calculating Var( X ), the variance of the t ( ) distribution. We will employ the formula: Var( X ) = E( ) -
The integral of x^2*f(x) diverges if nu <=2. We consider the case where nu>2 below.
> assume(nu > 2);
> E_X_SQ:=int((x^2)*f(x),x=-infinity..infinity);
> VarX:=simplify(E_X_SQ-EX^2);
Sp ecial Properties
As increases, the t distribution approaches the N(0,1) distribution. The next few plots and animations will try to give you a visual representation of this result.
> with(plots):
> nu:=1:
> f:=x->TPDF(nu, x);
> n:=x->NormalPDF(0,1,x);
> plot([f(x),n(x)],x=-5..5,title="t(1) with N(0,1)");
The red plot is the t (1) distribution, and the green plot is the N(0,1) distribution.
The following animation portrays how the t approaches the standard normal distribution.
> for nu from 1 to 20 do
> density[nu]:=plot(TPDF(nu,x),x=-4..4):
> num:=convert(nu,string):
> standnorm:=plot(n(x),x=-4..4,color=black):
> tracker[nu]:=textplot([2,0.24,`nu is `.num],color=blue):
> P[nu]:=display({density[nu],tracker[nu],standnorm}):
> od:
> display([seq(P[nu], nu=1..20)], insequence=true, title="t gets close to N(0,1) as nu increases");
>