Linear Regression for iid sample: The value of $E(\epsilon_i^2|x_i)$ is not the same across i. Why? Linear Regression for iid sample (Y,X).
$E(\epsilon_i^2|X)=E(\epsilon_i^2|x_i)$, where $x_i$ is the i-th observation of k regressors, and epsilon is the error term.
The book I'm using states that from an iid sample we can deduce that $E(\epsilon_i^2)$ is constant across i, and also the functional form of $E(\epsilon_i^2|x_i)$ across i.
However, the value of $E(\epsilon_i^2|x_i)$ is not the same across i. Why is this?
Any help would be appreciated.
 A: Since this is linear regression, we assume the relation
$$y_i = \mathbf x_i'\beta + \epsilon_i,\;\; \forall i$$
and so the i.i.d. sample of size $n$ is, given our assumption, a collection of observations
$$\{y_i,\mathbf x_i\}_{\{i\in [1,n]\}} = \{\mathbf x_i'\beta + \epsilon_i,\mathbf x_i\}_{\{i\in [1,n]\}}$$
Note that we consider the statement "i.i.d. sample" to pertain to the joint distribution of the sample, i.e. of the $y$'s and the $\mathbf x_i$'s. This is the approach usually adopted in Econometrics (see for example Hayashi (2000) ch 1 p. 12 - legally downloadable). Viewed in this light, the "i.i.d. assumption" has some implications for the marginal distribution of the errors, as well as for autocorrelation (it implies no-autocorrelation of the errors), but it does not cover conditional homo/heteroskedasticity.
Specifically, if the sample is (or we assume it to be) i.i.d., then due to the assumed decomposition of $y_i$, it follows from the above that the $\epsilon_i$'s are i.i.d. and so 
$$E(\epsilon_i^2) = E(\epsilon_j^2),\;\; \forall i,j \in [1,n]$$
Also
$$E(\epsilon_i^2 \mid \mathbf x_i) = E((y_i - \mathbf x_i'\beta)^2 \mid \mathbf x_i) = E(y_i^2 - 2y_i\mathbf x_i'\beta+ (\mathbf x_i'\beta)^2 \mid \mathbf x_i)$$
$$=E(y_i^2 \mid\mathbf x_i) - 2\mathbf x_i'\beta E(y_i \mid \mathbf x_i) + (\mathbf x_i'\beta)^2 $$
The $\mathbf x_i$'s may be i.i.d. but this does not mean that each actual realization is identical (this would turn the regressors into constants). So, without further assumptions, in general we will have   
$$E(\epsilon_i^2\mid\mathbf x_i ) \neq E(\epsilon_j^2\mid\mathbf x_j),\;\; i,j \in [1,n]$$
In other words conditional homoskedasticity must be imposed as an additional assumption. Note also that the assumption of  strict exogeneity (or mean-independence) of the error vector with respect to  the regressor matrix, $E(\epsilon \mid \mathbf X) = 0$, which for an i.i.d. sample is equivalent to $E(\epsilon_i \mid \mathbf x_i) = 0,\; \forall i$, does not bring about conditional homoskedasticity, the latter remaining a distinct assumption.
A: 
However, the value of $E(\epsilon_i^2|x_i)$ is not the same across i.
  Why is this?

Let's first clarify that your book is most likely talking about the errors, not the residuals. The difference is that the former is not observable, while the latter is. Regression assumes that the true model is $y=X\beta+\varepsilon$, where $\varepsilon$ is a random error. It's not observable. 
The regression modeling will try to estimate the coefficients, and will come up with $y=Xb+e$, where $b$ is the estimated coefficients, and $e$ - residuals (estimated error). You are hoping that at least $X$ is correct, i.e. that you added all the true predictors, and didn't add wrong predictors. You hope that your model is correctly specified, then go ahead with estimating $b$ and $e$. Note, that at any moment you do not observe true errors $\varepsilon$. Therefore, your statement above seems to be stemming from confusion of errors and residuals. You can't really state that expectations of errors are correlated with predictors, because you don't observe them. You don't observe erros, and it's even less observable are their expectations. You can suspect that they are, and run some tests on residuals to support your suspicion.
The residuals are observable, of course. You estimated them. How are you going to estimate the expectation of residuals like in your statement above? You observe individual residuals $e_i$, but how would get $E[e_i]$? On the other hand $E[e|X]=0$ is guaranteed by the regression. It's just how the regression works: it will estimate residuals in such a way that this will be held true.
