Simulates, via Monte Carlo,
the (possibly hyper) volume* of a "brick",
i.e., a cuboid (a rectangular parallelepiped or "box") with n
(3 in the base problem) correlated Gaussian sides:
L, length, W, width, and H, height,
with given mean and standard deviations, μ and σ,
and correlations, ρ (in 0–1), given as
matrix Ρ (capital ρ).
In order to simulate correlated variables,
compute (here, for Gaussians):
- Covariance matrix, C
('cov_mat' in the results), as cij =
σi σj ρij,
i, j = 1..n;
- Vector g = Φinv(r), with r
a uniform random vector;
- Vector d = LC g,
with LC = Chol(C), such that
C = LC LCT
(not the 'L D L' Cholesky factorization);
and
- Vector x =
μ + d.
The Cholesky decomposition can be
independently computed in this same site.
(*Or area, if 2D, etc..)
From the quantiles,
plow and pupp, are computed
xlow and xupp,
such that Pr(xlow < X <
xupp) =
pupp − plow = 90%
(this value for the base data). (For continuous variables,
'<' and '≤' are interchangeable.)
(Tolerance is for the inversion of the
Gaussian distribution.)
NB: currently (Aug'17),
due to a temporary system admin. error (beyond our reach), the graph axes
show no symbols: x-coordinate V, y1-coordinate f,
and y2-coordinate F. (Provisionally, in order to show
the symbols, non-italic font is used.)
Some theoretical values and the simulated results
are given, and a plot is shown for the (simulated)
'pdf' and 'cdf'.
Other suggested data: correlation34.xlsm, a 4D example
(with a macro from unreported source). |