Why a Bernoulli Moment Estimate Is a Sample Proportion
Many actuarial and statistical observations have two possible outcomes: a claim occurs or does not occur, an application is accepted or declined, or a component passes or fails a specified test. When each observation is recorded as 1 for the outcome of interest and 0 otherwise, a Bernoulli model describes the observation. The method of moments estimates its unknown success probability by matching the model’s mean to the observed sample mean.
The model must describe the data being analyzed. In this tutorial, \(X_1,\ldots,X_n\) are assumed to be independent observations from the same Bernoulli distribution, with unknown success probability \(p\). Thus the observations have the same probability of success, and each is coded \(1\) for success and \(0\) for failure. If the observations have different success probabilities or are dependent, the common independent Bernoulli model does not apply as stated.
Deriving the Estimator
The method of moments equates a population raw moment to the corresponding sample raw moment. Since this model has one unknown parameter, \(p\), its first raw moment provides an equation for that parameter.
Because \(X\) is 1 with probability \(p\) and 0 with probability \(1-p\), its mean is \(E[X]=1p+0(1-p)=p\).
For observed values \(x_1,\ldots,x_n\), it is \(\bar{x}=\frac{1}{n}\sum_{i=1}^n x_i\).
Set \(p=\bar{x}\). The method-of-moments estimate is therefore the observed sample mean.
The last expression is a statistic, so \(\widehat{p}_{\mathrm{MM}}\) is the estimator before data are observed. After observing \(x_1,\ldots,x_n\), its numerical value is the estimate \(\hat p_{\mathrm{MM}}=\frac{1}{n}\sum x_i\). Because each observation is 0 or 1, the sum is exactly the number of successes. Thus, if \(k\) successes are observed among \(n\) trials, the estimate is \(k/n\).
This derivation also explains why the answer must lie between 0 and 1: the average of values that are each either 0 or 1 cannot be smaller than 0 or larger than 1. If every observation is a failure, the estimate is 0; if every observation is a success, it is 1. These are valid method-of-moments estimates, not arithmetic errors.
Calculating from Observed Data
The safest calculation is to identify the coding, count the observed successes, count all eligible observations, and divide. When data are displayed in groups, add both the group sample sizes and the group success counts before forming the overall proportion. Do not average group proportions unless the groups have equal sample sizes.
Worked Example: Estimating a Hypothetical Claim Probability
A hypothetical insurer reviews 40 independent policy-months from a model in which each policy-month has the same unknown probability \(p\) of at least one reported claim. Record \(X_i=1\) if a claim was reported in policy-month \(i\), and \(X_i=0\) otherwise. The sample contains 11 ones and 29 zeros. Find the Bernoulli method-of-moments estimate of \(p\).
Model and method. Assume \(X_1,\ldots,X_{40}\) are independent and identically distributed as \(\operatorname{Bernoulli}(p)\). Use the first-moment matching equation \(\widehat{p}_{\mathrm{MM}}=\bar X\).
Count and divide. There are \(k=11\) successes among \(n=40\) observations, so the sample first raw moment is \(\bar x=\frac{1}{40}\sum_{i=1}^{40}x_i=\frac{11}{40}=0.275\). Therefore, \(\hat p_{\mathrm{MM}}=0.275\), or 27.5%.
Check. The 29 failures and 11 successes account for all 40 observations. The estimated success and failure proportions add to \(\frac{11}{40}+\frac{29}{40}=1\), and the estimate is within \([0,1]\).
Method and mistake avoided. This is first-moment matching, not a calculation based on a monetary claim amount. A common error would be to use 29, the number of failures, as the numerator for \(p\); that instead gives the estimated failure proportion, \(29/40=0.725\).
Worked Example: Counting a Binary Sample Carefully
In a hypothetical reliability check, 24 independent units are tested under the same conditions. Let \(X_i=1\) indicate that unit \(i\) passes and \(X_i=0\) indicate that it fails. The recorded sequence is \(1,1,0,1,0,1,1,1,0,1,0,1,1,0,1,1,0,1,1,1,0,1,0,1\). Estimate the probability \(p\) that a unit passes.
Model and method. Assume each observation has distribution \(\operatorname{Bernoulli}(p)\), independently of the others, with the same unknown pass probability \(p\). The method-of-moments estimate is the sample first raw moment.
Count the ones. The positions containing 1 are \(1,2,4,6,7,8,10,12,13,15,16,18,19,20,22,\) and \(24\). There are \(k=16\) successes. The remaining \(24-16=8\) entries are failures.
Calculate the sample moment. The sum of the binary observations is 16, so \(\bar x=\frac{1}{24}\sum_{i=1}^{24}x_i=\frac{16}{24}=\frac{2}{3}=0.6667\), rounded to four decimal places. Hence \(\hat p_{\mathrm{MM}}=0.6667\) to four decimal places.
Check. The success and failure counts total \(16+8=24\), and their proportions total \(\frac{16}{24}+\frac{8}{24}=1\). The estimate is therefore consistent with both the observed data and the required probability range.
Method and mistake avoided. Count the observations coded 1 and divide by all 24 trials. A quick but error-prone visual count can lead to 15 successes and an estimate of \(15/24\). Rechecking the positions shows there are 16 ones, so \(15/24\) is not the sample first raw moment for this sequence.
Grouped Observations and Unequal Group Sizes
The individual outcomes do not need to be listed if the number of observations and successes in each group are known. Under the common-\(p\) Bernoulli model, combine the counts first. A larger group contributes more observations and therefore must carry more weight in the overall sample mean.
Worked Example: Combining Two Unequal Groups
A hypothetical monitoring program records binary outcomes from two batches, with the same assumed success probability \(p\) for every independent unit. In batch A, 6 of 20 units meet a specified standard. In batch B, 15 of 30 units meet the standard. Estimate \(p\) by the method of moments.
Model and method. Treat all 50 outcomes as independent observations from \(\operatorname{Bernoulli}(p)\). Since \(p\) is common to both batches, the overall sample first raw moment is total successes divided by total observations.
Combine the counts. Total successes are \(6+15=21\). Total observations are \(20+30=50\). The estimate is \(\hat p_{\mathrm{MM}}=\frac{21}{50}=0.42\).
Check against the group totals. The group success proportions are \(6/20=0.30\) and \(15/30=0.50\). The overall proportion \(0.42\) lies between them, as it should. It can also be verified as the size-weighted average: \(\frac{20}{50}(0.30)+\frac{30}{50}(0.50)=0.12+0.30=0.42\).
Method and mistake avoided. The moment estimate uses the total sample mean. Taking the unweighted average \((0.30+0.50)/2=0.40\) would give each batch equal weight despite their unequal sizes, so it would not equal the sample first raw moment of all 50 units.
Why the Assumptions and Coding Matter
The equation \(E[X]=p\) applies to a Bernoulli variable coded with 1 for the event whose probability is being estimated and 0 for its complement. If the coding is reversed, the same sample produces an estimate for the opposite event. For example, if 1 means failure rather than success, the sample mean estimates the failure probability; the success probability is then one minus that sample mean.
The model also assumes a single common \(p\). If separate groups genuinely have different success probabilities, a pooled proportion is not automatically an estimate of one shared Bernoulli parameter. The model must justify treating the observations as having a common probability. Independence matters to the stated sampling model as well; the simple independent-trial interpretation should not be applied without considering dependence in the data.
The Bernoulli method-of-moments calculation is deliberately simple, but a complete answer should still make the event, coding, model, and denominator explicit. In an exam-style calculation, those details show that the estimate corresponds to the requested probability rather than its complement or a proportion from only part of the sample.
Check Your Understanding
For each problem, use the stated coding and identify the relevant total sample size before calculating the method-of-moments estimate.
- A hypothetical sample contains 30 independent Bernoulli observations, of which 9 are coded 1 for success. Find the sample first raw moment and the estimate of the success probability. (Answer: \(9/30=0.3000\); the sample first raw moment and estimate are both 0.3000.)
- In a quality audit, 7 of 12 independent items are accepted. Let 1 mean accepted. State the estimated acceptance probability and the estimated rejection probability. (Answer: acceptance \(7/12=0.5833\); rejection \(5/12=0.4167\), to four decimal places.)
- Two independent groups share a common Bernoulli success probability. Group A has 14 successes in 40 trials, and group B has 8 successes in 30 trials. Find the pooled method-of-moments estimate and explain why averaging the two group proportions equally is inappropriate. (Answer: \((14+8)/(40+30)=22/70=0.3143\), to four decimal places; equal averaging is inappropriate because the group sizes differ.)
- A sample has 18 observations, and the sample first raw moment is reported as 0.4444 rounded to four decimal places. Recover the number of successes and give the exact method-of-moments estimate. (Answer: \(18(0.4444)\) indicates 8 successes; the exact estimate is \(8/18=4/9\approx0.4444\).)
- In a hypothetical test, 5 of 25 units fail. The variable is coded 1 for failure and 0 for passing. Find the method-of-moments estimate for failure and then for passing. (Answer: failure \(5/25=0.2000\); passing \(20/25=0.8000\).)