Moon (2010) Three-Dimensional Function#
import numpy as np
import matplotlib.pyplot as plt
import uqtestfuns as uqtf
The three-dimensional function from [Moo10] (or Moon3D for short)
is a scalar-valued test function used in [Moo10] to illustrate
the analytical derivation of Sobol’ sensitivity indices.
Test function instance#
To create an instance of the test function:
my_testfun = uqtf.Moon3D()
Check if it has been correctly instantiated:
print(my_testfun)
Function ID : Moon3D
Input Dimension : 3 (fixed)
Output Dimension : 1
Parameterized : False
Description : Three-dimensional function from Moon (2010)
Applications : sensitivity
Description#
The function Moon3D is a three-dimensional function given by the following
formula[1]:
where \(\boldsymbol{x} = \{ x_1, x_2, x_3 \}\) is the three-dimensional vector of input variables further defined below.
Probabilistic input#
Based on [Moo10], the probabilistic input model for the function consists of three independent uniform random variables with the ranges shown in the table below.
Function ID : Moon3D
Input ID : Moon2010
Input Dimension : 3
Description : Probabilistic input model for the 3D test function from
Moon (2010)
Marginals :
No. Name Distribution Parameters Description
----- ------ -------------- ------------ -------------
1 X1 uniform [0 1] -
2 X2 uniform [0 1] -
3 X3 uniform [0 1] -
Copulas : Independence
Reference results#
This section provides several reference results of typical UQ analyses involving the test function.
Sample histogram#
Shown below is the histogram of the output based on \(100'000\) random points:
Moment estimations#
The mean and variance of the test function can be computed analytically,
and the results are:
\(\mathbb{E}[Y] = \frac{7}{4}\)
\(\mathbb{V}[Y] = \frac{41}{48}\)
Shown below is the convergence of a direct Monte-Carlo estimation of the output mean and variance with increasing sample sizes compared with the analytical values.
The tabulated results for each sample size is shown below.
| Sample size | Mean | Mean error | Variance | Variance error | Remark |
|---|---|---|---|---|---|
| nan | 1.7500e+00 | 0.0000e+00 | 8.5417e-01 | 0.0000e+00 | Analytical |
| 1.0e+01 | 1.9308e+00 | 2.2489e-01 | 5.0574e-01 | 2.3841e-01 | Monte-Carlo |
| 1.0e+02 | 1.7542e+00 | 9.0128e-02 | 8.1230e-01 | 1.1546e-01 | Monte-Carlo |
| 1.0e+03 | 1.7659e+00 | 2.8957e-02 | 8.3850e-01 | 3.7518e-02 | Monte-Carlo |
| 1.0e+04 | 1.7683e+00 | 9.2884e-03 | 8.6274e-01 | 1.2202e-02 | Monte-Carlo |
| 1.0e+05 | 1.7464e+00 | 2.9085e-03 | 8.4594e-01 | 3.7832e-03 | Monte-Carlo |
| 1.0e+06 | 1.7500e+00 | 9.2445e-04 | 8.5461e-01 | 1.2086e-03 | Monte-Carlo |
| 1.0e+07 | 1.7498e+00 | 2.9220e-04 | 8.5380e-01 | 3.8183e-04 | Monte-Carlo |
Sensitivity indices#
The main-effect and total-effect Sobol’ indices of the test function can be
derived analytically.
Input |
Main-effect (\(S_i\)) |
Total-effect (\(ST_i\)) |
|---|---|---|
\(x_1\) |
\(\frac{25}{41}\) |
\(\frac{28}{41}\) |
\(x_2\) |
\(\frac{4}{41}\) |
\(\frac{4}{41}\) |
\(x_3\) |
\(\frac{9}{41}\) |
\(\frac{12}{41}\) |
References#
Hyejung Moon. Design and analysis of computer experiments for screening input variables. PhD thesis, Ohio State University, Ohio, 2010. URL: http://rave.ohiolink.edu/etdc/view?acc_num=osu1275422248.