We use a large volume-limited sample of disk galaxies drawn from the Sloan Digital Sky Survey Data Release 7 to study the dependence of the bar fraction on the stellar-to-halo mass ratio , making use of a group catalog , we identify central and satellite galaxies in our sample . For the central galaxies in the sample we estimate the stellar-to-halo mass ratio ( M _ { \mathrm { * } } / M _ { \mathrm { h } } ) and find that the fraction of barred galaxies is a strong function of this ratio , especially for the case of strong bars . Bars are more common in galaxies with high M _ { \mathrm { * } } / M _ { \mathrm { h } } values , as expected from early theoretical works that showed that systems with massive dark matter halos are more stable against bar instabilities . We find that the change of the bar fraction with M _ { \mathrm { h } } and M _ { \mathrm { * } } is stronger if we consider a relation with the form f _ { \mathrm { bar } } = f _ { \mathrm { bar } } ( M _ { \mathrm { * } } ^ { \alpha } / M _ { \mathrm { h } } ) with \alpha = 1.5 , and that the bar fraction is largely independent of other physical properties such as color and spin parameter when M _ { \mathrm { * } } ^ { 3 / 2 } / M _ { \mathrm { h } } is fixed . With our sample of galaxies segregated into centrals and satellites , we also compare the fraction of barred galaxies in each group , finding a slightly higher bar fraction for satellites when compared with centrals at fixed stellar mass , but at fixed color this difference becomes very weak . This result , in agreement with previous studies , confirms that the bar fraction does not directly depend on the group/cluster environment , but the dependence exists through its dependence on internal morphology .