What is the relationship (a mathematical one) between the density and the refractive index of a medium?
For a given composition of material, the index n at a given wavelength is proportional to density ρ - actually the difference (n-1) is proportional to ρ, since n can be less than 1. But there's a LOT more to calculating the refractive index of a given material at a given wavelength than just it's density.