In statistics, random variables are said to be i.i.d. – independently and identically distributed – if the following two conditions are met:
(1) Independent – The outcome of one event does not affect the outcome of another.
(2) Identically Distributed – The probability distribution of each event is identical.
The following scenarios illustrate examples of i.i.d. random variables in practice.
Example 1: Tossing a Coin
Suppose we toss a coin 10 times and keep track of the number of times the coin lands on heads.
This is an example of a random variable that is independently and identically distributed because the following two conditions are met:
(1) Independent – The outcome of one coin toss does not affect the outcome of another coin toss. Each toss is independent.
(2) Identically Distributed – The probability that a coin lands on heads on any given toss is 0.5. This probability does not change from one toss to the next.
Example 2: Rolling a Dice
Suppose we roll a dice 50 times and keep track of the number of times the dice lands on the number 4.
This is an example of a random variable that is independently and identically distributed because the following two conditions are met:
(1) Independent – The outcome of one dice roll does not affect the outcome of another dice roll. Each roll is independent.
(2) Identically Distributed – The probability that a dice lands on “4” on any given roll is 1/6. This probability does not change from one roll to the next.
Example 3: Spinning a Spinner
Suppose we spin a spinner 100 times that is equally split into four colors (red, blue, green, and purple) and keep track of the number of times that it lands on purple.
This is an example of a random variable that is independently and identically distributed because the following two conditions are met:
(1) Independent – The outcome of one spin does not affect the outcome of another spin. Each spin is independent.
(2) Identically Distributed – The probability that the spinner lands on purple on any given spin is 0.25. This probability does not change from one spin to the next.
Example 4: Choosing a Card
A standard deck of cards contains 52 cards, 4 of which are Queens. Suppose we randomly draw a card from a standard deck, then place the card back in the deck. Suppose we repeat this 100 times and keep track of the number of times we draw a Queen.
This is an example of a random variable that is independently and identically distributed because the following two conditions are met:
(1) Independent – The outcome of one draw does not affect the outcome of another draw. Each draw is independent.
(2) Identically Distributed – The probability that we choose a Queen on any given draw is 4/52. This probability does not change from one draw to the next.
Additional Resources
An Introduction to Random Variables
What is the Assumption of Independence in Statistics?
Can you provide realistic examples where each of these conditions are not met?
Thank you. Those are perfect examples that illustrate independent and identically distributed variables. But why are those attributes important in statistics and probability theory?
Hi Floyd…You are welcome! Those two properties are important because they make many statistical methods work the way we expect them to. Independence means that knowing the outcome of one observation does not give us information about another observation. Identically distributed means that each observation is being generated under the same probability model, so they all have the same underlying probabilities, mean, and variance.
For example, suppose we repeatedly flip the same fair coin. Each flip is independent of the others, and every flip has the same 50/50 probability of heads or tails. Because of this, we can reasonably expect that as the number of flips increases, the proportion of heads will get closer to 50%. This idea is closely related to the Law of Large Numbers.
The i.i.d. assumption also makes it possible to use many familiar statistical tools, including sample means, confidence intervals, hypothesis tests, and the Central Limit Theorem. In simple terms, it lets us treat a sample as a collection of comparable observations rather than a group of values that may be influencing one another or coming from completely different populations.
Of course, real-world data is not always i.i.d. Stock prices over time, weather measurements, and repeated measurements from the same person may be related to previous observations. When independence or identical distribution does not hold, we often need different statistical models that account for those relationships.