 Login  |   Contact  |   About Us       Tuesday, May 17, 2022  ~ Normal Distribution ~ Expontl Distribution ~ Chi and Chi-Square ~ Cauchy Distribution ~ Poisson Distribution ~ Student T Distribution ~ Gamma Distribution

 "Distribution Functions" Student T Distribution Method
 PARM X -4.75, -4.25, -3.75, -3.25, -2.75, -2.25, -1.75, -1.25, -0.75, -0.25, 0.25, 0.75, 1.25, 1.75, 2.25, 2.75, 3.25, 3.75, 4.25, 4.75, RANDOM DATA 0, 2, 14, 17, 32, 55, 98, 150, 283, 366, 363, 261, 159, 84, 50, 25, 14, 8, 4, 3, DENSITY DISTRIB 2 4 7 13 24 47 91 168 276 366 366 276 168 91 47 24 13 7 4 2

 Results of the Student T Distribution
 Number of Points: Number of Bins: [ Initial Number of Bins: {20) ] [ Initial Number of Points: {2000} ]

IMPLEMENTATION
Student T Distribution Method

In probability and statistics, the student-t distribution is a probability distribution arising from the problem of estimating the mean of a normally distributed population when the sample size is small. This distribution often arises when the population of the standard deviation in unknown and has to be estimated from the data.   Probability Density Function

The probability density function for the student-t distributions is given by:

 f(x;n) = ç(n + 1) / 2 / ç(1/2) ç(n/2) * n-1/2 (1 + x2 / n) -(n+1)/2

where the parameter n is the degrees of freedom and ç(.) is the gamma function.   Student T Random Number Generator

The relationship of the student-t random distribution, denoted by Stt(n), to the standard normal random distribution N(0,1) and the Chi distribution (see ♦ Chi and Chi-Square Distribution Method) results in:

 Stt(n) = N(0,1) / ç(n,1)   Testing the Student T Distribution Method

To test the Student T Distribution method, a new static method has been added. The TestStudentTDistribution() method has been written and executed. No additional code is shown. The user can change variables as desired.

For the test, two parameters were set:

 number of bins = 20; (nBins) number of points = 2000; (nPoints)

where the parameter (nBins) is the number of bins in the histogram and (nPoints) is the number of random points. A random array is created using the student-t distribution. A comparison is made between the histogram of random data and the theoretical probability density function of the student-t distribution. One can see the results from the student-t random generator are very close to the theoretical student-t distribution function.

Running this example generates the results shown above.   static TestStudentTDistribution();
{
int nBins = t2;
int nPoints = t1;
double xmin = -5;
double xmin = 5;
double[] rand = RandomGenerators.NextStudentT(5, nPoints);
ArrayList aList = RandomGenerators.HistogramData(rand, xmin, xmax, nBins);
double[] xdata = new double[nBins];
double[] ydata = new double[nBins];
double[] ydistribution = new double[nBins];
for (int i = 0; i < nBins; i++)
{
xdata[i] = xmin + (i + 0.5) * (xmax - xmin) / nBins;
ydata[i] = (double)aList[i];
ydistribution[i] = DistributionFunctions.StudentT(xdata[i], 5);
}
double normalizeFactor = RandomGenerators.ArrayMax(ydata) / RandomGenerators.ArrayMax(ydistribution);
for (int i = 0; i < nBins; i++)
{
}
}

 Other Implementations...

 Object-Oriented Implementation Graphics and Animation Sample Applications Ore Extraction Optimization Vectors and Matrices Complex Numbers and Functions Ordinary Differential Equations - Euler Method Ordinary Differential Equations 2nd-Order Runge-Kutta Ordinary Differential Equations 4th-Order Runge-Kutta Higher Order Differential Equations Nonlinear Systems Numerical Integration Numerical Differentiation Function Evaluation  Math, Analysis,
expertise..."

EIGENVALUE
SOLUTIONS...

> Rayleigh-Quotient Method

> Cubic Spline Method

 Applied Mathematical Algorithms ComplexFunctions NonLinear Differentiation Integration
 About Us KMP Software Engineering is an independent multidisciplinary engineering consulting company specializing in mathematical algorithms. Areas of Expertise SpecialFunctions VectorsMatrices OptimizationMethods ComplexNumbers Interpolation CurveFitting NonLinearSystems LinearEquations DistributionFunctions NumericalDifferentiation NumericalIntegration DifferentialEquations Smalltalk FiniteBoundary Eigenvalue Graphics UnderstandingMining MiningMastery MineralNews MineralCommodities MineralForum Crystallography Services NumericalModeling WebServices MainframeServices OutsourceServices LINKED IN KMP ARTICLES Brand Login Contact