  In this work, we test the cosmic distance duality relation (CDDR) by
comparing the angular diameter distance (ADD) derived from the transverse
Baryon Acoustic Oscillations (BAO) data with the luminosity distance (LD) from
the Pantheon type Ia supernova (SNIa) sample. The binning method and Gaussian
process are employed to match ADD data with LD data at the same redshift.
First, we use nonparametric and parametric methods to investigate the impact of
the specific prior values of the absolute magnitude $M_{\rm B}$ from SNIa
observations and the sound horizon scale $r_{\rm s}$ from transverse BAO
measurements on the CDDR tests. The results obtained from the parametric and
non-parametric methods indicate that specific prior values of $M_{\rm B}$ and
$r_{\rm s}$ lead to significant biases on the CDDR test. Then, to avoid these
biases, we propose a method independent of $M_{\rm B}$ and $r_{\rm s}$ to test
CDDR by considering the fiducial value of $\kappa\equiv10^{M_{\rm B} \over
5}r_{\rm s}$ as a nuisance parameter and then marginalizing its influence with
a flat prior in the analysis. No violation of the CDDR is found, and the
transverse BAO measurement can be used as a powerful tool to verify the
validity of CDDR in the cosmological-model-independent method.
