births14 dataset is available herehabit is smoking habit (“smoker” or nonsmoker”)weight is birth weight in pounds| habit | n | mean | sd |
|---|---|---|---|
| nonsmoker | 867 | 7.27 | 1.23 |
| smoker | 114 | 6.68 | 1.60 |
The observed difference in means is \[\begin{array}{lcr}\bar{x}_n-\bar{x}_s &=& 7.27-6.68\\ &=& 0.59\end{array}\]
habit and weight since the values of weight are randomly assigned to the casesHistogram of differences in means (null distribution) calculated from 1,000 random permutations of birth weights. Observed difference is indicated by dashed vertical line.
Note
When the null hypothesis is true and the following conditions are met, the \(T\) score has a \(t\)-distribution with \(df=n_1+n_2-2\) degrees of freedom.
The \(t\)-distribution with 979 degrees of freedom. The observed \(T\)-statistic is 4.63. The p-value is the total area to the left of -4.63 or to the right of 4.63 (too small to be visible).
1,000 bootstrapped means with dashed lines at 2.5% and 97.5% percentiles.