VisualTest_DrawEmpiricalCDF

(Source code, png, hires.png, pdf)

../../_images/VisualTest_DrawEmpiricalCDF.png
VisualTest_DrawEmpiricalCDF(*args)

Draw an empirical CDF.

Refer to Empirical cumulative distribution function.

Available usages:

VisualTest.DrawEmpiricalCDF(sample) VisualTest.DrawEmpiricalCDF(sample, Xmin, Xmax)

Parameters
sample2-d sequence of float

Sample to draw.

Xmin, Xmaxfloat with Xmin < Xmax

Lower and upper boundaries of the graph.

Returns
graphclass:~openturns.Graph

The graph object

Notes

The created graph contains a staircase curve which is the empirical CDF of the sample.

Examples

>>> import openturns as ot
>>> from openturns.viewer import View

Generate a random sample from a Normal distribution:

>>> ot.RandomGenerator.SetSeed(0)
>>> sample = ot.Normal(1).getSample(100)

Draw an empirical CDF:

>>> empiricalCDF = ot.VisualTest.DrawEmpiricalCDF(sample)
>>> View(empiricalCDF).show()