When light passes through a medium, the intensity of light that successfully makes it through depends on the chemical composition of the medium, how concentrated the medium is, and how far the light travels through it.
Light passing through a medium can be thought of as having a small chance of being absorbed for each small step it takes through the medium. This is described by a differential equation:
\(\frac{dI}{dx} = -kcI\)
where \(I\) is concentration, \(x\) is distance traveled, \(c\) is concentration, and \(k\) is a proportionality constant.