# NormalityTest_CramerVonMisesNormal¶

NormalityTest_CramerVonMisesNormal(sample, level=0.05)

Evaluate whether a sample follows a normal distribution.

Available usages:

NormalityTest.CramerVonMisesNormal(sample)

NormalityTest.CramerVonMisesNormal(sample, level)

Parameters: sample : 2-d sequence of float Tested sample. level : positive float Threshold p-value of the test (= first kind risk), it must be , equal to 0.05 by default. testResult : TestResult Structure containing the result of the test.

Notes

The test is used to check whether the sample follows a normal distribution. The test concerns the deviation squared and integrated over the entire variation domain, it often appears to be more robust than the Kolmogorov-Smirnov test.

Examples

>>> import openturns as ot
>>> ot.RandomGenerator.SetSeed(0)
>>> distribution = ot.Normal()
>>> sample = distribution.getSample(30)
>>> test_result = ot.NormalityTest.CramerVonMisesNormal(sample)
>>> print(test_result)
class=TestResult name=Unnamed type=CramerVonMisesNormal binaryQualityMeasure=true p-value threshold=0.05 p-value=0.682524 description=[]