Create a geometric distributionΒΆ
In this example we are going to create a geometric distribution with parameter
[5]:
from __future__ import print_function
import openturns as ot
distribution = ot.Geometric(0.7)
print(distribution)
Geometric(p = 0.7)
[6]:
sample = distribution.getSample(10)
print(sample)
[ X0 ]
0 : [ 1 ]
1 : [ 1 ]
2 : [ 1 ]
3 : [ 1 ]
4 : [ 1 ]
5 : [ 2 ]
6 : [ 1 ]
7 : [ 1 ]
8 : [ 1 ]
9 : [ 1 ]
[7]:
distribution.drawCDF()
[7]: