Cramer-Von Mises normality testΒΆ

In this example we are going to evaluate whether a sample follows a normal distribution.

[1]:
from __future__ import print_function
import openturns as ot
[2]:
# Generate a sample
sample = ot.Normal().getSample(200)
[3]:
# Test normality
test_result = ot.NormalityTest.CramerVonMisesNormal(sample)
print('Component is normal?', test_result.getBinaryQualityMeasure(),
      'p-value=%.6g' % test_result.getPValue(),
      'threshold=%.6g' % test_result.getThreshold())
Component is normal? True p-value=0.793476 threshold=0.05