Confusion about independent and identically distributed? Say that I wish to measure the height of male within the population (so gender=Male is the only factor I am accounting for). Say I collect 100 observations of male height from an elderly population. This is not representative of male heights because it is heights of males of a particular age range. Since my sample age may differ from the population average, if i derive a MLE, then it will be completely different to the population parameter.
Am I violating the assumption that my random variables are iid?
 A: Your random variables are still iid, or at least they could be if they are independently chosen from heights in that same elderly male subpopulation.
The properties of the MLE will depend on what the distribution is in that subpopulation.  Suppose that the distribution of height is Normal in the population and also Normal (with different mean and variance) in the subpopulation.  The MLE based on your sample will estimate the subpopulation mean and variance. It will have all the nice properties guaranteed for MLEs in iid samples as an estimate the subpopulation mean and variance.  It won't be a good estimate of the population mean and variance, because those are different.
You're not violating the assumption that the sampled random variables are iid; you're violating the much more basic assumption that the distribution of the sample answers your research question.
A: It seems like you have two questions in one.
First, you're asking whether sampling heights from a population of older males is IID. I believe that it is, because the samples are in no way dependent on each other. If you randomly sample older males to measure their heights, each sample is independent (since it's totally random) and they will be identically distributed because the samples are coming from the same population/distribution. You can think of this as: if I collect 1,000 of these samples and then another 1,000 , these two big sample groups should have the same distribution (as each sample within each group was taken from the same "parent" distribution).
You bring up a second question though, about your sampling being from older males, so your average height would be being totally different from the total population of people of any age/gender. This is certainly correct. However, I'm not sure this point has any connection with your question about being IID.
Scenario A - If you randomly sample heights from older male population: your samples will be independent and all coming from same distribution (identically distributed).
Scenario B - If you randomly sample heights from ALL people: your samples will still be independent, and all samples will still come from the same "parent" distribution (identically distributed). The "parent" distribution is different than in Scenario A, but all your samples are coming from the same one.
In both cases, your samples are IID. You're just sampling from different populations (statistically and demographically speaking), so you're estimating different parameters (since the true mean height is different for these two populations).
Hope that helps!
Anyone please correct me if my basic stats are rusty!
