Testkririckychhodnot[data_,alfa_]:=Module[{α},Print[Style["TEST KRITICKYXCH HODNOT",20,Bold]];
n=Length[data];
Table[j[i],{i,1,n}];
Do[If[strk[[i]]==strk[[i+1]],strk[[i]]=0],{i,1,n-1}];
s1=Cases[strk,Except[0]];
n=Length[s1];
k=0;
Do[If[s1[[i+1]]>s1[[i]]∧s1[[i+1]]>s1[[i+2]]∨s1[[i+1]]<s1[[i]]∧s1[[i+1]]<s1[[i+2]],k=k+1],{i,1,n-2}];

normaK[t_]:=((Abs[t-((2(n-2))/3)])/(Sqrt[((16n-29)/90)]));
norm=normaK[k]//N;
α=alfa;
If[normaK[k]<Quantile[NormalDistribution[0,1],1-(α/2)],Framed[Style["Vyhodnotenie testu:   merania  su nahodne",18],Background->LightPurple],Framed[Style["Vyhodnotenie testu: merania nie su nahodne  ",18],Background->LightPurple]]

]

strk={14.9, 13.9, 12.1, 14, 14.1, 14.1, 15, 14.5,14.5,14.5, 14.2, 13.8, 14.2, 14.4 ,15, 15.1, 15, 14.9, 12, 13.5};

Testkririckychhodnot[strk,0.05]