  Helioseismic techniques such as ring-diagram analysis have often been used to
determine the subsurface structural differences between solar active and quiet
regions. Results obtained by inverting the frequency differences between the
regions are usually interpreted as the sound-speed differences between them.
These in turn are used as a measure of temperature and magnetic-field strength
differences between the two regions. In this paper we first show that the
"sound-speed" difference obtained from inversions is actually a combination of
sound-speed difference and a magnetic component. Hence, the inversion result is
not directly related to the thermal structure. Next, using solar models that
include magnetic fields, we develop a formulation to use the inversion results
to infer the differences in the magnetic and thermal structures between active
and quiet regions. We then apply our technique to existing structure inversion
results for different pairs of active and quiet regions. We find that the
effect of magnetic fields is strongest in a shallow region above 0.985R_sun and
that the strengths of magnetic-field effects at the surface and in the deeper
(r < 0.98R_sun) layers are inversely related, i.e., the stronger the surface
magnetic field the smaller the magnetic effects in the deeper layers, and vice
versa. We also find that the magnetic effects in the deeper layers are the
strongest in the quiet regions, consistent with the fact that these are
basically regions with weakest magnetic fields at the surface. Because the
quiet regions were selected to precede or follow their companion active
regions, the results could have implications about the evolution of magnetic
fields under active regions.
