  Cold dark matter model predicts that the large-scale structure grows
hierarchically. Small dark matter halos form first. Then, they grow gradually
via continuous merger and accretion. These halos host the majority of baryonic
matter in the Universe in the form of hot gas and cold stellar phase.
Determining how baryons are partitioned into these phases requires detailed
modeling of galaxy formation and their assembly history. It is speculated that
formation time of the same mass halos might be correlated with their baryonic
content. To evaluate this hypothesis, we employ halos of mass above
$10^{14}\,M_{\odot}$ realized by TNG300 solution of the IllustrisTNG project.
Formation time is not directly observable. Hence, we rely on the magnitude gap
between the brightest and the fourth brightest halo galaxy member, which is
shown that traces formation time of the host halo. We compute the conditional
statistics of the stellar and gas content of halos conditioned on their total
mass and magnitude gap. We find a strong correlation between magnitude gap and
gas mass, BCG stellar mass, and satellite galaxies stellar mass, but not the
total stellar mass of halo. Conditioning on the magnitude gap can reduce the
scatter about halo property--halo mass relation and has a significant impact on
the conditional covariance. Reduction in the scatter can be as significant as
30%, which implies more accurate halo mass prediction. Incorporating the
magnitude gap has a potential to improve cosmological constraints using halo
abundance and allows us to gain insight into the baryon evolution within these
systems.
