## 2 Methodology
### Bayesian Inference and the Kalman Ensemble Generator
The EnKf update equation is given by [15]:  
\[\mathbf{\hat{m}}^{i}=\mathbf{m}_{prior}^{i}+\mathbf{C}_{mg}^{e}(\mathbf{C}_{gg}^ {e}+\mathbf{C}_{D}^{e})^{-1}\cdot(\mathbf{d}_{i}-g(\mathbf{m}_{prior}^{i})), \tag{5}\]  
for \(i\in\{1,...,n_{ens}\}\). The covariances \(\mathbf{C}_{mg}^{e}\in\mathbb{R}^{n_{par}\times n_{obs}}\), and \(\mathbf{C}_{gg}^{e}\in\mathbb{R}^{n_{obs}\times n_{obs}}\) are derived from the prior ensemble given by matrix \(\mathbf{A}\in\mathbb{R}^{n_{par}\times n_{ens}}\) and the forward response ensemble given by matrix \(\mathbf{G}\in\mathbb{R}^{n_{obs}\times n_{ens}}\), where \(n_{obs}\) is the number of observations and \(n_{par}\) is the number of model parameters. Correcting the matrices \(\mathbf{A}\) and \(\mathbf{G}\) for their respective mean values, those are named \(\mathbf{A}^{\prime}\) and \(\mathbf{G}^{\prime}\), and can be used for covariance computation, as follows:  
\[\mathbf{C}_{mg}^{e}=\mathbf{A}^{\prime}\mathbf{G}^{\prime T}\frac{1}{n_{ens}- 1}\qquad\text{and}\qquad\mathbf{C}_{gg}^{e}=\mathbf{G}^{\prime}\mathbf{G}^{ \prime T}\frac{1}{n_{ens}-1}, \tag{6}\]  
where \(\mathbf{A}^{\prime}\) is derived from the matrix of ensemble means  
\[\mathbf{\overline{A}}=\mathbf{A}\mathbf{1}_{n_{ens}}, \tag{7}\]  
where \(\mathbf{1}_{n_{ens}}\mathbb{R}^{(n_{ens}\times n_{ens})}\) corresponds to the matrix with each element equal to \(1/n_{ens}\)[15]. The mean-corrected matrix is computed according to  
\[\mathbf{A}^{\prime}=\mathbf{A}-\mathbf{\overline{A}}. \tag{8}\]  
Matrix \(\mathbf{G}^{\prime}\) is computed analogously to matrix \(\mathbf{A}^{\prime}\). In the context of stationary inversion theory, the ensemble Kalman filter is called Kalman ensemble generator (KEG, [14]). In contrast to the MCMC samplers, the KEG does not use a Markov chain to explore the model parameter space. Instead, the KEG requires that the Gaussian assumption is applicable to all PDFs [28]. Likewise, the posterior PDF derived from the KEG update is considered a Gaussian; therefore, it can be understood as a Gaussian approximation to the true (non-Gaussian) posterior PDF. In contrast, MCMC approaches converge to the exact posterior solution for near-exhaustive sampling. However, in MCMC computations, consecutive samples in the chain are correlated, causing lower efficiency than KEG for the following reasons. First, the early Monte Carlo samples might be biased and must be skipped; this corresponds to the so-called burn-in phase [8]. Second, due to the requirement of independent random samples in statistical analysis, only every \(n\)-th sample can be used to characterize the posterior PDF. Third, the acceptance rate of samples (using the mostly used Metropolis sampler) is between 30 and 50% [1]. Finally, the chain computations cannot be parallelized. In contrast, the KEG is built on independent random sampling without the need of rejection sampling and, consequently, each sample can (1) be used for the characterization of the posterior PDF and (2) be run fully in parallel. The KEG was only recently adopted for the inversion of geophysical data. [PERSON] et al. [12] applied it to the inversion of frequency-domain electromagnetic data to the probabilistic estimation of electrical conductivity and magnetic susceptibility. As for other probabilistic methods, a joint framework is readily available while using the KEG. In such frameworks, no weighing of different data types is necessary as long as significant errors in the parameter estimation are limited to Gaussian noise. Instead, the covariances available from Monte Carlo sampling determining the relative weight of each measurement. This holds for all types of measurement, irrelevant of the fact of whether the data are EM or DC resistivity data. The likelihood is generated by passing on all prior realizations in \(\mathbf{A}\) to both forward models \(g_{res}\) and \(g_{fdem}\). Thus, for the same EC realizations of the subsurface, signals for both measurement techniques are computed. Those responses are summarized in a forward response ensemble matrix  
\[\mathbf{G}=