The "ideal world" index fund of any asset class is a perfect percentage holding of all underlying assets with immediate rebalancing that aligns to every change in the index weighting while trading in a fully liquid market with zero transaction costs. One finance text book that describes this is Introduction to Finance: Markets, Investments, and Financial Management, see chapter 11.
Practically, the transaction costs and liquidity make this unworkable. There are several deviations between what the "ideal world algorithm" ("the algorithm") says you should do and what is actually done.
- QUANTIZATION EFFECTS (A): If the algorithm says you should buy 2,000 shares of INTC today and every day this week... why not just buy 10,000 shares on Wednesday and reduce the number of transactions?
- QUANTIZATION EFFECTS (B): If the algorithm says you should buy 20 shares of AAPL today and every day this week... why not just buy 100 shares on Wednesday to get the round lot?
- SUBSTITUTION EFFECTS (A): If the algorithms says you should start buying shares of INTC but you already have IBM and analysis says they are strongly correlated... why not just buy more IBM, you'll save money when you exit the position?
- SUBSTITUTION EFFECTS (B): If ABX was just added to the index today and you need to buy lots of shares now but the market is not liquid enough... why not purchase from options or other similar assets to get the desired exposure?
- WINDOW DRESSING: If the end of quarter is coming and your disclosure is due, why not dump your ugly holdings or smart ideas and then buy them back the next day?
- ALTERNATE MARKETS: If the assets is available in New York at $20, why not get the same thing in London for $19.98?
Each of these items addresses a real-world solution to various costs of managing a passive index fund. (And they are good solutions.) However, any deviation from the ideal index fund will have a risk.
An investor evaluating their choices is left to pick the lowest fees with the least deviation from the ideal index fund. (It is customary to ignore whether the results are in excess or deficit to the ideal).
So your formula is:
Deviation ROOT(MEAN(SQUARE(DIFFERENCE(Passive fund return, Ideal return)))
This is also described in the above book.