library(tidyverse)
library(openintro)
library(BSDA)

North Carolina births

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.

Exploratory analysis

# load date to the workspace.

download.file("http://www.openintro.org/stat/data/nc.RData", destfile = "nc.RData")

load("nc.RData")

Variables and Description fage father’s age in years.(N) mage mother’s age in years.(N) mature maturity status of mother.(C) weeks length of pregnancy in weeks. premie whether the birth was classified as premature (premie) or full-term.(C) visits number of hospital visits during pregnancy.(N) marital whether mother is married or not married at birth.(C) gained weight gained by mother during pregnancy in pounds.(N) weight weight of the baby at birth in pounds.(N) lowbirthweight whether baby was classified as low birthweight (low) or not (not low).(C) gender gender of the baby, female or male.(C) habit status of the mother as a nonsmoker or a smoker.(C) whitemom whether mom is white or not white(C)

Exercise 1

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

## overview of the data through the data summary nc 
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  
##                                                             
##                                                             
##                                                             
## 
# Catigorical variable:Which of the catigories a person is in (C). 
# Numerical variable:Recorded the amount of something in a variable(N). 

Exercise 2

Consider the possible relationship between a mother’s smoking habit and the weight of her baby.

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

# Plotting the data is a useful first step because it helps us quickly visualize trends, identify strong associations, and develop research questions.

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

boxplot(nc$weight ~ nc$habit, main=" Weight of babies and the habits of the mothers",ylab = "Weight of baby (lbs)")

# There is an observsble diffence in the boxplots of the variables associations

summary(nc$habit~weight)
##  Length   Class    Mode 
##       3 formula    call
# There is an observable diffrence with two positive mean val and it seems that smoking mothers on average tend to have lower weight babies than do nonsmoker mother.

Inference

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.
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.

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

# Next, we introduce a new function, inference, that we will use for conducting hypothesis tests and constructing confidence intervals.


inference(y = nc$weight, x = nc$habit, est = "mean", type = "ht", null = 0, alternative = "twosided", method = "theoretical")
## 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

confidence interval for the difference between the weights of babies born to smoking and non-smoking mothers.

# Change the type argument to "ci" to construct and record a confidence interval

inference(y = nc$weight, x = nc$habit, est = "mean", type = "ci", null = 0,  alternative = "twosided", method = "theoretical", 
 order = c("smoker","nonsmoker"))
## Response variable: numerical, Explanatory variable: categorical
## Difference between two means
## Summary statistics:
## n_smoker = 126, mean_smoker = 6.8287, sd_smoker = 1.3862
## n_nonsmoker = 873, mean_nonsmoker = 7.1443, sd_nonsmoker = 1.5187

## Observed difference between means (smoker-nonsmoker) = -0.3155
## 
## Standard error = 0.1338 
## 95 % Confidence interval = ( -0.5777 , -0.0534 )

On Your own.

1.Calculate a 95% confidence interval for the average length of pregnancies (weeks) and interpret it in context.

# Note that since you’re doing inference on a single population parameter, there is no explanatory variable, so you can omit the x variable from the function.

inference(y = nc$weeks, est = "mean", type = "ci", null = 0, alternative = "twosided", method = "theoretical")
## Single mean 
## Summary statistics:

## mean = 38.3347 ;  sd = 2.9316 ;  n = 998 
## Standard error = 0.0928 
## 95 % Confidence interval = ( 38.1528 , 38.5165 )

2.Calculate a new confidence interval for the same parameter at the 90% confidence level.

# You can change the confidence level by adding a new argument to the function: conflevel = 0.90.

inference(y = nc$weeks, est = "mean", type = "ci", null = 0, alternative = "twosided", method = "theoretical" , conflevel = 0.90)
## Single mean 
## Summary statistics:

## mean = 38.3347 ;  sd = 2.9316 ;  n = 998 
## Standard error = 0.0928 
## 90 % Confidence interval = ( 38.182 , 38.4873 )

3.Conduct a hypothesis test evaluating whether the average weight gained by younger mothers is different than the average weight gained by mature mothers.

inference(y = nc$weight, x = nc$mature, est = "mean", type = "ht", null = 0, alternative = "twosided", method = "theoretical", order = c("younger mom","mature mom"))
## Response variable: numerical, Explanatory variable: categorical
## Difference between two means
## Summary statistics:
## n_younger mom = 867, mean_younger mom = 7.0972, sd_younger mom = 1.4855
## n_mature mom = 133, mean_mature mom = 7.1256, sd_mature mom = 1.6591
## Observed difference between means (younger mom-mature mom) = -0.0283
## 
## H0: mu_younger mom - mu_mature mom = 0 
## HA: mu_younger mom - mu_mature mom != 0 
## Standard error = 0.152 
## Test statistic: Z =  -0.186 
## p-value =  0.8526

