Normal fitting test using the Henry lineΒΆ
In this example we are going to perform a visual goodness-of-fit test for an univariate normal distribution using the Henry line test, which is the QQ plot adapted for Gaussian distirbutions.
[23]:
from __future__ import print_function
import openturns as ot
[24]:
# Create data
ot.RandomGenerator.SetSeed(0)
distribution = ot.Normal(2.0, 0.5)
sample1 = distribution.getSample(100)
[25]:
# Draw Henry line plot (good)
ot.VisualTest_DrawHenryLine(sample1)
[25]:
[26]:
# Draw Henry line plot for a Beta (bad)
sample2 = ot.Beta(0.7, 0.9, 0.0, 2.0).getSample(100)
ot.VisualTest_DrawHenryLine(sample2)
[26]: