| LTPDA Toolbox™ | contents | ![]() |
KSTEST perform KS test on input AOs %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% DESCRIPTION: Kolmogorov - Smirnov test is typically used to assess if a sample comes from a specific distribution or if two data samples came from the same distribution. The test statistics is d_K = max|S(x) - K(x)| where S(x) and K(x) are cumulative distribution functions of the two inputs respectively. In the case of the test on a single data series: - null hypothesis is that the data are a realizations of a random variable which is distributed according to the given probability distribution In the case of the test on two data series: - null hypothesis is that the two data series are realizations of the same random variable CALL: b = kstest(a1, pl) b = kstest(a1, a2, pl) b = kstest(a1, a2, a3, pl) INPUT: ai: are real valued AO OUTPUT: b: are cdata AOs containing the results of the test: true if the null hypothesis is rejected at the given significance level. false if the null hypothesis is not rejected at the given significance level. The procinfo of b contain further information as: - KSstatistic, the value of d_K = max|S(x) - K(x)|. - criticalValue, it is the value of the test statistics corresponding to the significance level. CRITICAL VALUE is depending on K, where K is the data length of Y1 if Y2 is a theoretical distribution, otherwise if Y1 and Y2 are two data samples K = n1*n2/(n1 + n2) where n1 and n2 are data length of Y1 and Y2 respectively. In the case of comparison of a data series with a theoretical distribution and the data series is composed of correlated elements. K can be adjusted with a shape parameter in order to recover test fairness. In such a case the test is performed for K' = Phi * K. If KSstatistic > criticalValue the null hypothesis is rejected. Parameters Description %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
| Method Details | |
|---|---|
| Access | public |
| Defining Class | ao |
| Sealed | 0 |
| Static | 0 |
| Sets for this method … |
|---|
| empirical |
| normal |
| chi2 |
| f |
| gamma |
empirical |
|||
|---|---|---|---|
| no description | |||
| Key | Default Value | Options | Description |
| TESTDISTRIBUTION | 'EMPIRICAL' |
|
test data are compared with the given test distribution. Available choices are:
|
| ALPHA | 0.050000000000000003 | none | ALPHA is the desired significance level. It represents the probability of rejecting the null hypothesis when it is true.Rejecting the null hypothesis, H0, when it is true is called a Type I Error. Therefore, if the null hypothesis is true , the level of the test, is the probability of a type I error. |
| SHAPEPARAM | 1 | none | In the case of comparison of a data series with a theoretical distribution and the data series is composed of correlated elements. K can be adjusted with a shape parameter in order to recover test fairness [3]. In such a case the test is performed for K* = Phi * K. Phi is the corresponding Shape parameter. The shape parameter depends on the correlations and on the significance value. It does not depend on data length. |
| CRITICALVALUE | [] | none | In case the critical value for the test is available from external calculations, e.g. Monte Carlo simulation, the vale can be input as a parameter. |
back to top
normal |
|||
|---|---|---|---|
| no description | |||
| Key | Default Value | Options | Description |
| TESTDISTRIBUTION | 'EMPIRICAL' |
|
test data are compared with the given test distribution. Available choices are:
|
| ALPHA | 0.050000000000000003 | none | ALPHA is the desired significance level. It represents the probability of rejecting the null hypothesis when it is true.Rejecting the null hypothesis, H0, when it is true is called a Type I Error. Therefore, if the null hypothesis is true , the level of the test, is the probability of a type I error. |
| SHAPEPARAM | 1 | none | In the case of comparison of a data series with a theoretical distribution and the data series is composed of correlated elements. K can be adjusted with a shape parameter in order to recover test fairness [3]. In such a case the test is performed for K* = Phi * K. Phi is the corresponding Shape parameter. The shape parameter depends on the correlations and on the significance value. It does not depend on data length. |
| CRITICALVALUE | [] | none | In case the critical value for the test is available from external calculations, e.g. Monte Carlo simulation, the vale can be input as a parameter. |
| MEAN | 0 | none | The mean of the normal distribution |
| STD | 1 | none | The standard deviation of the normal distribution |
back to top
chi2 |
|||
|---|---|---|---|
| no description | |||
| Key | Default Value | Options | Description |
| TESTDISTRIBUTION | 'EMPIRICAL' |
|
test data are compared with the given test distribution. Available choices are:
|
| ALPHA | 0.050000000000000003 | none | ALPHA is the desired significance level. It represents the probability of rejecting the null hypothesis when it is true.Rejecting the null hypothesis, H0, when it is true is called a Type I Error. Therefore, if the null hypothesis is true , the level of the test, is the probability of a type I error. |
| SHAPEPARAM | 1 | none | In the case of comparison of a data series with a theoretical distribution and the data series is composed of correlated elements. K can be adjusted with a shape parameter in order to recover test fairness [3]. In such a case the test is performed for K* = Phi * K. Phi is the corresponding Shape parameter. The shape parameter depends on the correlations and on the significance value. It does not depend on data length. |
| CRITICALVALUE | [] | none | In case the critical value for the test is available from external calculations, e.g. Monte Carlo simulation, the vale can be input as a parameter. |
| DOF | 2 | none | Degrees of freedom of the Chi square distribution |
back to top
f |
|||
|---|---|---|---|
| no description | |||
| Key | Default Value | Options | Description |
| TESTDISTRIBUTION | 'EMPIRICAL' |
|
test data are compared with the given test distribution. Available choices are:
|
| ALPHA | 0.050000000000000003 | none | ALPHA is the desired significance level. It represents the probability of rejecting the null hypothesis when it is true.Rejecting the null hypothesis, H0, when it is true is called a Type I Error. Therefore, if the null hypothesis is true , the level of the test, is the probability of a type I error. |
| SHAPEPARAM | 1 | none | In the case of comparison of a data series with a theoretical distribution and the data series is composed of correlated elements. K can be adjusted with a shape parameter in order to recover test fairness [3]. In such a case the test is performed for K* = Phi * K. Phi is the corresponding Shape parameter. The shape parameter depends on the correlations and on the significance value. It does not depend on data length. |
| CRITICALVALUE | [] | none | In case the critical value for the test is available from external calculations, e.g. Monte Carlo simulation, the vale can be input as a parameter. |
| DOF1 | 2 | none | First degree of freedom of the F distribution |
| DOF2 | 2 | none | Second degree of freedom of the F distribution |
back to top
gamma |
|||
|---|---|---|---|
| no description | |||
| Key | Default Value | Options | Description |
| TESTDISTRIBUTION | 'EMPIRICAL' |
|
test data are compared with the given test distribution. Available choices are:
|
| ALPHA | 0.050000000000000003 | none | ALPHA is the desired significance level. It represents the probability of rejecting the null hypothesis when it is true.Rejecting the null hypothesis, H0, when it is true is called a Type I Error. Therefore, if the null hypothesis is true , the level of the test, is the probability of a type I error. |
| SHAPEPARAM | 1 | none | In the case of comparison of a data series with a theoretical distribution and the data series is composed of correlated elements. K can be adjusted with a shape parameter in order to recover test fairness [3]. In such a case the test is performed for K* = Phi * K. Phi is the corresponding Shape parameter. The shape parameter depends on the correlations and on the significance value. It does not depend on data length. |
| CRITICALVALUE | [] | none | In case the critical value for the test is available from external calculations, e.g. Monte Carlo simulation, the vale can be input as a parameter. |
| SHAPE | 2 | none | Shape parameter (k) of the Gamma distribution |
| SCALE | 2 | none | Scale parameter (theta) of the Gamma distribution |
back to top
| Some information of the method ao/kstest are listed below: | |
|---|---|
| Class name | ao |
| Method name | kstest |
| Category | Signal Processing |
| Package name | ltpda |
| VCS Version | 175910878ca914560542d679d9d392de37438d84 |
| Min input args | 1 |
| Max input args | -1 |
| Min output args | 1 |
| Max output args | -1 |
|
Method: ao/intersect | Method: ao/lcohere | ![]() |
©LTP Team