One measurement varies from trial to trial, and so does an average of several measurements, because a new sample can give a new average. Before the data arrive, the average is a random variable with its own probability distribution, and one observed average is only a single value from it. This lesson builds that distribution exactly for small discrete models, keeps the observations, the sample, the statistic and its observed value apart, and shows how the spread of the average depends on the sample size and on independence.
Key terms
Independent and identically distributed
Definition Random variables are independent and identically distributed, abbreviated IID, if they are mutually independent and all have the same distribution. For discrete variables that share the PMF of a variable , this means
for all values . Having the same distribution does not make variables independent, and independent variables need not have the same distribution.
In plain words Every observation follows the same probability law, and learning the values of some observations does not change the probabilities for the others. IID is a property of the model for how the data arise, not a description of numbers that happen to look alike.
Example In a constructed model, each measurement equals or with probability each, so one measurement has mean and variance . For two IID measurements, each of the ordered pairs , , and has probability . If instead the second measurement is a copy of the first, so that , the two still have the same distribution, but they are dependent, since while .
Random sample
Definition In this course, a random sample of size from a distribution is an ordered list of IID random variables, each with that distribution. Before observation the are random. After observation they have particular values, written , which form one realization of the sample. The order is part of the outcome, so the samples and are different outcomes.
In plain words A random sample describes, with probabilities, a plan for collecting data before it is carried out. The numbers recorded afterward are one result of that plan, and running the plan again could give different numbers.
Example Two measurements from the or model form a random sample with four equally likely outcomes, and a run that records and is one realization. By contrast, draw two tickets without replacement from a box holding one ticket marked and one marked . Each draw on its own is or with probability , but the second draw is always the ticket left over. The draws are identically distributed and dependent, so they do not form a random sample in this sense.
Statistic
Definition A statistic is a random variable computed from the sample by a fixed rule that depends on the sample values alone. Before sampling, is random. After the sample is observed, the number is the observed value of the statistic.
In plain words A statistic is a recipe, fixed in advance, for turning data into a number. Because the data are random, the result of the recipe is a random variable too. A single observed value of a statistic is one number, not its whole distribution.
Example For a sample from the or model, the sample maximum , the number of observations equal to and the average are all statistics. For the realization their observed values are , and . Before sampling, the maximum equals with probability , because only the pair gives a maximum of .
Sample mean
Definition For a sample of fixed size , the sample mean is the statistic
If every has the same finite mean , linearity of expectation gives
This step uses only the common mean, not independence.
In plain words The sample mean is the ordinary average of the observations, but before they are observed it is a new random variable. Its possible values can differ from the possible values of a single observation, and when all observations share the same finite mean, its expected value equals that mean.
Example For two IID measurements from the or model, the four equally likely pairs have averages , , and . So with probability , even though a single measurement never equals . Its expected value is , which is .
Sampling distribution
Definition The sampling distribution of a statistic is the probability distribution of determined by the model for the sample. For a discrete sample, is the total probability of all ordered outcomes with . It follows exactly from the model. A histogram of simulated or recorded values of only approximates it and carries sampling error.
In plain words The sampling distribution assigns probabilities to the values the statistic could take if the whole sampling plan were carried out again. It can be computed from the model without collecting any data.
Example For two observations from the or model, the sampling distribution of puts probabilities , and on the values , and . For four IID observations there are equally likely ordered records. The number of s in a record is , , , or in , , , and of them, and the sample mean equals that number, since the sum is times it.
The center is still . The probability that lies within of the center has grown from for two observations to , although itself fell from to . The distribution is still discrete, with five possible values, and it is not a normal distribution.
Standard error
Definition The standard error of a statistic is the standard deviation of its sampling distribution. Let be independent, each with mean and finite variance , and let . Independence makes the variances add, so , and
The standard error of the sample mean is therefore
Here comes from a fully specified model. When is unknown and estimated from data, the result is only an estimate of the standard error.
In plain words The standard deviation describes how single observations vary, and the standard error describes how averages of observations vary from sample to sample. When , halving the standard error takes four times as many independent observations, because of the square root. A smaller standard error describes the spread of the average across possible samples, and it does not promise that each new observation moves an observed average closer to .
Example In the or model . The standard error of is for , matching the variance of the sampling distribution for two observations. It is for , matching the variance from the table, and for . The derivation of used independence, and without it the rule can fail. If , then and its variance stays instead of dropping to . Along a single run, the observations and give the average , which equals , but a third observation moves the average to , farther from .
Check yourself
- Observations are IID with mean and standard deviation . Find the mean and the standard error of for , and the sample size that gives a standard error of .
Show the answer
The mean of is for every sample size. For the standard error is . A standard error of needs , so and , four times the sample size that gave a standard error of .
- Each observation is independently uniform on , and the sample size is . Find the sampling distribution of , its mean and variance, and .
Show the answer
The nine ordered pairs are equally likely. The average is for one pair, for the two pairs and , for the three pairs , and , for two pairs and for one pair. So takes the values to with probabilities , , , and , and its mean is by symmetry. One observation has mean and variance , so . A direct calculation agrees, since . Finally, .
- Now draw two tickets without replacement from a box holding tickets marked , and , each draw equally likely among the tickets still in the box. Do the two draws form a random sample? Find the sampling distribution and the variance of their average, and compare with the answer to question 2.
Show the answer
Each draw on its own is uniform on , so the draws are identically distributed. They are dependent, because while . So they are not IID and do not form a random sample in the sense of this course. The six ordered pairs , , , , and each have probability , with averages , , , , and . So the average equals , or with probability each. Its mean is still , since linearity does not need independence, but its variance is , half the IID value . The formula assumes independence and does not apply here. Dependence lowered the variance in this case, while a copied observation raises it.