Environmental differences in the stellar populations of early-type galaxies are explored using principal component analysis ( PCA ) , focusing on differences between elliptical galaxies in Hickson Compact Groups ( HCGs ) and in the field . The method is model-independent and purely relies on variations between the observed spectra . The projections ( PC1 , PC2 ) of the observed spectra on the first and second principal components reveal a difference with respect to environment , with a wider range in PC1 and PC2 in the group sample . We define a spectral parameter ( \zeta \equiv 0.36 PC1 - PC2 ) which simplifies this result to a single number : field galaxies have a very similar value of \zeta , whereas HCG galaxies span a wide range in this parameter . The segregation is found regardless of the way the input SEDs are presented to PCA ( i.e . changing the spectral range ; using uncalibrated data ; subtracting the continuum or masking the SED to include only the Lick spectral regions ) . Simple models are applied to give physical meaning to the PCs . We obtain a strong correlation between the values of \zeta and the mass fraction in younger stars , so that some group galaxies present a higher fraction of them , implying a more complex star formation history in groups . Regarding “ dynamically-related ” observables such as a _ { 4 } or velocity dispersion , we find a correlation with PC3 , but not with either PC1 or PC2 . PCA is more sensitive than other methods based on a direct analysis of observables such as the structure of the surface brightness profile or the equivalent width of absorption lines . The latter do not reveal any significant variation between field and compact group galaxies . Our results imply that the presence of young stars only amounts to a fraction of a percent in its contribution to the total variance , reflecting the power of PCA as a tool to extract small variations in the spectra from unresolved stellar populations .