When observing a gas, it is typical to specify a frame of reference or length scale. A larger length scale corresponds to a macroscopic or global point of view of the gas. This region (referred to as a volume) must be sufficient in size to contain a large sampling of gas particles. The resulting statistical analysis of this sample size produces the "average" behavior (i.e. velocity, temperature or pressure) of all the gas particles within the region. In contrast, a smaller length scale corresponds to a microscopic or particle point of view.
Macroscopically, the gas characteristics measured are either in terms of the gas particles themselves (velocity, pressure, or temperature) or their surroundings (volume). For example, Robert Boyle studied pneumatic chemistry for a small portion of his career. One of his experiments related the macroscopic properties of pressure and volume of a gas. His experiment used a J-tube manometer which looks like a test tube in the shape of the letter J. Boyle trapped an inert gas in the closed end of the test tube with a column of mercury, thereby making the number of particles and the temperature constant. He observed that when the pressure was increased in the gas, by adding more mercury to the column, the trapped gas' volume decreased (this is known as an inverse relationship). Furthermore, when Boyle multiplied the pressure and volume of each observation, the product was constant. This relationship held for every gas that Boyle observed leading to the law, (PV=k), named to honor his work in this field.
There are many mathematical tools available for analyzing gas properties. As gases are subjected to extreme conditions, these tools become more complex, from the Euler equations  for inviscid flow to the Navier–Stokes equations that fully account for viscous effects. These equations are adapted to the conditions of the gas system in question. Boyle's lab equipment allowed the use of algebra to obtain his analytical results. His results were possible because he was studying gases in relatively low pressure situations where they behaved in an "ideal" manner. These ideal relationships apply to safety calculations for a variety of flight conditions on the materials in use. The high technology equipment in use today was designed to help us safely explore the more exotic operating environments where the gases no longer behave in an "ideal" manner. This advanced math, including statistics and multivariable calculus, makes possible the solution to such complex dynamic situations as space vehicle reentry. An example is the analysis of the space shuttle reentry pictured to ensure the material properties under this loading condition are appropriate.  In this flight regime, the gas is no longer behaving ideally.