Observations of ionic, atomic, or molecular lines are performed to improve our understanding of the interstellar medium (ISM). However, the potential of a line to constrain the physical conditions of the ISM is difficult to assess quantitatively, because of the complexity of the ISM physics. The situation is even more complex when trying to assess which combinations of lines are the most useful. Therefore, observation campaigns usually try to observe as many lines as possible for as much time as possible. We have searched for a quantitative statistical criterion to evaluate the full constraining power of a (combination of) tracer(s) with respect to physical conditions. Our goal with such a criterion is twofold. First, we want to improve our understanding of the statistical relationships between ISM tracers and physical conditions. Secondly, by exploiting this criterion, we aim to propose a method that helps observers to make their observation proposals; for example, by choosing to observe the lines with the highest constraining power given limited resources and time. We propose an approach based on information theory, in particular the concepts of conditional differential entropy and mutual information. The best (combination of) tracer(s) is obtained by comparing the mutual information between a physical parameter and different sets of lines. The presented analysis is independent of the choice of the estimation algorithm ( neural network or $ minimization). We applied this method to simulations of radio molecular lines emitted by a photodissociation region similar to the Horsehead Nebula. In this simulated data, we considered the noise properties of a state-of-the-art single dish telescope such as the IRAM 30m telescope. We searched for the best lines to constrain the visual extinction or the ultraviolet illumination field . We ran this search for different gas regimes, namely translucent gas, filamentary gas, and dense cores. The most informative lines change with the physical regime ( cloud extinction). However, the determination of the optimal (combination of) line(s) to constrain a physical parameter such as the visual extinction depends not only on the radiative transfer of the lines and chemistry of the associated species, but also on the achieved mean signal-to-noise ratio. The short integration time of the CO isotopologue $J=1-0$ lines already yields much information on the total column density for a large range of ( ) space. The best set of lines to constrain the visual extinction does not necessarily combine the most informative individual lines. Precise constraints on the radiation field are more difficult to achieve with molecular lines. They require spectral lines emitted at the cloud surface ( and lines). This approach allows one to better explore the knowledge provided by ISM codes, and to guide future observation campaigns.