Create a Monte Carlo design of experimentsΒΆ

In this example we are going to create a MonteCarlo probabilistic design experiment.

from __future__ import print_function
import openturns as ot
import openturns.viewer as viewer
from matplotlib import pylab as plt
ot.Log.Show(ot.Log.NONE)

Define underlying distribution, size

distribution = ot.Normal(2)
size = 50

Create the design

experiment = ot.MonteCarloExperiment(distribution, size)
sample = experiment.generate()

Plot the design

graph = ot.Graph("MC design", "x1", "x2", True, "")
cloud = ot.Cloud(sample, "blue", "fsquare", "")
graph.add(cloud)
view = viewer.View(graph)
plt.show()
MC design

Total running time of the script: ( 0 minutes 0.087 seconds)

Gallery generated by Sphinx-Gallery