What makes any discussion about middle gray difficult is that there are many different types of middle gray - physical world, camera image, meter, perceptual.
The first three types are cover in some detail in the thread "Is the F factor relevant or should I cancel it out?"
According to exposure theory, 100% reflectance falls at a point approximately 0.92 log units above the metered exposure, which makes it Zone VIII. The shadow falls approximately 1.28 log units below or 0.6% reflectance. Flare brings the shadows up 0.34 log units to have them fall 0.94 log units below the metered exposure. The metered exposure will then fall at 12% reflectance. I've attach an example showing the range of Reflectances, Reflection Densities, and exposure values w/ and w/out flare for the average scene.
Color is a psychophysical phenomenon. We don't see tones in a linear way as Ralph's reference to Fechner describes. Munsell found that 18% was the perceived middle gray using a 10 step scale. In the early 1940s, the Optical Society of America's Committee on Colorimetry, chaired by Loyd Jones, found it to be 19.7%. They published their findings as a book sometime in the fifties under the title The Science of Color. I've attached a comparison of both scales.
Ralph, am I correct in assuming your equation comes from CIE? Could you break it down more and define the source of the variables?