Index funds may follow a market index in various ways. For example, some invest in all securities in a market index, while others invest in only a sample of the securities in the market index.