User:Asitgoes/t-Tester

In statistics and data analysis the application software t-Tester is a free and user-friendly calculator for t-testing using Student's t-distribution of a variable X.

The calculator determines the cumulative probability Pc(T) for any t-test value T. Here, the cumulative probability Pc(T) stands for the probability P that X is less than a reference value T of X. Biefly :  Pc(T) = P(X<T).

Reversely, the calculator can give the value of T given Pc. Hence, it is a two-way calculator. The data required are the degrees of freedom.

Intervals
The probability (Pi) that X occurs in an interval between an upper limit (U) and a lower limit (L) can be found from:


 * Pi = P(L<X<U) = Pc(U)  - Pc(L).

Thus, using the calculator twice, namely for T=U and T=L, and subtracting the results, one finds the value of Pi that L<X<U.

Numerical method
The cumulative distribution function of the t-distribution can be calculated numerically as follows.

When T is positive or zero :
 * $$Pc(T) = Po + \frac{1-Po}{2} $$

When T is negative :
 * $$Pc(T) = \frac{1-Po}{2} $$

where Po is an auxiliary probability value as elaborated below.

Using
 * $$Z = arctan(\frac{T}{\sqrt{N}})$$

where N is the number of degrees of freedom,

the following auxiliary probability equations are applicable according to 3 different conditions:

1 - N (degrees of freedom) even :


 * $$Po = sin(Z) \cdot [1 + \frac{cos^2(Z)}{2} + \frac{ 3 \cdot cos^{4}(Z)}{2\cdot4} + \frac{ 3 \cdot 5 \cdot cos^{6}(Z)}{2 \cdot 4 \cdot6} + \cdots ]$$

2 - N (degrees of freedom) uneven and >1 :
 * $$Po =\frac{2Z}{\pi} + \frac{2}{\pi} \cdot cos(Z) \cdot sin(Z) \cdot [1 +

\frac{2 \cdot cos^2(Z)}{3} + \frac {2 \cdot 4 \cdot cos^4(Z)}{3\cdot5} + \cdots ]$$

3 - N (degrees of freedom) = 1 :


 * $$Po = \frac{2Z}{\pi}$$

The number of terms between the parentheses [ ] to be used is N / 2 when N is even and ( N-1) / 2 when N is uneven.



Graphics
The t-Tester software provides graphics for the various values computed with the calculator. See the examples to left and right.