Describing approach in code.

Suppose that there are two vectors of \(n = 100\) elements: \(x = {x_1, …, x_n} = {-10, -9.79, \cdots, …, 9.79, 10}\), \(y = {y_1, …, y_n} = {-10, -9.79, \cdots, …, 9.79, 10}\).

They can crate a grid \(100\times 100\) elements.

Define a matrix, called PDF. Each element of matrix is a real value of two variable function \(pdf = F\) which present a three exponential peaks.

\[PDF = \begin{bmatrix} F_{11}({x_1,y_1}) & F_{12}({x_1,y_2}) & \dots & F_{1n}({x_1,y_n}) \\ F_{21}({x_2,y_1}) & F_{22}({x_2,y_2}) & \dots & F_{2n}({x_2,y_n}) \\ \vdots & \vdots & \ddots & \vdots \\ F_{n1}({x_n,y_1}) & F_{n2}({x_n,y_2}) & \dots & F_{nn}({x_n,y_n}) \end{bmatrix}\]

Now let’s create CDF for first argument in bivariate function. Firstly, creating CDF matrix. Each row in it is a partial sum of PDF row.

\[CDF = \begin{bmatrix} F_{11} & F_{11} + F_{12} & F_{11} + F_{12} + F_{13} & \dots \\ F_{21} & F_{21} + F_{22} & F_{21} + F_{22} + F_{23} & \dots \\ \vdots & \vdots & \vdots & \vdots \\ F_{n1} & F_{n1} + F_{n2} & F_{n1} + F_{n2} + F_{n3} & \dots \end{bmatrix}\]