Login
📚 Statistical Inference for Everyone
Chapters ▾

9.4 Model Construction

In practice, we either don't know what the optimum model we need is, or the needs of the model change as we obtain more data.

We start with the data in Table 9.4 for the mass of pennies of various years (shown graphically in Figure 9.3):

Table 9.4. Mass of Pennies from 1960 to 1974.
YearMass [g]
19603.133
19613.083
19623.175
19633.120
19643.100
19653.060
19663.100
19673.100
19683.073
19693.076
19703.100
19713.110
19723.080
19733.100
19743.093
Scatter of the mass of US pennies for each year from 1960 to 1974: values wander between roughly 3.06 and 3.18 grams around a typical value near 3.10 grams, with no trend over time.
Figure 9.3. Mass of Pennies from 1960 to 1974.

We are going to ignore the measurement uncertainties in these individual measurements, because they are quite small.

Overlapping Intervals

The first is the easiest to do mathematically, and yields a nice picture: obtain the best estimates for μ1 and μ2, and see if their 99% credible intervals overlap. From this analysis (identical to the previous examples, however we leave the details of the calculation to the student), we get (see Figure 9.6):

where the 99% credible intervals (CI) clearly do not overlap, thus there is a statistically significant difference between them.

Penny masses from 1960 to 2003 fitted with two true values: separate dashed best-estimate lines with narrow 99% bands at about 3.10 grams (before 1975) and 2.50 grams (after 1989). The two credible intervals clearly do not overlap.
Figure 9.6. Mass of Pennies from 1960 to 2003, with best estimates for the two true values and their 99% CI (i.e. 3σ) uncertainty plotted. There is clearly no overlap in their credible intervals, thus there is a statistically significant difference between them.

Is the Difference Zero?

The proper way is to estimate the quantity μ1μ2 and test to see if it is greater than zero, as shown in Section 7.2 on page 144. The estimate of this quantity, which we'll call δ12=μ1μ2 is related to the means and uncertainties of two data sets

δ ^ 12 = x ¯ 1 x ¯ 2 ± σ 12 σ 12 = σ 1 2 + σ 2 2 σ 1 = k 1 S 1 / N 1  (uncertainty from data set 1) σ 2 = k 2 S 2 / N 2  (uncertainty from data set 2)

where the sample standard deviations, S1 and S2, and the scale factors, k1 and k2 were calculated earlier. This leads to, for this data set,

δ ^ 12 = 0.593 g ± 0.008 g

with the 99% credible interval [0.568g,0.618g], the distribution shown in Figure 9.7. Again, the estimated quantities are clearly different statistically: the value of zero is well outside of the 99% credible interval for δ12.

Posterior distribution of the difference between the pre- and post-1975 penny masses, μ1-μ2: a bell curve centered near 0.6 grams whose 99% interval excludes zero, so the mass change is statistically significant.
Figure 9.7. Difference in the estimated values of the pre- and post 1975 pennies, μ1μ2. The value zero is clearly outside of the 99% interval of the difference, thus there is a statistically significant difference between the two values μ1 and μ2.

Adapted from Statistical Inference for Everyone, by Brian Blais (Bryant University), licensed under CC BY-SA 4.0 (dual-licensed under the GNU FDL 1.2 or later; this adaptation uses the CC BY-SA grant). Changes were made; this adaptation is distributed under the same license. License: CC-BY-SA-4.0.