  The gas is the dominant component of baryonic matter in most galaxy groups
and clusters. The spatial offsets of gas centre from the halo centre could be
an indicator of the dynamical state of cluster. Knowledge of such offsets is
important for estimate the uncertainties when using clusters as cosmological
probes. In this paper, we study the centre offsets $r_{\rm off}$ between the
gas and that of all the matter within halo systems in $\Lambda$CDM cosmological
hydrodynamic simulations. We focus on two kinds of centre offsets: one is the
three-dimensional PB offsets between the gravitational potential minimum of the
entire halo and the barycentre of the ICM, and the other is the two-dimensional
PX offsets between the potential minimum of the halo and the iterative centroid
of the projected synthetic X-ray emission of the halo. Halos at higher
redshifts tend to have larger values of rescaled offsets $r_{\rm off}/r_{200}$
and larger gas velocity dispersion $\sigma_{v}^{\rm gas}/\sigma_{200}$. For
both types of offsets, we find that the correlation between the rescaled centre
offsets $r_{\rm off}/r_{200}$ and the rescaled 3D gas velocity dispersion,
$\sigma_v^{\rm gas}/\sigma_{200}$ can be approximately described by a quadratic
function as $r_{{\rm off}}/r_{200} \propto (\sigma_{v}^{\rm gas}/\sigma_{200} -
k_2)^{2}$. A Bayesian analysis with MCMC method is employed to estimate the
model parameters. Dependence of the correlation relation on redshifts and the
gas mass fraction are also investigated.
