environmentaltools.common.bidimensional_ecdf

environmentaltools.common.bidimensional_ecdf(data1: ndarray, data2: ndarray, num_bins: int)[source]

Compute empirical 2D cumulative distribution function (ECDF).

Calculates the joint empirical CDF for two variables using a 2D histogram approach with cumulative summation.

Parameters:
  • data1 (np.ndarray) – Values of the first variable.

  • data2 (np.ndarray) – Values of the second variable.

  • num_bins (int) – Number of bins for the 2D histogram in each dimension.

Returns:

(x_mesh, y_mesh, ecdf_values) - 2D meshgrids of bin centers and

corresponding cumulative probability values.

Return type:

tuple