Dear Karthik,
Does the KS test mean for one-sample Kolmogorov-Smirnov test?
If so, currently Origin7.5 does not directly provide the KS test. However, since Origin includes many functions from NAG (the Numerical Algorithms Group library), now you can carry out the test simply by a patch of OriginC codes.
Copy the following codes into Origin workspace, compile it, type ks_test in the script window and then press Enter key to execute it.
If you are fresh to the programming, you can refer to the Origin programming help file: Code Builder User Guide: Introduction. This chapter explains the basics of how to program with the code builder.
#include <NAG\OCN_g08.h>
void ks_test()
{
// suppose the active window is a worksheet
Worksheet wks = Project.ActiveLayer();
if(!wks)
return;
// suppose the test data is stored in column(A)
Dataset dsA(wks,0);
vector vData =dsA;
int nRet;
double par[2];
Nag_ParaEstimates estima;
estima = Nag_ParaEstimated;
Nag_TestStatistics dtype;
dtype = Nag_TestStatisticsDAbs;
double dD, dZ, dP;
// perform a one sample Kolmogorov-Smirnov test to examine if the data obeys Normal distribution
nRet = nag_1_sample_ks_test(vData.GetSize(), vData, Nag_Normal, par, estima, dtype, &dD, &dZ, &dP);
// output test results, where "Tail probability" tells the probability that the data is from a Normal distribution
printf("Test against Normal distribution with parameters estimated from the data\n");
printf("\n");
printf("Mean = %8.4f\n", par[0]);
printf("Variance = %8.4f\n", par[1]);
printf("Test statistics D = %8.4f\n", dD);
printf("Z statistic = %8.4f\n", dZ);
printf("Tail probability = %8.4f\n", dP);
}
For more detail on the usage of the function nag_1_sample_ks_test(), you can turn to g08cbc document inside folder \NAG PDFs. (If you did not install the PDFs previously, you can install them by running the Origin "Add or Remove Files" program.)
Moreover, if your KS test means for two-sample Kolmogorov-Smirnov test, you can look at function nag_2_sample_ks_test() and create similar codes to test.
With regards to the cumulative fraction plot, you can simply use menu plot--Statistical Graphs--Histogram+Probablities to create a desirable graph.
Hope it works. If you still encounter any problems, feel free to contact our Technical Support
Max
OriginLab GZoffice