Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Hi, needing some assistance with my assignment, Continue with hypothesis testing

ID: 3043790 • Letter: H

Question

Hi, needing some assistance with my assignment,

Continue with hypothesis testing using Stata for your remaining two research questions. One question uses a categorical response and categorical explanatory variable, and the last question uses a continuous response and categorical-dichotomous explanatory variable.

1. Does the age of the mother (continuous interval) (response) influence the likelihood of smoking during pregnancies (categorical-dichotomous) (explanatory)?

2. Does the race of the mother (categorical nominal) (explanatory variable) affect the possibility of low birth weight (categorical dichotomous response)?

The five steps are:

Define the parameter of interest

State the hypotheses

Determine the test statistic and p-value considering any necessary assumptions

Decide whether to reject or not reject the null hypothesis

Clearly state a conclusion in the context of the problem

Data Set :

Background

The data were collected at Bay State Medical Center, Springfield, MA, during 1996. The goal of this case control study was to identify risk factors associated with giving birth to low birth weight babies (weighing less than 2500 grams). The data includes the birth weight (in grams) of 189 newborn babies, 59 of whom had low birth weight and 130 of whom had normal birth weight, along with some characteristics (e.g., age, smoking status) of their mothers.

***DATA SET

Low birth wt /Age of mother

0 19

0 33

0 20

0 21

0 18

0 21

0 22

0 17

0 29

0 26

0 19

0 19

0 22

0 30

0 18

0 18

0 15

0 25

0 20

0 28

0 32

0 31

0 36

0 28

0 25

0 28

0 17

0 29

0 26

0 17

0 17

0 24

0 35

0 25

0 25

0 29

0 19

0 27

0 31

0 33

0 21

0 19

0 23

0 21

0 18

0 18

0 32

0 19

0 24

0 22

0 22

0 23

0 22

0 30

0 19

0 16

0 21

0 30

0 20

0 17

0 17

0 23

0 24

0 28

0 26

0 20

0 24

0 28

0 20

0 22

0 22

0 31

0 23

0 16

0 16

0 18

0 25

0 32

0 20

0 23

0 22

0 32

0 30

0 20

0 23

0 17

0 19

0 23

0 36

0 22

0 24

0 21

0 19

0 25

0 16

0 29

0 29

0 19

0 19

0 30

0 24

0 19

0 24

0 23

0 20

0 25

0 30

0 22

0 18

0 16

0 32

0 18

0 29

0 33

0 20

0 28

0 14

0 28

0 25

0 16

0 20

0 26

0 21

0 22

0 25

0 31

0 35

0 19

0 24

0 45

1 28

1 29

1 34

1 25

1 25

1 27

1 23

1 24

1 24

1 21

1 32

1 19

1 25

1 16

1 25

1 20

1 21

1 24

1 21

1 20

1 25

1 19

1 19

1 26

1 24

1 17

1 20

1 22

1 27

1 20

1 17

1 25

1 20

1 18

1 18

1 20

1 21

1 26

1 31

1 15

1 23

1 20

1 24

1 15

1 23

1 30

1 22

1 17

1 23

1 17

1 26

1 20

1 26

1 14

1 28

1 14

1 23

1 17

1 21

Race of mother/ Smoking status during pregnancy

2 0

3 0

1 1

1 1

1 1

3 0

1 0

3 0

1 1

1 1

3 0

3 0

3 0

3 0

1 1

1 1

2 0

1 1

3 0

1 1

3 0

1 0

1 0

3 0

3 0

1 0

1 1

1 0

2 1

2 0

2 0

1 1

2 1

1 0

2 0

1 1

1 1

1 1

1 1

1 1

2 1

1 0

2 0

1 0

1 1

1 1

1 0

3 0

1 0

3 1

1 0

3 0

1 1

1 1

3 0

3 0

3 1

3 0

3 0

3 0

3 0

3 0

3 0

1 0

3 1

3 0

3 0

3 1

1 0

2 0

1 1

3 1

3 1

2 0

1 1

2 0

1 0

1 1

2 1

1 0

1 0

1 0

3 0

3 0

3 0

3 1

3 0

1 0

1 0

1 0

1 0

3 0

1 1

1 1

1 1

1 0

1 0

1 1

1 1

1 0

1 0

1 1

3 0

1 0

3 0

2 0

1 0

1 0

1 1

2 0

1 0

3 0

1 1

1 0

1 1

3 0

1 0

3 0

1 0

3 0

1 0

3 0

1 0

1 0

1 0

1 0

1 0

1 1

1 0

1 0

3 1

1 0

2 1

3 0

3 0

3 0

3 0

2 0

3 0

1 1

1 1

1 1

3 0

3 0

1 1

1 1

2 0

1 1

3 0

3 0

3 0

1 0

1 1

1 1

1 0

3 1

2 1

1 1

2 0

3 1

1 1

3 0

3 0

3 0

2 1

1 1

3 0

3 0

1 1

1 0

2 1

2 1

2 1

3 0

3 0

1 1

1 1

1 1

1 1

2 0

3 0

3 0

1 1

3 1

1 1

3 0

3 1

2 0

1 1

Explanation / Answer

based on the data , we check whether age and low birth weight are related

H0 : there is no difference in the mean age for the low and high birth weights

H1 :  there is a signficant difference in the mean age for the low and high birth weights

we shall conduct a independent samples t test in the open source statisitcal package R

The code is as follows

# read the data into R dataframe
data.df<- read.csv("C:\Users\586645\Downloads\Chegg\birth.csv",header=TRUE)
str(data.df)

data.df$Low.Birth <- as.factor(data.df$Low.Birth)

low <- data.df[data.df$Low.Birth==0,]
high <- data.df[data.df$Low.Birth==1,]


t.test(low$Age,high$Age, var.equal = FALSE)

The results are as follows

t.test(low$Age,high$Age, var.equal = FALSE)

Welch Two Sample t-test

data: low$Age and high$Age

t = 1.7737, df = 136.94, p-value = 0.07834 ## as the p value is not less than 0.05 hence we fail to reject the null hypothesis

alternative hypothesis: true difference in means is not equal to 0

95 percent confidence interval:

-0.1558349 2.8687423

sample estimates:

mean of x mean of y

23.66154 22.30508

Conclusion : there is no difference in the mean age for the low and high birth weights

Please note that we can answer only 1 question at a time as per the answering guidelines

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote