KolmogorovSmirnovTest to set the level of probability?

I would like to ask for help. I do Kolmogorov Smirnov test. I entered data. I need to set the level of probability. It should be using pvalue and the result should be true / false. But unfortunately I do not.

data = RandomVariate [NormalDistribution [], 10];
KolmogorovSmirnovTest [data]

------->>>>>> TRUE/FALSE???

Thank you for the advice
Martin

You set the significance level (rather than a P-value). The default (as stated in the documentation) is 0.05 but if you want it to be something else such as 0.10, then you can use the following:

data = RandomVariate[NormalDistribution[], 10];
ks = KolmogorovSmirnovTest[data, Automatic, "ShortTestConclusion", SignificanceLevel ->0.10]

Nice :slight_smile: Thank you :slight_smile:

How do instead of “reject” — “ok” and instead of “Do not reject” — “no”

I suggest giving a fuller example (Mathematica code and output) of the issue you need resolved.

I think you need to read about the Kolmogorov-Smirnov test or the associated Mathematica documentation. Why would you expect a “Yes” (meaning “no evidence of a difference”) when you are comparing a sample from a N(0,1) vs. a N(521,3) distribution?

I need a test result in the Czech language. English is inconvenient for the teacher.

OK. I understand now. (I’m a little slow.) The output is just some text so you could use a brute force approach to make the translation into another variable:

data = BlockRandom[SeedRandom[1]; 
   RandomVariate[NormalDistribution[], 100]];
ks = KolmogorovSmirnovTest[data, NormalDistribution[0, 1.5], "ShortTestConclusion", SignificanceLevel -> .1]
result = If[ks == "Reject", "Ano", "Ne"]