Bootstrap Confidence Interval for the Difference of Two Means
(Two Independent Samples)
Ramón V. León


In the three tutorials below we discussed what is a confidence interval for the mean.

Here we extend the notion to an (1-alpha) confidence interval for the difference of two population means.

This is an interval (a, b) such that the difference in population means is inside it with (1-alpha) "confidence."

The traditional approach for obtaining a confidence intervals for the difference of two means - when there are two independent samples - is the (normal theory) t-statistic method.
To learn how to compute two close variants of t-statistic confidence intervals for the difference of two means see:

Here we show how to compute nontraditional confidence interval for the difference of two means.
The method used is resampling. Resampling produces a confidence interval called a bootstrap confidence interval.
For a review of resampling and bootstrap confidence intervals see Introduction to The Bootstrap .

To compute a bootstrap confidence interval we use a JMPscript macro which is extremely easy requiring only two clicks.

First, make sure that JMP is installed in this computer. (Note that JMP is installed in all UT public computers.)

Step 1. Open the JMP data table to be used in this tutorial: Two Random Samples in One Table

When open this JMP data table looks this way:

The first column has a random sample of size 62 from the 3364 observations of product 3 (prod3) in this data table.
The second column has a random sample of size 19 from the 3364 observations of product 1 (prod1) in this data table.

This data table was constructed from a one-column data table, Sample B, containing a random sample of size 62 from product 3 (prod3) and a one-column data table, Sample A, containing a random sample of size 19 from product 1 (prod1). (See Selecting a Random Sample for details.). The steps in this construction were as follows:

Step 2. Open the JMP Bootstrap Macro.

You will get this dialog box:

Complete this dialog box as follows:

After clicking OK you will get the following output:

Bootstrap confidence intervals depend on the resamples (5,000?) that we obtain.
So if you do the steps above again you most likely get another 97.5% and 2.5% percentiles.and thus another
bootstrap confidence interval for the difference of two means.

To create you own bootstrap confidence interval for the difference of two means create a two column data table with your two random samples similar to the one in this tutorial. Make sure to leave it open. Then open the JMP Bootstrap Macro and proceed as above.