Inelastic beam-gas collisions at the Large Hadron Collider (LHC), within a few hundred metres of the ATLAS experiment, are known to give the dominant contribution to beam backgrounds. These are monitored by ATLAS with a dedicated Beam Conditions Monitor (BCM) and with the rate of fake jets in the calorimeters. These two methods are complementary since the BCM probes backgrounds just around the beam pipe while fake jets are observed at radii of up to several metres. In order to quantify the correlation between the residual gas density in the LHC beam vacuum and the experimental backgrounds recorded by ATLAS, several dedicated tests were performed during LHC Run 2. Local pressure bumps, with a gas density several orders of magnitude higher than during normal operation, were introduced at different locations. The changes of beam-related backgrounds, seen in ATLAS, are correlated with the local pressure variation. In addition the rates of beam-gas events are estimated from the pressure measurements and pressure bump profiles obtained from calculations. Using these rates, the efficiency of the ATLAS beam background monitors to detect beam-gas events is derived as a function of distance from the interaction point. These efficiencies and characteristic distributions of fake jets from the beam backgrounds are found to be in good agreement with results of beam-gas simulations performed with the Fluka Monte Carlo programme.