Create a gaussian distributionΒΆ
In this example we are going to create a gaussian distribution with parameters
[2]:
from __future__ import print_function
import openturns as ot
distribution = ot.Normal(2.2, 0.6)
print(distribution)
Normal(mu = 2.2, sigma = 0.6)
[3]:
sample = distribution.getSample(10)
print(sample)
[ X0 ]
0 : [ 2.56492 ]
1 : [ 1.4403 ]
2 : [ 1.93704 ]
3 : [ 2.92329 ]
4 : [ 0.891169 ]
5 : [ 2.41003 ]
6 : [ 1.987 ]
7 : [ 3.06235 ]
8 : [ 2.6864 ]
9 : [ 2.67589 ]
[4]:
distribution.drawPDF()
[4]: