MTH-161D | Spring 2025 | University of Portland
April 4, 2025
The \(t\)-distribution
The larger the degrees of freedom the more closely the \(t\)-distribution resembles the standard normal distribution.
Confidence Intervals for One Mean
\[ \begin{aligned} \bar{x} \ &\pm\ t^*_{df} \times \frac{s}{\sqrt{n}} \end{aligned} \]
Confidence Intervals for Difference of Two Means
\[ \begin{aligned} \bar{x}_1 - \bar{x}_2 \ &\pm\ t^*_{df} \times \sqrt{\frac{s_1^2}{n_1} + \frac{s_2^2}{n_2}} \end{aligned} \]
Every year, the US releases to the public a large data set containing information on births recorded in the country. This data set has been of interest to medical researchers who are studying the relation between habits and practices of expectant mothers and the birth of their children. We will work with a random sample of 1,000 cases from the data set released in 2014.
Here are four examples in the data set.
fage | mage | weeks | visits | weight | sex | habit |
---|---|---|---|---|---|---|
34 | 34 | 37 | 14 | 6.96 | male | nonsmoker |
36 | 31 | 41 | 12 | 8.86 | female | nonsmoker |
37 | 36 | 37 | 10 | 7.51 | female | nonsmoker |
NA | 16 | 38 | NA | 6.19 | male | nonsmoker |
We would like to know, is there convincing evidence that newborns from mothers who smoke have a different average birth weight than newborns from mothers who don’t smoke?
Here is the summary statistics for the dataset.
habit | n | Mean | SD |
---|---|---|---|
nonsmoker | 867 | 7.269873 | 1.232846 |
smoker | 114 | 6.677193 | 1.596645 |
Conditions:
Since both conditions are satisfied, the difference in sample means may be modeled using a \(t\)-distribution.
The top panel represents birth weights for infants whose mothers smoked during pregnancy. The bottom panel represents the birth weights for infants whose mothers who did not smoke during pregnancy.
Consider one group (smoking) from the data. It is known that a newborn baby has an average weight of \(7.5\) lbs. We want to test whether the average weight for the smoking group is less than the average using a one sample t-test.
Is the data (smoking group) a convincing evidence to support the claim of the average weight to be less than \(7.5\) lbs?
Using R to find the p-value
## [1] 1.278671e-07
Conclusions:
habit | n | Mean | SD |
---|---|---|---|
nonsmoker | 867 | 7.269873 | 1.232846 |
smoker | 114 | 6.677193 | 1.596645 |
Is there a difference in weight means between the smoking group and nonsmoking group?
Compute the standard error \[ \begin{aligned} SE & = \sqrt{\frac{s_{smoking}^2}{n_{smoking}} + \frac{s_{nonsmoking}^2}{n_{nonsmoking}}} \\ & = \sqrt{\frac{1.5966^2}{114} + \frac{1.2328^2}{867}} \\ SE & = 0.1553 \end{aligned} \]
Compute the T statistic \[ \begin{aligned} t & = \frac{\bar{x}_{smoking} - \bar{x}_{nonsmoking} - \mu_0}{SE} \\ & = \frac{-0.5927 - 0}{0.1553} \\ t & = -3.8165 \end{aligned} \]
Using R to compute the p-value
## [1] 0.000110671
Conclusions:
.pdf
file.