  We present a selection technique to detect Compton-thick (CT) active galactic
nuclei (AGNs) in the 3XMM/SDSS-DR7 cross-correlation. A subsample of 3481 X-ray
sources that are detected in the hard band (2-8 keV) and have photometric
redshifts constitute our parent sample. We first applied an automated
spectral-fitting procedure to select highly absorbed sources (N_H > 10^23
cm^-2). We found 184 highly absorbed candidates. Then, we performed the
Bayesian Monte Carlo Markov chains (MCMCs) selection technique to find CT AGNs.
We also tested the MCMC selection technique by applying Monte Carlo
simulations. We found that the method is accurate at 90 percent independently
of the nature of the underlying source. Our sample contains 52 bona fide CT
AGNs. The CT AGNs were selected to have a range > 0.75 of probability of being
CT when either fitting with the two models Torus and MYTorus. About 75 percent
of CT AGNs in our sample had probabilities > 90 percent. From the spectral
analysis, we significantly found an anticorrelation between the equivalent
width of the neutral Fe K_{\alpha} line and the X-ray luminosity at 2-10 keV,
the so-called X-ray Baldwin effect.
