Air molecules in a balloon are moving randomly (or so stipulates quantum mechanics). But science does not handle that by describing a sequence of one molecular interaction giving rise to the next and the next, in a chain. Instead, science describes how the molecules altogether have collective characteristics, such as pressure and the number of molecules contained in the balloon. Then these group traits can very productively be related in equations since the pressure is related to the number of molecules. The two traits, pressure and number, are related—they change together—because they are two ways of measuring the same thing (the molecules as a group).
What can be done with a bunch of random behavior is to see how they altogether have group features (such as counting them) rather than fitting them into a program of one event leading to the next in a causal sequence. Then one such feature can be related to another for the reason that when we find features in that manner, the features are different ways of looking at the same situation.
So that shows both how science can handle randomness without resorting to probabilities and also it shows how equations can be made even about random events. Equations describe how features are related, and in this example, the features are pressure and the number of molecules. One way of looking at randomly moving molecules in a container is to realize how altogether they have pressure, and another way is to count them. So being about the same thing (the air molecules altogether), the two ways of measuring are related.
Science has succeeded in being productive in spite of the randomness, and it has done so by rendering individual variation beside the point of how it is achieving something else. In this case, it has rendered the individual variation irrelevant by the method of looking only at collective traits, but science has many such methods, as will be discussed.
Instead of resorting to statistics and probabilities, and instead of asserting that random activity can successfully be treated as causal chaining, science simply chooses to measure things in a way that creates reproducible data.
Furthermore, this example shows how the equations are not functioning as a rule which the individuals are obeying—the laws are not deterministic—since the individual molecules are still acting randomly. It is just that, again, the randomly moving molecules have collective traits which can be related, so the equations are describing relationships, not rule-following. In other words, causal chaining is not rescued by appeals to determinism. It is not that a line of causation can still be found by knowing some deterministic law (as if the causation is subsequent to the governance of the law, so that at each step of the way there is in a continuous line in accordance with the law). An equation such as PV = nRT is not dictating what the molecules can do, but rather it is relating group traits.*
In that way, science is not stopped from making predictions by encountering randomness but rather it can make explanations, inferences, predictions, and even equations from choosing to measure the group rather than measuring individuals.
*A fuller explication of PV = nRT, including the V and the T, is as follows. Air molecules spread out until they equal the volume of their container. So the volume V of the balloon is the same as the volume V of the air molecules collectively. And the temperature T is the average kinetic energy of the air molecules (but an average, of course, is also a property of the molecules altogether). The R is a constant. And P is for pressure, and the n is for number. So all four of the variables are properties of the air molecules as a collective, which is why in practice they are different ways of measuring the same thing (the molecules as a group). Being measurements of the same thing enables them to be related in equations. A comparison of how various causal theorists describe this equation can be found in James Woodward’s Making Things Happen: A Theory of Causal Explanatio, page 6. (The equation PV = nRT is one of the two equations most commonly cited by such theoriests as portraying a causal sequence of one event leading to the next and the next).