Non-IID data contains observations that are dependent, drawn from different distributions, or both. Unlike repeated flips of the same coin, where outcomes are independent and identically distributed, non-IID observations often reflect groups, repeated measurements, or changing conditions. section 2.1.1
A practical pattern
Sales from multiple stores are non-IID when transactions from the same store are correlated and store dynamics differ. School surveys can show the same pattern because students in a class share characteristics and experiences. Repeated measures and time-series observations introduce dependence as well. section 2.1.1
A visible signal is a change in the sequence’s distribution: values may appear stable at first and then jump after some observations. Such structure means row order and sampling choices can carry information rather than being harmless bookkeeping. section 2.1.1
Account for non-IID structure when you:
- Create cross-validation folds, because random sampling may separate related observations or groups in misleading ways. section 2.1.1 section 2.5
- Use bootstrapping or subsampling, since dependence and distribution differences can affect their validity. section 2.5
- Explore the data with value counts, descriptions, histograms, box plots, correlation matrices, or low-dimensional projections to reveal group structure and problems. section 2.5
