Skip to content

Instantly share code, notes, and snippets.

@rcotrina94
Last active August 29, 2015 14:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rcotrina94/85b2826fc05927cd296e to your computer and use it in GitHub Desktop.
Save rcotrina94/85b2826fc05927cd296e to your computer and use it in GitHub Desktop.
Tabla de Kolomogorov-Smirnov
Archivo de Constantes para: http://rcotrina.devux.pe/lab/uns/din-ii/2015-00/und1/FinalNumPseudo/
TABLA_KS = {
0.1 : [
0.95000,0.77639,0.63604,0.56522,0.50945,
0.46799,0.43607,0.40962,0.38746,0.36866,
0.35242,0.33815,0.32549,0.31417,0.30397,
0.29472,0.28627,0.27851,0.27136,0.26473,
0.25858,0.25283,0.24746,0.24242,0.23768,
0.23320,0.22898,0.22497,0.22117,0.21756,
0.21412,0.21085,0.20771,0.21472,0.20185,
0.19910,0.19646,0.19392,0.19148,0.18913,
0.18687,0.18468,0.18257,0.18051,0.17856,
0.17665,0.17481,0.17301,0.17128,0.16959,
1.22
],
0.05 : [
0.97500,0.84189,0.70760,0.62394,0.56328,
0.51926,0.48342,0.45427,0.43001,0.40925,
0.39122,0.37543,0.36143,0.34890,0.33750,
0.32733,0.31796,0.30936,0.30143,0.29408,
0.28724,0.28087,0.27491,0.26931,0.26404,
0.25908,0.25438,0.24993,0.24571,0.24170,
0.23788,0.23424,0.23076,0.22743,0.22425,
0.22119,0.21826,0.21544,0.21273,0.21012,
0.20760,0.20517,0.20283,0.20056,0.19837,
0.19625,0.19420,0.19221,0.19028,0.18841,
1.36
],
0.01 : [
0.99500,0.92929,0.82900,0.73424,0.66853,
0.61661,0.57581,0.54179,0.51332,0.48893,
0.46770,0.44905,0.43247,0.41762,0.40420,
0.39201,0.38086,0.37062,0.36117,0.35241,
0.34426,0.33666,0.32954,0.32286,0.31657,
0.30963,0.30502,0.29971,0.29466,0.28986,
0.28529,0.28094,0.27577,0.27271,0.26897,
0.26532,0.26180,0.25843,0.25518,0.25205,
0.24904,0.24613,0.24332,0.24060,0.23798,
0.23544,0.23298,0.23059,0.22832,0.22604,
1.63
]
}
var KS = function(n,alfa){
var _ks;
if (n<=50){
_ks = TABLA_KS[alfa][n-1];
} else {
_ks = TABLA_KS[alfa][50]/Math.sqrt(n);
}
return _ks;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment