library(tidyverse)
## Warning: package 'ggplot2' was built under R version 4.0.4
library(openintro)

Background

In 2004, the state of North Carolina released a large data set containing information on births recorded in this state. This data set is useful to researchers studying the relation between habits and practices of expectant mothers and the birth of their children. We will work with a random sample of observations from this data set.

# Load the nc data set into our workspace.
download.file("http://www.openintro.org/stat/data/nc.RData", destfile = "nc.RData")
load("nc.RData")
str(nc)
## 'data.frame':    1000 obs. of  13 variables:
##  $ fage          : int  NA NA 19 21 NA NA 18 17 NA 20 ...
##  $ mage          : int  13 14 15 15 15 15 15 15 16 16 ...
##  $ mature        : Factor w/ 2 levels "mature mom","younger mom": 2 2 2 2 2 2 2 2 2 2 ...
##  $ weeks         : int  39 42 37 41 39 38 37 35 38 37 ...
##  $ premie        : Factor w/ 2 levels "full term","premie": 1 1 1 1 1 1 1 2 1 1 ...
##  $ visits        : int  10 15 11 6 9 19 12 5 9 13 ...
##  $ marital       : Factor w/ 2 levels "married","not married": 1 1 1 1 1 1 1 1 1 1 ...
##  $ gained        : int  38 20 38 34 27 22 76 15 NA 52 ...
##  $ weight        : num  7.63 7.88 6.63 8 6.38 5.38 8.44 4.69 8.81 6.94 ...
##  $ lowbirthweight: Factor w/ 2 levels "low","not low": 2 2 2 2 2 1 2 1 2 2 ...
##  $ gender        : Factor w/ 2 levels "female","male": 2 2 1 2 1 2 2 2 2 1 ...
##  $ habit         : Factor w/ 2 levels "nonsmoker","smoker": 1 1 1 1 1 1 1 1 1 1 ...
##  $ whitemom      : Factor w/ 2 levels "not white","white": 1 1 2 2 1 1 1 1 2 2 ...

Exercise 1

What are the cases in this data set? How many cases are there in our sample?

Answer The cases are the babies born in North Caroline. As seen by the “str(nc)” code above which allowed a view of the structure of the data, there are 1,000 observations, or cases, in the samples. Thirteen variables were noted for the 1,000 cases.

summary(nc)
##       fage            mage            mature        weeks             premie   
##  Min.   :14.00   Min.   :13   mature mom :133   Min.   :20.00   full term:846  
##  1st Qu.:25.00   1st Qu.:22   younger mom:867   1st Qu.:37.00   premie   :152  
##  Median :30.00   Median :27                     Median :39.00   NA's     :  2  
##  Mean   :30.26   Mean   :27                     Mean   :38.33                  
##  3rd Qu.:35.00   3rd Qu.:32                     3rd Qu.:40.00                  
##  Max.   :55.00   Max.   :50                     Max.   :45.00                  
##  NA's   :171                                    NA's   :2                      
##      visits            marital        gained          weight      
##  Min.   : 0.0   married    :386   Min.   : 0.00   Min.   : 1.000  
##  1st Qu.:10.0   not married:613   1st Qu.:20.00   1st Qu.: 6.380  
##  Median :12.0   NA's       :  1   Median :30.00   Median : 7.310  
##  Mean   :12.1                     Mean   :30.33   Mean   : 7.101  
##  3rd Qu.:15.0                     3rd Qu.:38.00   3rd Qu.: 8.060  
##  Max.   :30.0                     Max.   :85.00   Max.   :11.750  
##  NA's   :9                        NA's   :27                      
##  lowbirthweight    gender          habit          whitemom  
##  low    :111    female:503   nonsmoker:873   not white:284  
##  not low:889    male  :497   smoker   :126   white    :714  
##                              NA's     :  1   NA's     :  2  
##                                                             
##                                                             
##                                                             
## 
str(nc)
## 'data.frame':    1000 obs. of  13 variables:
##  $ fage          : int  NA NA 19 21 NA NA 18 17 NA 20 ...
##  $ mage          : int  13 14 15 15 15 15 15 15 16 16 ...
##  $ mature        : Factor w/ 2 levels "mature mom","younger mom": 2 2 2 2 2 2 2 2 2 2 ...
##  $ weeks         : int  39 42 37 41 39 38 37 35 38 37 ...
##  $ premie        : Factor w/ 2 levels "full term","premie": 1 1 1 1 1 1 1 2 1 1 ...
##  $ visits        : int  10 15 11 6 9 19 12 5 9 13 ...
##  $ marital       : Factor w/ 2 levels "married","not married": 1 1 1 1 1 1 1 1 1 1 ...
##  $ gained        : int  38 20 38 34 27 22 76 15 NA 52 ...
##  $ weight        : num  7.63 7.88 6.63 8 6.38 5.38 8.44 4.69 8.81 6.94 ...
##  $ lowbirthweight: Factor w/ 2 levels "low","not low": 2 2 2 2 2 1 2 1 2 2 ...
##  $ gender        : Factor w/ 2 levels "female","male": 2 2 1 2 1 2 2 2 2 1 ...
##  $ habit         : Factor w/ 2 levels "nonsmoker","smoker": 1 1 1 1 1 1 1 1 1 1 ...
##  $ whitemom      : Factor w/ 2 levels "not white","white": 1 1 2 2 1 1 1 1 2 2 ...

