Optical density and mass density are not related to each other mass density is mass per unit volume. It is not possible that mass density of an optically denser medium may be less than that of an optically rarer medium (optical density is the ratio of the speed of light in two media), e.g., turpentine and water. Mass density of turpentine is less than that of water but its optical density is higher.