Home
Products
Online Demo
Services
Order
Contact Us
About
Math & Probability and Statistics Library
Quantitative Finance Library
Option Pricer
Volatility Smile
Volatility Cone
Historical Analysis
------------------------------
Math Parser
Integral
Interpolation
Regressions
Non Linear Regressions
Optimisation
Random Number Generators
------------------------------
Continuous Probability
Non Parametric Probability
Statistical Tests
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
Assume Equal Variance
Assume Unequal Variance
Generate Random Sample And Test whether the 2 samples have the same Mean
Random Data
T-Test output
Variable 1
Variable 2
0.484068147644652
0.705009962877899
-5.32260822313753
-0.446435978624829
-2.03099249563393
4.44946122367404
0.903622157130863
2.7748408238109
1.59297561682302
-1.53101183144155
2.61874163894158
2.56188166888237
-0.0106170560273215
2.63739946426762
-1.16200650579155
-0.686378726282582
1.61665406656928
1.37521472908878
5.92241989649451
-1.35587884115239
-0.78572603809593
0.322171175619453
2.94537597956445
-0.042565876525513
1.74244653213375
-2.10474716086947
-2.55228147038915
1.13711757900684
2.55377244805575
-0.0103414272525667
Loading…
Average Sample 1: 0.567723 Average Sample 2: 0.652382 ========================================== T TEST RESULTS ========================================== Both Tails: 0.920968 Left Tail: 0.460484 Right Tail: 0.539516
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.