Exercise 2

Make a side-by-side boxplot of habit and weight. What does the plot highlight about the relationship between these two variables?

Answer The boxplot shows the median weight of the babies for nonsmoker and smoker distributions. According to the plot, the median weight for babies with nonsmoker mothers was higher than that of babies with mothers that smoked.

boxplot(weight~habit,
data=nc,        
main = "Weight vs Habit",
xlab = "Habit",
ylab = "Weight",
col = "orange",
border = "brown",
vertical = TRUE,
notch = TRUE
)

#view means of the distributions by using the following function to split the weight variable into the habit groups, then take the mean of each using the mean function.

by(nc$weight, nc$habit, mean)
## nc$habit: nonsmoker
## [1] 7.144273
## ------------------------------------------------------------ 
## nc$habit: smoker
## [1] 6.82873

There is an observed difference, but is this difference statistically significant? In order to answer this question we will conduct a hypothesis test .

Exercise 3

Check if the conditions necessary for inference are satisfied. Note that you will need to obtain sample sizes to check the conditions. You can compute the group size using the same by command above but replacing mean with length.

Answer Since the sample size is less than 10% of the population, the conditions are independent - conditions necessary for inference are satisified.

#Compute group size by using same command above but replace mean with length
by(nc$weight, nc$habit, length)
## nc$habit: nonsmoker
## [1] 873
## ------------------------------------------------------------ 
## nc$habit: smoker
## [1] 126

Exercise 4

Write the hypotheses for testing if the average weights of babies born to smoking and non-smoking mothers are different.

Answer

Hypotheses and Alternative Hypotheses: Mean (mu) of smoker less Mean (mu) of non-smoker = 0 Mean (mu) of smoker less Mean (mu) of non-smoker is not equal to zero

#Inference function - used for conducting hypothesis tests and constructing confidence intervals.
#this is a hypothesis test

inference(y = nc$weight, #first argument is y, which is the response variable we are interested in:  nc$weight
          x = nc$habit, #explanatory variable, x, which is the variable that splits the data into two groups, smokers and non-smokers: nc$habit
          est = "mean",  #est, is the parameter we’re interested in: "mean" (other options are "median", or "proportion".) 
          type = "ht", #type of inference we want, a hypothesis test ("ht") or a confidence interval ("ci")
          null = 0,  #When performing a hypothesis test, we also need to supply the null value, which in this case is 0, since the null    
                    #hypothesis sets the two population means equal to each other.
          alternative = "twosided",  #can be "less", "greater", or "twosided"
          method = "theoretical")    #the method of inference can be "theoretical" or "simulation" based.
## Warning: package 'BHH2' was built under R version 4.0.4
## Response variable: numerical, Explanatory variable: categorical
## Difference between two means
## Summary statistics:
## n_nonsmoker = 873, mean_nonsmoker = 7.1443, sd_nonsmoker = 1.5187
## n_smoker = 126, mean_smoker = 6.8287, sd_smoker = 1.3862
## Observed difference between means (nonsmoker-smoker) = 0.3155
## 
## H0: mu_nonsmoker - mu_smoker = 0 
## HA: mu_nonsmoker - mu_smoker != 0 
## Standard error = 0.134 
## Test statistic: Z =  2.359 
## p-value =  0.0184

Exercise 5

Change the type argument to “ci” to construct and record a confidence interval for the difference between the weights of babies born to smoking and non-smoking mothers.

Answer In doing the Confidence Interval, the true difference in means between the two groups is not equal to zero.

#change code above  - Confidence Interval instead of hypothesis test

#Inference function - used for conducting hypothesis tests and constructing confidence intervals.
#This is a confidence interval
#By default the function above reports an interval for (μnonsmoker−μsmoker) . We can easily change this order by using the order argument:

inference(y = nc$weight, #first argument is y, which is the response variable we are interested in:  nc$weight
          x = nc$habit, #explanatory variable, x, which is the variable that splits the data into two groups, smokers and non-smokers: nc$habit
          est = "mean",  #est, is the parameter we’re interested in: "mean" (other options are "median", or "proportion".) 
          type = "ci", #type of inference we want, a hypothesis test ("ht") or a confidence interval ("ci")
          null = 0,  #When performing a hypothesis test, we also need to supply the null value, which in this case is 0, since the null    
                    #hypothesis sets the two population means equal to each other.
          alternative = "twosided",  #can be "less", "greater", or "twosided"
          method = "theoretical",    #the method of inference can be "theoretical" or "simulation" based.
           order = c("nonsmoker", "smoker"))
## Response variable: numerical, Explanatory variable: categorical
## Difference between two means
## Summary statistics:
## n_nonsmoker = 873, mean_nonsmoker = 7.1443, sd_nonsmoker = 1.5187
## n_smoker = 126, mean_smoker = 6.8287, sd_smoker = 1.3862

## Observed difference between means (nonsmoker-smoker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