Tutorials › VEE Mathematical Statistics › The Sample Mean as a Random Statistic

VEE Mathematical Statistics · Random Samples and Statistics · Tutorial 351 of 880

The Sample Mean as a Random Statistic

Learn to define the sample mean as a random statistic, calculate its realized value, and distinguish both from the population mean.

Intermediate 10 min read

What You'll Learn

  • Define an IID sample and the sample mean as a function of its random observations
  • Distinguish the random variable \u0305X from its observed value \u0305x and the population mean
  • Calculate a sample mean from observed data with units and context stated
  • Derive the expectation of the sample mean when the observations have a common finite mean
  • Recognize when sampling without replacement does not satisfy the IID assumption
  • Avoid confusing a statistic’s possible values with the value observed in one sample

Before the Data and After the Data

A sample mean is often introduced as an arithmetic calculation: add the observations and divide by their number. In probability, there is an important distinction behind that calculation. Before observations are collected, the sample mean is a random variable, because its value depends on which sample is selected. Once the observations are known, the sample mean has a particular numerical value.

This distinction matters whenever a statistic is used to describe or estimate a population quantity. The population mean is a fixed feature of the model, while the sample mean changes from one possible sample to another. A realized sample mean may equal the population mean, but it need not.

Definition: Let \(X_1,\ldots,X_n\) be an IID sample: the random variables are independent and have the same probability distribution. The sample mean is the random variable $$ \bar{X}=\frac{1}{n}\sum_{i=1}^{n}X_i. $$ If the observations are \(x_1,\ldots,x_n\), the realized sample mean is $$ \bar{x}=\frac{1}{n}\sum_{i=1}^{n}x_i. $$ The distinction is that \(\bar{X}\) is defined from random observations before the sample is observed; \(\bar{x}\) is the number obtained from the observed data.

The sample mean is a statistic: a function of the sample that does not depend on an unknown population parameter. The formula uses the random variables \(X_i\), not the fixed values \(x_i\), when describing the statistic before data collection. After collection, the observed values are substituted into that same formula.

Suppose the observations have common population mean \(\mu=E[X_i]\). The symbol \(\mu\) refers to the population quantity, not to the result of one particular sample. In contrast, \(\bar{X}\) can take different values across possible samples, and \(\bar{x}\) is one realized value of it. The sample size \(n\) is fixed in this definition.

Why the Sample Mean Is Random

The observations \(X_1,\ldots,X_n\) are random variables because their values have not yet been determined. The sample mean applies a fixed arithmetic rule to those random inputs. As the inputs vary from sample to sample, the output can vary too. Thus, before observing the sample, \(\bar{X}\) is itself a random variable.

For example, if the sample consists of random measurements of claim-processing time, one possible sample might contain several short times and another might contain longer times. Each sample produces a value from the same rule—add the times and divide by \(n\)—but the resulting average need not be the same. The rule is fixed; the inputs are not.

The following short derivation gives one useful consequence of the definition. Assume that each \(X_i\) has the same finite mean \(\mu\). By linearity of expectation,

$$ E[\bar{X}] =E\left[\frac{1}{n}\sum_{i=1}^{n}X_i\right] =\frac{1}{n}\sum_{i=1}^{n}E[X_i] =\frac{1}{n}\sum_{i=1}^{n}\mu =\mu. $$

This calculation explains why the sample mean is centered on the population mean in expectation under these conditions. It does not say that every realized sample mean equals \(\mu\). Nor does it require independence: the expectation calculation uses a common finite mean and linearity of expectation. Independence is part of the IID sampling model, but is not needed for this particular identity.

Worked Example: A Sample of Hypothetical Claim Counts

A hypothetical insurer models the number of qualifying service claims from each independently selected policyholder during a year by the distribution \(P(X=0)=0.20\), \(P(X=1)=0.30\), \(P(X=2)=0.40\), and \(P(X=5)=0.10\). Four policyholders are sampled independently from this same model. The observed counts are \(0,2,1,5\). Find the realized sample mean and the population mean, and identify which quantity was random before the sample was observed.

Method. First calculate the population mean from the specified distribution. Then calculate the realized statistic by applying the sample-mean formula to the four observed counts.

The distribution’s probabilities sum to \(0.20+0.30+0.40+0.10=1.00\). Its population mean is

$$ \mu=E[X] =(0)(0.20)+(1)(0.30)+(2)(0.40)+(5)(0.10) =0+0.30+0.80+0.50 =1.60\text{ claims}. $$

The observed total is \(0+2+1+5=8\) claims. There are \(n=4\) observations, so the realized sample mean is

$$ \bar{x}=\frac{8}{4}=2.00\text{ claims per policyholder}. $$

Before the four policyholders were selected, \(\bar{X}\) was random because it depended on their random claim counts. After observing these counts, its realized value is \(\bar{x}=2.00\). The population mean remains \(1.60\); it is not replaced by the sample mean. As a check, the observed total of 8 divided evenly across 4 policyholders gives 2 claims per policyholder.

Common mistake avoided: Reporting \(1.60\) as the observed sample mean confuses the model’s population mean with the statistic calculated from the data. Reporting \(2.00\) as the population mean makes the opposite error.

Calculate the Statistic, Not a Different Quantity

The formula for \(\bar{X}\) does not change with the units of the observations. The realized sample mean has the same units as each observation: averaging times measured in minutes gives minutes, and averaging amounts measured in dollars gives dollars. A careful calculation keeps the number of observations in the denominator and retains the context of the measurement.

The model also helps explain why the statistic can vary. For an IID sample from a continuous distribution, exact observed values are generally not assigned positive probability individually. Nevertheless, different ranges of sample outcomes can have positive probability and can produce different ranges of sample means. Randomness does not require that one exact sample of real-number values have positive probability.

Worked Example: Average Processing Time Under a Uniform Model

For a hypothetical system, let each processing time \(X_i\), in minutes, be independent and uniformly distributed on the interval from 0 to 12. Four times are observed: \(2.4\), \(7.1\), \(11.0\), and \(3.5\) minutes. Calculate the realized sample mean and the population mean. Then use the model to explain why the sample mean was random before observation.

Method. Apply the arithmetic-mean formula to the observed times. For a uniform distribution on \((a,b)\), the population mean is \((a+b)/2\).

The observed total is \(2.4+7.1+11.0+3.5=24.0\) minutes. Therefore,

$$ \bar{x}=\frac{24.0}{4}=6.0\text{ minutes}. $$

The model is \(X_i\sim\operatorname{Uniform}(0,12)\) minutes, so

$$ \mu=E[X_i]=\frac{0+12}{2}=6\text{ minutes}. $$

In this particular sample, the realized mean equals the population mean. That numerical equality is not built into the definition. For instance, the event that all four times fall between 1 and 2 minutes has positive probability under the stated independent uniform model, and on that event the sample mean is between 1 and 2 minutes. The event that all four times fall between 9 and 10 minutes also has positive probability, and on that event the mean is between 9 and 10 minutes. Thus, before collection, the mean can fall in different ranges depending on the sample.

Check. The four recorded times sum to 24 minutes, and \(24/4=6\) minutes. The units remain minutes, as they must.

Common mistake avoided: The fact that the realized mean happens to equal 6 minutes does not make \(\bar{X}\) a fixed number of 6. The fixed quantity is the population mean \(\mu\); the statistic is determined by the random observations.

Recognizing the Limits of the IID Description

A sample mean can be calculated for any list of observations. However, calling the observations an IID sample asserts two conditions: each observation has the same distribution, and the observations are independent. A sampling design that violates either condition does not meet that model. The arithmetic statistic still exists, but conclusions that depend on an IID sample may no longer apply as stated.

In particular, selecting items without replacement from a small finite population generally makes successive draws dependent. After one item is selected, the composition of the remaining population changes. The following example separates the calculation of a mean from the question of whether the sampling model is IID.

Worked Example: Sampling Without Replacement From a Finite List

A hypothetical auditor selects two contract amounts from a finite list of four amounts: $100, $200, $300, and $400. The selection is uniform over the remaining amounts at each draw, and there is no replacement. The observed amounts, in draw order, are $100 and $400. Calculate the realized sample mean and the mean of the four listed amounts. Then determine whether the two draws form an IID sample by comparing the conditional and marginal probabilities that the second draw is $400.

