Statistical inference · Definition
Random sample
Before you start you need to know
It is the way to turn a few observations into information about an entire population.
Definition
A random sample of size \(n\) is a set of \(n\) independent random variables \(X_i\), all with the same distribution, that represent \(n\) observations from a population.
In practice we can rarely observe a whole population, so we measure a part of it. For that part to say something reliable about the whole, each observation must come from the same mechanism and must not depend on the others. This idea is formalized with random variables \(X_1,\dots,X_n\): each \(X_i\) is the value we will get in observation \(i\) before measuring it, which is why it is random.
Independence lets us multiply probabilities: \(P(X_1\le a_1,\dots,X_n\le a_n)=\prod_i P(X_i\le a_i)\). Equal distribution means they all share the same law, with the same mean and variance. It does not mean they take the same value: two tosses of a fair coin have the same distribution and can give different results.
A guiding example is \(n\) independent tosses of a coin with \(P(\text{heads})=p\). Each specific sequence with \(k\) heads has probability \(p^k(1-p)^{n-k}\). The values already measured, \(x_1,\dots,x_n\), are called the observed sample; the \(X_i\) are their version before observation.
The typical mistake is calling any data set a random sample. Choosing acquaintances, taking a group whose members resemble each other, or drawing without replacement from a small population breaks independence or equal distribution. The sample mean and estimators are built on this foundation.
Think about it
If you draw two cards from a deck without replacement, are \(X_1\) and \(X_2\) a random sample?
No: the first card changes the deck's composition and thus the probabilities of the second; they are not independent. With replacement they would be.
Why are the \(X_i\) random variables and not numbers?
Because they describe the value of an observation before it is made; only after measuring do we get the numbers \(x_i\).
Exercises 10
- A coin with \(P(\text{heads})=\tfrac14\) is tossed 3 times independently. What is the probability of the sequence heads, tails, heads?
- A fair die is rolled 4 times. What is the probability that all 4 results are even?
- Which two properties define a random sample \(X_1,\dots,X_n\)?
- A variable takes the values 0, 1, 2 with probabilities \(0.2,\ 0.5,\ 0.3\). In a random sample of size 2, what is \(P(X_1=2,\ X_2=0)\)?
- A coin with \(P(\text{heads})=0.3\) is tossed 4 times independently. What is the probability that all 4 are tails?
- A random sample of the students of a school is wanted. Which procedure comes closest to that ideal?
- Two balls are drawn from an urn with 5 red and 5 blue. In which case do the two draws form a random sample?
- If \(X_1,\dots,X_n\) is a random sample, what holds for \(P(X_1\le a,\ X_2\le a)\)?
- The heights of 3 siblings are called a random sample of the adult population. What goes wrong?
- If \(X_1\) and \(X_2\) form a random sample of a discrete variable, which statement is true?
What comes next
References
- George Casella, Roger L. Berger, Statistical Inference, 2nd edition, Duxbury / Cengage, 2002. §5.1
- Ronald E. Walpole, Raymond H. Myers, Sharon L. Myers, Keying Ye, Probabilidad y estadística para ingeniería y ciencias, 9.ª edición, Pearson, 2012. §8.1
- Joseph K. Blitzstein, Jessica Hwang, Introduction to Probability, 2nd edition, CRC Press, 2019. §10.1