HypothesisTest_Smirnov¶

HypothesisTest_Smirnov
(firstSample, secondSample, level=0.95)¶ Test whether two samples follows the same distribution.
Available usages:
HypothesisTest.Smirnov(firstSample, secondSample)
HypothesisTest.Smirnov(firstSample, secondSample, level)
Parameters: fisrtSample : 2d sequence of float
First tested sample, of dimension .
secondSample : 2d sequence of float
Second tested sample, of dimension 1.
level : positive float
Threshold pvalue of the test (= 1  first type risk), it must be , equal to 0.95 by default.
Returns: testResult :
TestResult
Structure containing the result of the test.
Notes
Smirnov’s test is a tool that may be used to compare two samples and (of sizes not necessarily equal). The goal is to determine whether these two samples come from the same probability distribution or not. If this is the case, the two samples should be aggregated in order to increase the robustness of further statistical analysis.
Examples
>>> import openturns as ot >>> ot.RandomGenerator.SetSeed(0) >>> distCol = [ot.Normal(), ot.Normal()] >>> firstSample = ot.Normal().getSample(30) >>> secondSample = ot.Normal().getSample(30) >>> test_result = ot.HypothesisTest.Smirnov(firstSample, secondSample) >>> print(test_result) class=TestResult name=Unnamed type=TwoSampleSmirnov binaryQualityMeasure=true pvalue threshold=0.05 pvalue=0.807963 description=[]