Example of a random variable that is not iid What is an example of a random variable that is not i.i.d? The usual ones (coin flips, rolling of a dice) are all i.i.d, so I am trying to understand what is an example of a  random variable that is not i.i.d?
 A: A sequence of random variables (we need at least two!) can fail to be iid (independent and identically distributed) in three different ways: 


*

*The
random variables are not independent but they are identically distributed,

*The random variables are independent but are not identically distributed,

*The random variables are neither independent nor identically distributed.


For an example of 1., consider the "sampling without replacement" method
described in this answer. Or
consider an experiment in which we have a  bag containing two coins with 
different probabilities $p_1$ and $p_2$ of turning up Heads. We choose one of the coins
at random and toss the chosen coin $n$ times. Let $X_i$ be the indicator 
function of Heads on the $i$-th toss. Then, the law of total probability tells
us that
$$P\{X_i = 1\} = P\{X_i = 1\mid ~\text{coin #1}\}\times \frac 12
+ P\{X_i = 1\mid ~\text{coin #2}\}\times \frac 12 = \frac{p_1+p_2}{2}.$$
Thus, the $X_i$'s are identically distributed Bernoulli random variables
with parameter $\frac{p_1+p_2}{2}$. However, they are not independent
random variables since 
the law of total probability gives us that
$$P\{X_i=1, X_j=1\}=\frac{P\{X_i=1, X_j=1 \mid~\text{#1}\}
+ P\{X_i=1, X_j=1 \mid~\text{#2}\}}{2}
= \frac{p_1^2+p_2^2}{2}$$
which does not equal
$P\{X_i=1\}P\{X_j=1\} = \left(\frac{p_1+p_2}{2}\right)^2$.
For an example of 2., consider a similar experiment in which the
the $i$-th (independent toss) is of a coin that has probability $p_i$ 
different from $p_1, p_2, \ldots, p_{i-1}$. (Let $p_i = e^{-i}$ if
you need an explicit example). Then the $X_i$ are independent
Bernoulli random variables (by assumption)
but they are not identically distributed
since they all have different parameters.
I will leave the exercise of coming up with an example of 3. to you. 
A: A classic example would be a Markov chain.  As a simple example - imagine this process to generate variables.
xi+1 = xi + 1 with 50% chance and xi - 1 with 50% chance
The probability distribution for the value of x at any given iteration of the process is different and dependent on the history of the process - therefore the variable output by the process (or the Markov Chain) are random, but not i.i.d.
