A cavity theory based on the application of the electron transport equation in the cavity and the surrounding medium, referred to as L-L cavity theory in this paper, is discussed. The L-L cavity theory is a very detailed theory that considers electron production in the cavity as well as in the wall, and is applicable to all cavity sizes. The main idea of this cavity theory is that the effect of the cavity on the energy deposition of electrons inside it can be attributed to a virtual electron source uniformly distributed in the cavity. Monte Carlo calculations have been used to determine the effect of the virtual electron source on the relative ionization density in the cavity. In particular, the Monte Carlo method has been used to compute the parameter k(E, a), which is the fraction of the energy deposited in the cavity relative to the initial energy of electrons, given an electron source uniformly distributed in the cavity. The total energy deposition of the virtual electron source in the cavity may also be obtained. The calculated results agree well with the experimental results from Attix et al (Attix F H, Vergne L D and Ritz V H 1958 J. Res. NBS 60 235-43) and show that the L-L cavity theory gives a more accurate prediction of the cavity response at low energies than do other cavity theories.