emblem
Bricks with (3D) correlated sides
Simulates (Monte Carlo) the volume of bricks (cuboids) with 3D (or other) correlated sides.
2024.May.04 20:54:21
μ Length, width, height (etc.) means. •
σ Respective standard deviations. •
Ρ
(capital ρ)
Correlation matrix. •
plow, pupp % Quantiles. •
N, .seed 10 ^ N. of items ("lot size"), random no. gener. seed. •
tol, klass Tolerance, n. of histogram classes. •
Show values Shows the coordinates of the graph. •

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):

 

  1. Covariance matrix, C ('cov_mat' in the results), as cij = σi σj ρij, i, j = 1..n;
  2. Vector g = Φinv(r), with r a uniform random vector;
  3. Vector d = LC g, with LC = Chol(C), such that C = LC LCT (not the 'L D L' Cholesky factorization); and
  4. 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) = puppplow = 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).

References: Plate: CorrelatedBrick

• Google: "parallelepiped"

• Rowland, Todd and Weisstein, Eric W. "Parallelepiped." From MathWorld--A Wolfram Web Resource.

• Wikipedia "Cuboid ("brick") (rectangular —).

• Google: simulation correlated variables; generating correlated random variables using cholesky decomposition

• Google: Cholesky decomposition (Cholesky factorization)

Haugh, Martin, The Monte Carlo framework, ....pdf (Columbia Univ.).

• 1909-08-15: Krylov, Aleksey Nikolaevich (Алексей Николаевич Крылов) (1945-10-26).

 
 
Valid HTML 4.01! IST http://web.tecnico.ulisboa.pt/~mcasquilho/compute/or/Fx-correlatedBricks.php
Created: 2017-08-15 — Last modified: 2017-09-27