Assumptions of Randomness in Formulas for Sample Mean, Error I am reading J. Mandel's book on Analysis of Experimental Data. He states at one point that if a sample is not random ( i.e.,$X_1, X_2,..., X_n$ are not an independent, i.d. set) then the formulas for sample mean and standard error cannot be used. I'm having trouble seeing where/how these assumptions are missed in these formulas. Any ideas?
 A: TL;DR look at the central limit theorem.
First of all, let me say that there are dependent i.d. variables that are random. For example, in many stochastic processes a value at time $t$ influences the value of the stochastic process at time $t+1$. What the author probably tried to say is that these formulas "require" $X_1,X_2,...X_n$ to be iid random variables, independent identically-distributed random variables. If we obtain a sample, e.g. on experimental data, this sample contains realisations of such a sequence of random variables.
You can always use the formula for sample mean and SE in any circumstances. The issue is you shouldn't: The central limit theorem (CLT) guarantees that the distribution of the sample mean will converge to a Normal distribution with a certain mean and variance (standard error). This theorem requires the variables to be iid. If you do not have this given, the CLT does not apply and therefore using these formulas would not be meaningful.
Another aspect is that the sample mean is an unbiased estimator of population population mean as long as you obtain your data through a simple random sample. If you use more complex sampling methods, your estimators for the population mean might change.
Googling will find you some more answers on what the CLT is (in fact there are many, as people were able to extend the behaviour to all kinds of situations where variables aren't iid). Statistics is all about matching estimators, models, processes etc. to certain properties you believe are true about the random variables underlying your data.
