Statistical Tests

The Quant Express Libraries contain several common statistical test such as the T-Test (to test sample means), F-Test (to test Sample Variances), Chi-2, Sign, Jarque Bera Normality and Correlation Tests.

Here below the T-Test is demonstrated by randomly sampling 2 variables from a normal distribution with possibly different means and standard deviation.

  Mean Standard Deviation
Variable 1
+
-
+
-
Variable 2
+
-
+
-
     
Run T-Test
 
 
Generate Random Sample And Test whether the 2 samples have the same Mean
 
     
Random Data T-Test output  
Variable 1
Variable 2
0.4840681476446520.705009962877899
-5.32260822313753-0.446435978624829
-2.030992495633934.44946122367404
0.9036221571308632.7748408238109
1.59297561682302-1.53101183144155
2.618741638941582.56188166888237
-0.01061705602732152.63739946426762
-1.16200650579155-0.686378726282582
1.616654066569281.37521472908878
5.92241989649451-1.35587884115239
-0.785726038095930.322171175619453
2.94537597956445-0.042565876525513
1.74244653213375-2.10474716086947
-2.552281470389151.13711757900684
2.55377244805575-0.0103414272525667

This test checks three hypotheses about the mean of the given samples.
The following tests are performed:
 * two-tailed test (null hypothesis H0: the means are equal)
 * left-tailed test (null hypothesis H0: the mean of the first sample is greater than or equal to the mean of the second sample)
 * right-tailed test (null hypothesis H0: the mean of the first sample is less than or equal to the mean of the second sample).

Both Tails: p-value for two-tailed test. If Both Tails is less than the given significance level the null hypothesis is rejected.

Left Tail: p-value for left-tailed test. If Left Tail is less than the given significance level, the null hypothesis is rejected.

Right Tail: p-value for right-tailed test. If Right Tail is less than the given significance level the null hypothesis is rejected.

In simple words, if you are testing whether the two samples have the same mean and your required confidence level is 95% then if the both tail p-value is less than 95% you should reject this assumption.