# Does the assumption of “independent and identically distributed” apply to the actual sample data or the sampling process?

While studying statistics, I came across the concept of “independent and identically distributed random variables” or IID.

I’m confused as to what that applies to in practice, mainly, does it apply to the sampled data or the sampling process?

Let’s say I’m continually running a survey (via simple random sampling) asking users whether they like/dislike a service I provide. The data would not pass IID assumption because: 1. The distribution of likes/dislikes will fluctuate over time based on service quality fluctuations (not identically distributed) and 2. The proportion of likes/dislikes will likely have trends and be autocorrelated (not independent).

So if IID applies to the sample data, it does not pass muster in this scenario; however, if applied to the sampling process, then it does pass because using simple random sampling means each user had the same probably of being selected to take the survey (identically distributed) and one user being selected has no impact on future users being selected (independent).

Are my conclusions above correct? When checking for IID assumption in statistical modeling, am I checking it against the data distribution itself or the process that generated the data (sampling methodology)?

As noted in my answer to the linked question, the operational meaning of the IID assumption is based on the condition of exchangeability via the "representation theorem" of Bruno de Finetti and others. Suppose you have an observable sequence $$\mathbf{X}=(X_1,X_2,X_3,...)$$ with empirical distribution $$F_\mathbf{x}$$. The representation theorem says that if the values in the sequence are exchangeable then you get the conditional IID result:
$$X_1,X_2,X_3, ... | F_\mathbf{x} \sim \text{IID } F_\mathbf{x}.$$
This means that the condition of exchangeability of an infinite sequence of values is the operational condition required for the values to be independent and identically distributed (conditional on some underlying distribution function). The theorem can be applied in both Bayesian and classical statistics (see O'Neill 2009 for further discussion), and in the latter case the underlying empirical distribution is treated as an "unknown constant" which effectively gives the corresponding marginal IID result. Note also that in parametric models, the distribution $$F_\mathbf{x}$$ is usually indexed by a small number of real parameters, which means that the observable data values are IID conditional on those parameters.