Example 5: Investigating the Properties of a Distribution
by Zavan Karian
> restart: with(plots, display, animate): libname:="C:/mylib/statistics",libname: with(stat):
> f := ChisquarePDF(nu, x);
> assume(nu>0);
> simplify(int(f, x=0..infinity));
> mu := simplify(int(x*f, x=0..infinity));
> int(simplify(x^2*f), x=0..infinity) - mu^2;
> var := simplify(%);
> animate(f, x=0..25, nu=1..15);
> plot3d(f, x=0..10, nu=0..5, orientation=[135,45], color=blue, axes=boxed);
> df := simplify(diff(f, x));
> solve(df=0, x);