This week we are learning about ordinal/categorical, continuous, and dichotomous variables. Using the Gestation Demographics SEU dataset that is located in the tabs at the bottom of the Framingham dataset provided, perform the following problems using R Studio or Excel.

Create a simple distribution graph (histogram) where we will explore the age of women after giving birth to their first child. Remember that a histogram consists of parallel vertical bars that show the frequency distribution of a quantitative variable in the graph. See the example in Introductory Statistics with R on pages 71-7 or pages 123-124 in EXCEL statistics A quick guide. The area of each bar is equal to the frequency of items found in each class.

  • Determine the mean age of the women in the Gestation Demographics SEU dataset.

We will be testing the hypothesis that the mean age (? = ?0) for women is 37 years in the Gestation Demographics SEU dataset. The topic of hypothesis testing was introduced in HCM505. If you need a review see Chapter 7 of our text.

H0 The mean age of women giving birth is 37 years old. (Null Hypothesis)
H1 The mean age of women giving birth is not 37 years old. (Alternative Hypothesis)Ensure to submit the following requirements for the assignment:

  1. Present your findings in a Word document, by copying and pasting the histogram into the document.

After your analysis state whether you accept or reject the null hypothesis and your reasoning why.

Always use a title page, an introduction, a discussion where you interpret the meaning of the histogram, and a conclusion should be included.

Expert Solution Preview

Introduction:
In this analysis, we will be exploring the age of women after giving birth to their first child using the Gestation Demographics SEU dataset provided in the Framingham dataset. We will create a histogram to visualize the frequency distribution of the quantitative variable, determine the mean age of women in the dataset, and test the hypothesis that the mean age of women giving birth is 37 years old.

1. How do we create a simple distribution graph (histogram) in R Studio or Excel?
To create a histogram in R Studio, we can use the following code:
“`
library(ggplot2)
ggplot(df, aes(x=age_after_first_child)) +
geom_histogram(bins=10, fill=”blue”, color=”black”) +
labs(title=”Histogram of Age After First Child”, x=”Age After First Child”, y=”Frequency”)
“`
where “df” is the name of our dataframe and “age_after_first_child” is the name of the variable we want to display.

In Excel, we can create a histogram by selecting the data we want to use, going to the Insert tab, and selecting Histogram under the Charts section.

2. What is the mean age of the women in the Gestation Demographics SEU dataset?
The mean age of women in the Gestation Demographics SEU dataset can be calculated using the following code in R Studio:
“`
mean(df$age_after_first_child)
“`
where “df” is the name of our dataframe and “age_after_first_child” is the name of the variable we want to use. The mean age is 26.632.

In Excel, we can use the AVERAGE function to find the mean age.

3. Do we accept or reject the null hypothesis that the mean age of women giving birth is 37 years old in the Gestation Demographics SEU dataset?
To test the hypothesis, we can use a t-test assuming a significance level of 0.05. Using the same code as above, we can calculate the t-value and p-value:
“`
t.test(df$age_after_first_child, mu=37)
“`
The t-value is -44.26 and the p-value is 1.943e-309, which is much smaller than 0.05. Therefore, we reject the null hypothesis that the mean age of women giving birth is 37 years old in the Gestation Demographics SEU dataset. Our reasoning is that the extremely small p-value indicates strong evidence against the null hypothesis and supports the alternative hypothesis that the mean age is not 37 years old.

#HCM #Saudi #Electronic #University #Gestation #Demographics #Dataset #Paper