Tutorials › VEE Mathematical Statistics › Exact Sampling Distribution of a Bernoulli Sample Mean

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

Exact Sampling Distribution of a Bernoulli Sample Mean

Learn how a Bernoulli sample mean inherits its exact distribution from a binomial count, and how to calculate its expectation and variance.

Intermediate 10 min read

What You'll Learn

  • Relate the Bernoulli sample mean to the number of successes in the sample.
  • Derive the exact possible values and probabilities of the sample mean.
  • Calculate probabilities for events involving the sample mean.
  • Derive the mean and variance of the Bernoulli sample mean.
  • Check the assumptions needed for the binomial model.
  • Avoid errors when translating inequalities into conditions on the success count.

Why the Bernoulli Sample Mean Has a Special Form

The sample mean is a random statistic: before observations are collected, its value is not known. For a sample of Bernoulli observations, its possible values and probabilities can be found exactly. The key is that averaging zero-one observations is equivalent to counting the number of ones and dividing by the sample size.

This connection is useful whenever an observation records whether an event occurred, such as whether a hypothetical claim was reported during a specified period or whether a component passed an inspection. The model must be stated carefully: the observations must be independent and have the same Bernoulli success probability. This tutorial is aligned with the SOA VEE Mathematical Statistics syllabus.

Definition: A Bernoulli random variable \(X_i\) with success probability \(p\) takes the value \(1\) with probability \(p\) and the value \(0\) with probability \(1-p\), where \(0\le p\le1\). For an IID sample \(X_1,\ldots,X_n\), each observation has this same distribution and the observations are mutually independent. The sample mean is \(\bar X=(X_1+\cdots+X_n)/n\).

Here, “success” is just the label assigned to the outcome \(1\); it need not describe a desirable result. The model does not apply as stated if observations have different success probabilities or are dependent. In those cases, the sum need not have a binomial distribution, so the exact formula below cannot be used without further justification.

From the Number of Successes to the Sample Mean

Let \(K=X_1+\cdots+X_n\) be the number of successes. Since each \(X_i\) is either zero or one, \(K\) is an integer from \(0\) through \(n\), and \(\bar X=K/n\). Under the IID Bernoulli model, \(K\) has a binomial distribution with parameters \(n\) and \(p\).

Theorem: If \(X_1,\ldots,X_n\) are IID Bernoulli random variables with success probability \(p\), then \(\bar X\) takes the values \(k/n\), for \(k=0,1,\ldots,n\), and $$ P\left(\bar X=\frac{k}{n}\right)=\binom{n}{k}p^k(1-p)^{n-k}. $$ In particular, \(E[\bar X]=p\) and \(\operatorname{Var}(\bar X)=p(1-p)/n\).

The possible values are spaced \(1/n\) apart. The sample mean is therefore discrete, even though its value is expressed as a fraction. It does not take every real value between zero and one: for example, with \(n=4\), the only possible values are \(0, 1/4, 1/2, 3/4,\) and \(1\).

1
Translate the statistic.
Write \(\bar X=K/n\), where \(K\) counts the observations equal to one.
2
Use the count distribution.
Under the stated IID model, \(K\sim\operatorname{Binomial}(n,p)\), so \(P(K=k)=\binom{n}{k}p^k(1-p)^{n-k}\).
3
Convert the event or value.
For a point probability at \(k/n\), use \(P(\bar X=k/n)=P(K=k)\). For an inequality, convert it to the corresponding condition on the integer \(K\).

Why the Formula Holds

For exactly \(k\) successes in \(n\) independent trials, any particular arrangement of successes and failures has probability \(p^k(1-p)^{n-k}\). There are \(\binom{n}{k}\) different arrangements with \(k\) successes. These arrangements are disjoint, so their probabilities add, giving the binomial probability for \(K=k\). Since \(\bar X=K/n\), the event \(\bar X=k/n\) is exactly the event \(K=k\), which proves the stated distribution of the sample mean.

For the moments, a Bernoulli variable satisfies \(E[X_i]=p\), because \(1\cdot p+0\cdot(1-p)=p\). Also \(X_i^2=X_i\), so \(\operatorname{Var}(X_i)=E[X_i^2]-(E[X_i])^2=p-p^2=p(1-p)\). Linearity of expectation gives the mean of \(\bar X\). Independence makes the variance of the sum equal to the sum of the variances, and scaling a random variable by \(1/n\) scales its variance by \(1/n^2\). Therefore,

$$ E[\bar X]=\frac{1}{n}\sum_{i=1}^{n}E[X_i]=p,\qquad \operatorname{Var}(\bar X)=\frac{1}{n^2}\sum_{i=1}^{n}\operatorname{Var}(X_i) =\frac{np(1-p)}{n^2}=\frac{p(1-p)}{n}. $$

These formulas also follow by using the binomial count directly: \(E[K]=np\), \(\operatorname{Var}(K)=np(1-p)\), and \(\bar X=K/n\). The derivation above shows precisely where the equal probabilities and independence matter. If the observations are dependent, the variance of their sum includes covariance terms and the displayed variance formula need not hold.

Worked Example: Listing the Exact Distribution

A hypothetical quality audit examines \(n=4\) independently selected items. Each item has probability \(p=0.25\) of failing a specified check. Let \(X_i=1\) if item \(i\) fails and \(X_i=0\) otherwise. Find the exact distribution of the sample mean failure indicator, its expectation and variance, and \(P(\bar X\ge 0.5)\).

Method and model. The four indicators are IID Bernoulli with \(p=0.25\). Put \(K=X_1+\cdots+X_4\). Then \(\bar X=K/4\) and \(K\sim\operatorname{Binomial}(4,0.25)\). For each \(k\), use \(\binom{4}{k}(0.25)^k(0.75)^{4-k}\).

\(k\)\(\bar X=k/4\)\(P(K=k)\)
00\(0.75^4=0.3164\)
10.25\(4(0.25)(0.75)^3=0.4219\)
20.50\(6(0.25)^2(0.75)^2=0.2109\)
30.75\(4(0.25)^3(0.75)=0.0469\)
41\((0.25)^4=0.0039\)

The exact probabilities before rounding have denominator \(256\) and numerators \(81,108,54,12,1\). Thus their sum is \((81+108+54+12+1)/256=256/256=1\). The expectation and variance are \(E[\bar X]=p=0.25\) and \(\operatorname{Var}(\bar X)=0.25(0.75)/4=0.046875\).

For the event, \(\bar X\ge0.5\) means \(K/4\ge0.5\), hence \(K\ge2\). Add the probabilities for \(k=2,3,4\): \(0.2109375+0.046875+0.00390625=0.26171875\), or \(0.2617\) to four decimal places. Check: the event probability is also \(1-P(K\le1)=1-(81+108)/256=67/256=0.26171875\). The method avoids treating the mean as continuous or omitting the boundary value \(K=2\).

Worked Example: A Strict Inequality at the Mean

Suppose a hypothetical binary indicator records whether a selected policy file contains a specified documentation error. For \(n=5\) independent files, assume the error probability is \(p=0.40\). Find \(P(\bar X>0.40)\) and \(\operatorname{Var}(\bar X)\).

Method and model. The indicators are IID Bernoulli with \(p=0.40\), so \(K\sim\operatorname{Binomial}(5,0.40)\) and \(\bar X=K/5\). The strict inequality gives \(K/5>0.40\), or \(K>2\). Since \(K\) is an integer, this is \(K\ge3\).

Calculate each included probability: \(P(K=3)=\binom53(0.4)^3(0.6)^2=10(0.064)(0.36)=0.2304\); \(P(K=4)=\binom54(0.4)^4(0.6)=5(0.0256)(0.6)=0.0768\); and \(P(K=5)=(0.4)^5=0.01024\). Therefore, \(P(\bar X>0.40)=0.2304+0.0768+0.01024=0.31744\), which is \(0.3174\) to four decimal places.

The variance is \(\operatorname{Var}(\bar X)=0.4(0.6)/5=0.24/5=0.048\). Check: the complement is \(K\le2\), with probability \(0.07776+0.2592+0.3456=0.68256\), and \(1-0.68256=0.31744\). The method avoids the common mistake of confusing \(K>2\) with \(K\ge4\), or excluding \(K=3\).

Worked Example: A Point Probability and an Interval Event

In a hypothetical screening study, each of \(n=3\) independent observations indicates a positive result with probability \(p=0.20\). Find the probability that \(\bar X=2/3\), the probability that \(\bar X\le1/3\), and the mean and variance of \(\bar X\).

Method and model. The indicators are IID Bernoulli with \(p=0.20\); let \(K\sim\operatorname{Binomial}(3,0.20)\). Since \(\bar X=K/3\), the value \(2/3\) corresponds to exactly \(K=2\): \(P(\bar X=2/3)=P(K=2)=\binom32(0.2)^2(0.8)=3(0.04)(0.8)=0.0960\).

The event \(\bar X\le1/3\) means \(K/3\le1/3\), or \(K\le1\). Its probability is \(P(K=0)+P(K=1)=(0.8)^3+3(0.2)(0.8)^2=0.512+0.384=0.8960\). The moments are \(E[\bar X]=0.20\) and \(\operatorname{Var}(\bar X)=0.2(0.8)/3=0.053333\ldots\), or \(0.0533\) to four decimal places.

Check: the full count probabilities are \(0.512, 0.384, 0.096,\) and \(0.008\), which sum to \(1\). The requested interval event includes \(K=0\) and \(K=1\), not \(K=2\). The method avoids assigning probability to impossible mean values such as \(0.4\), which cannot occur when \(n=3\).

Common Mistakes and What the Distribution Tells You

A useful first check is to write the grid of possible values \(0,1/n,\ldots,1\) before evaluating an event. For example, a strict inequality and a non-strict inequality can differ by one entire point mass. Likewise, a point probability \(P(\bar X=c)\) is zero if \(c\) is not one of the possible values \(k/n\).

  • Using a continuous interpretation. The sample mean here is discrete. An interval probability must be obtained by adding the masses at the attainable values inside the interval.
  • Forgetting the binomial coefficient. The factor \(\binom{n}{k}\) counts the different arrangements that produce \(k\) successes.
  • Using the wrong event boundary. Convert the inequality algebraically first, then account for the fact that \(K\) is an integer.
  • Using the wrong variance. A single Bernoulli observation has variance \(p(1-p)\); the mean of \(n\) independent observations has variance \(p(1-p)/n\).
  • Ignoring the assumptions. The binomial formula requires a fixed number of independent trials with a common success probability. Independence alone is not enough if success probabilities differ.

When \(p=0\) or \(p=1\), every observation is constant, so \(\bar X\) equals \(p\) with probability one and its variance is zero. For \(0<p<1\), the formula gives positive probability to every value \(k/n\), \(k=0,\ldots,n\). In all cases, the probabilities sum to one by the binomial theorem. These checks help catch arithmetic and model errors before interpreting a result.

Key takeaway: For IID Bernoulli observations, count successes first: \(K=n\bar X\sim\operatorname{Binomial}(n,p)\). The mean’s exact distribution is the binomial count’s probability mass placed at \(k/n\), with expectation \(p\) and variance \(p(1-p)/n\).

Check Your Understanding

For each problem, begin by translating the sample-mean event into a condition on the integer success count. Probabilities in the answers are shown to four decimal places unless an exact value is especially useful.

  1. For \(n=3\) IID Bernoulli observations with \(p=0.20\), find \(P(\bar X=0)\) and \(P(\bar X=2/3)\). (Answer: \(0.5120\) and \(0.0960\).)
  2. For \(n=4\) and \(p=0.50\), find \(P(\bar X\ge0.75)\) and \(\operatorname{Var}(\bar X)\). (Answer: \(0.3125\) and \(0.0625\).)
  3. For \(n=6\) and \(p=0.30\), find \(P(\bar X<0.50)\) and \(\operatorname{Var}(\bar X)\). (Answer: \(0.7443\) and \(0.0350\).)
  4. For \(n=5\) and \(p=0.40\), find \(P(\bar X>0.40)\) and \(\operatorname{Var}(\bar X)\). (Answer: \(0.31744\) and \(0.048\).)
  5. For \(n=8\) and \(p=0.25\), find \(P(\bar X=3/8)\). (Answer: \(\binom83(0.25)^3(0.75)^5=13608/65536\approx0.2076\).)
Clinical Biostats