4.Now, a non-inference task: Determine the age cutoff for younger and mature mothers. Use a method of your choice, and explain how your method works.

by(nc$mage,nc$mature,summary)
## nc$mature: mature mom
##    Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
##   35.00   35.00   37.00   37.18   38.00   50.00 
## ------------------------------------------------------------ 
## nc$mature: younger mom
##    Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
##   13.00   21.00   25.00   25.44   30.00   34.00

Using this specific summary reflects he cutoff of the ages of the young and mature mothers as a max and a min.

5.Pick a pair of numerical and categorical variables and come up with a research question evaluating the relationship between these variables.

  • white and nonwhite mothers and age.

Formulate the question in a way that it can be answered using a hypothesis test and/or a confidence interval.

question : What is the diffence between the age that white mothers and non white mothers in having children.

Answer your question using the inference function, report the statistical results, and also provide an explanation in plain language.

inference(y = nc$mage, x = nc$whitemom,  est = "mean", type = "ht", null = 0, alternative = "twosided", method = "theoretical")
## Response variable: numerical, Explanatory variable: categorical
## Difference between two means
## Summary statistics:
## n_not white = 284, mean_not white = 25.331, sd_not white = 6.435
## n_white = 714, mean_white = 27.6499, sd_white = 5.9898
## Observed difference between means (not white-white) = -2.3189
## 
## H0: mu_not white - mu_white = 0 
## HA: mu_not white - mu_white != 0 
## Standard error = 0.443 
## Test statistic: Z =  -5.237 
## p-value =  0

Pvalue of 0 Indicates that there is a significant diffence in the age and race of the mothers , it seems white mothers have babies at an older age to non white mothers.

inference(y = nc$mage,x = nc$whitemom, est = "mean", type = "ci", null = 0, alternative = "twosided", method = "theoretical" , conflevel = 0.90)
## Response variable: numerical, Explanatory variable: categorical
## Difference between two means
## Summary statistics:
## n_not white = 284, mean_not white = 25.331, sd_not white = 6.435
## n_white = 714, mean_white = 27.6499, sd_white = 5.9898

## Observed difference between means (not white-white) = -2.3189
## 
## Standard error = 0.4428 
## 90 % Confidence interval = ( -3.0472 , -1.5906 )

With a confidence interval 90% there there is (-,-) upper and lower interval that doesnt include ; null hypothesis is rejected. There is an age differnce with white and non white moms on when they have kids. white mothers have children at an older age than nonwhite mothers.

LS0tCnRpdGxlOiAiSW5mZXJlbmNlIGZvciBudW1lcmljYWwgZGF0YSIKYXV0aG9yOiAiTWFrZGEgRGVtZWxhc2giCmRhdGU6ICIxMC8yNS8yMDIxIgpvdXRwdXQ6IG9wZW5pbnRybzo6bGFiX3JlcG9ydAotLS0KCmBgYHtyIGxvYWQtcGFja2FnZXMsIG1lc3NhZ2U9RkFMU0V9CmxpYnJhcnkodGlkeXZlcnNlKQpsaWJyYXJ5KG9wZW5pbnRybykKbGlicmFyeShCU0RBKQpgYGAKCiMjIyBOb3J0aCBDYXJvbGluYSBiaXJ0aHMKCkluIDIwMDQsIHRoZSBzdGF0ZSBvZiBOb3J0aCBDYXJvbGluYSByZWxlYXNlZCBhIGxhcmdlIGRhdGEgc2V0IGNvbnRhaW5pbmcgaW5mb3JtYXRpb24gb24gYmlydGhzIHJlY29yZGVkIGluIHRoaXMgc3RhdGUuIFRoaXMgZGF0YSBzZXQgaXMgdXNlZnVsIHRvIHJlc2VhcmNoZXJzIHN0dWR5aW5nIHRoZSByZWxhdGlvbiBiZXR3ZWVuIGhhYml0cyBhbmQgcHJhY3RpY2VzIG9mIGV4cGVjdGFudCBtb3RoZXJzIGFuZCB0aGUgYmlydGggb2YgdGhlaXIgY2hpbGRyZW4uIFdlIHdpbGwgd29yayB3aXRoIGEgcmFuZG9tIHNhbXBsZSBvZiBvYnNlcnZhdGlvbnMgZnJvbSB0aGlzIGRhdGEgc2V0LgoKIyMjIEV4cGxvcmF0b3J5IGFuYWx5c2lzCgpgYGB7ciB0cmVuZC1naXJsc30KIyBsb2FkIGRhdGUgdG8gdGhlIHdvcmtzcGFjZS4KCmRvd25sb2FkLmZpbGUoImh0dHA6Ly93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