It is a well known fact that recovery rates tend to go down when the number of defaults goes up in economic downturns. We demonstrate how the loss given default model with the default and recovery dependent via the latent systematic risk factor can be estimated using Bayesian inference methodology and Markov chain Monte Carlo method. This approach is very convenient for joint estimation of all model parameters and latent systematic factors. Moreover, all relevant uncertainties are easily quantified. Typically available data are annual averages of defaults and recoveries and thus the datasets are small and parameter uncertainty is significant. In this case Bayesian approach is superior to the maximum likelihood method that relies on a large sample limit Gaussian approximation for the parameter uncertainty. As an example, we consider a homogeneous portfolio with one latent factor. However, the approach can be easily extended to deal with non-homogenous portfolios and several latent factors.