Method. Calculate the two means directly, then test independence using the definition \(P(A\mid B)=P(A)\) when \(P(B)>0\), with \(A\) the event that the second draw is $400 and \(B\) the event that the first draw is $100.

The observed sample total is \(100+400=500\) dollars. With \(n=2\),

$$ \bar{x}=\frac{500}{2}=\$250. $$

The mean of all four listed amounts is

$$ \frac{100+200+300+400}{4} =\frac{1{,}000}{4} =\$250. $$

Before any draw, each amount is equally likely to be selected first, so \(P(\text{second amount is }400)=1/4\) by symmetry. If the first amount is $100, the remaining list is $200, $300, and $400. Hence

$$ P(\text{second amount is }400\mid\text{first amount is }100)=\frac{1}{3} \ne \frac{1}{4} =P(\text{second amount is }400). $$

The two draws are dependent, so they are not an IID sample. The realized sample mean is still correctly calculated as $250, and in this case it happens to equal the list mean. That coincidence does not make the draws independent.

Check. The sample contains two amounts, so its total is divided by 2. After the first amount is removed, three choices remain, exactly one of which is $400.

Common mistake avoided: Using the same mean formula does not establish that the data came from an IID model. The sampling mechanism must satisfy the model’s assumptions separately.

Common Interpretations and Exam Traps

  • Using the same symbol for the statistic and its realization. Use \(\bar{X}\) for the random statistic and \(\bar{x}\) for the value calculated from observed data.
  • Calling the sample mean a population parameter. The sample mean is calculated from the sample; the population mean \(\mu\) describes the distribution from which the observations are drawn.
  • Assuming every sample mean equals the population mean. The expectation identity \(E[\bar{X}]=\mu\), under its stated finite-mean assumption, is about an average over repeated sampling—not a guarantee for each sample.
  • Ignoring the sampling design. A mean can be calculated for dependent observations, but the observations should not be called IID unless they are independent and identically distributed.
  • Dropping units or using the wrong denominator. Divide the total by the number of observations \(n\), and report the result in the same units as the observations.
Key takeaway: The sample mean \(\bar{X}\) is a random statistic before the sample is observed because it is a function of random observations. Once the data \(x_1,\ldots,x_n\) are known, the realized value is \(\bar{x}=(x_1+\cdots+x_n)/n\). Neither notation should be confused with the population mean \(\mu\).

Check Your Understanding

For each problem, distinguish the model quantity from the value computed from the observed sample. Give units where applicable.

  1. An IID sample of three hypothetical annual service counts has \(P(X=0)=0.25\), \(P(X=2)=0.50\), and \(P(X=6)=0.25\). The observed counts are \(0,2,6\). Find the population mean and the realized sample mean. (Answer: \(\mu=2.5\) counts; \(\bar{x}=8/3\) counts, approximately \(2.6667\).)
  2. Four independent hypothetical completion times have distribution \(\operatorname{Uniform}(2,10)\) minutes. The observed times are \(3.2,4.8,7.0,9.0\) minutes. Find the realized sample mean and the population mean. (Answer: \(\bar{x}=6.0\) minutes; \(\mu=6.0\) minutes.)
  3. For an IID hypothetical claim-processing model, each time has an exponential distribution with rate \(0.5\) per hour. Two observed times are \(1.2\) hours and \(2.8\) hours. Find the realized sample mean and state the population mean. (Answer: \(\bar{x}=2.0\) hours; \(\mu=2.0\) hours.)
  4. Two amounts are drawn without replacement from the finite list \(\$40,\$80,\$120,\$160\), and the observed draws are \(\$40,\$120\). Find the realized sample mean and compare the probability the second amount is $160 before any draw with that probability conditional on the first amount being $40. Does the design give an IID sample? (Answer: \(\bar{x}=\$80\); the probabilities are \(1/4\) and \(1/3\), respectively, so the draws are dependent and not IID.)
  5. An IID sample has \(P(X=1)=0.20\), \(P(X=3)=0.50\), and \(P(X=7)=0.30\). For \(n=2\), the observed values are \(3\) and \(7\). Calculate \(E[X]\) and the realized sample mean, and state which is the population quantity. (Answer: \(E[X]=3.8\); \(\bar{x}=5\); \(E[X]\) is the population mean.)
Clinical Biostats