Lilly collects data on a sample of 40 high school students to evaluate whether the proportion of female high school students who take advanced math courses in high school varies depending upon whether they have been raised primarily by their father or by both their mother and their father. Two variables are found below in the data file: math (0 = no advanced math and 1 = some advanced math) and Parent (1= primarily father and 2 = father and mother).

Parent Math
1.0 0.0
1.0 0.0
1.0 0.0
1.0 0.0
1.0 0.0
1.0 0.0
1.0 0.0
1.0 0.0
1.0 0.0
1.0 0.0
1.0 0.0
1.0 0.0
1.0 0.0
1.0 0.0
1.0 0.0
1.0 0.0
1.0 0.0
1.0 0.0
1.0 0.0
1.0 0.0
2.0 0.0
2.0 1.0
2.0 1.0
2.0 1.0
2.0 1.0
2.0 1.0
2.0 1.0
2.0 1.0
2.0 1.0
2.0 1.0
2.0 0.0
2.0 0.0
2.0 0.0
2.0 0.0
2.0 0.0
2.0 0.0
2.0 0.0
2.0 0.0
2.0 0.0
2.0 0.0

a) Conduct a crosstabs analysis to examine the proportion of female high school students who take advanced math courses is different for different levels of the parent variable.
b) What percent female students took advanced math class
c) What percent of female students did not take advanced math class when females were raised by just their father?
d) What are the Chi-square results? What are the expected and the observed results that were found? Are they results of the Chi-Square significant? What do the results mean?
e) What were your null and alternative hypotheses? Did the results lead you to reject or fail to reject the null and why?

Please only post your questions once. Repeating posts will not get a quicker response. In addition, it wastes our time looking over reposts that have already been answered in another post. Thank you.

We do not do your homework for you. Although it might take more effort to do the work on your own, you will profit more from your effort. We will be happy to evaluate your work though.

tHANKS, I DO APOLOGIZE, DON'T EXPECT FOR YOU TO DO HOMEWORK FOR ME, JUST DON'T KNOW HOW TO DO IT AND WAS HOPING TO IMPROVE MY UNDERSTANDING.

To answer the questions, we can use a statistical software or programming language that supports crosstabs analysis, such as R or Python's pandas library.

a) To conduct a crosstabs analysis, we need to calculate the contingency table, which shows the joint distribution of the two categorical variables "Parent" and "Math". We can do this in R using the `table()` function:

```
# Read the data into a dataframe
data <- read.csv("data.csv")

# Calculate the contingency table
table_result <- table(data$Parent, data$Math)

# Print the contingency table
print(table_result)
```

b) To calculate the percentage of female students who took advanced math class, we can use the contingency table. It appears that "Math" variable represents whether students took advanced math or not. We can sum up the counts for students who took advanced math (Math = 1) and divide it by the total number of students:

```
# Calculate the total number of students
total_students <- sum(table_result)

# Calculate the number of female students who took advanced math
female_advanced_math <- sum(table_result[2, 2])

# Calculate the percentage of female students who took advanced math
percent_female_advanced_math <- (female_advanced_math / total_students) * 100

# Print the result
print(percent_female_advanced_math)
```

c) To calculate the percentage of female students who did not take advanced math class when raised by just their father (Parent = 1), we need to find all instances where Parent = 1 and Math = 0, and divide it by the total number of students raised by just their father:

```
# Calculate the total number of students raised by just their father
total_father <- sum(table_result[1, ])

# Calculate the number of female students raised by just their father who did not take advanced math
female_father_no_math <- table_result[1, 1]

# Calculate the percentage of female students who did not take advanced math when raised by just their father
percent_female_father_no_math <- (female_father_no_math / total_father) * 100

# Print the result
print(percent_female_father_no_math)
```

d) To calculate the Chi-square results, we need to perform a chi-square test of independence. This test will evaluate whether there is a statistically significant relationship between the "Parent" and "Math" variables. In R, we can use the `chisq.test()` function:

```
# Perform the chi-square test
chi_square_result <- chisq.test(table_result)

# Print the complete results
print(chi_square_result)
```

The chi-square test provides several results. The observed results are the observed frequencies from the contingency table. The expected results are the frequencies expected under the assumption that the two variables are independent. The p-value in the test result indicates the significance level of the test. If the p-value is less than the chosen significance level (usually 0.05), we can reject the null hypothesis.

e) The null hypothesis (H0) is that there is no relationship between the "Parent" and "Math" variables, and the alternative hypothesis (H1) is that there is a relationship between them. The chi-square test results will tell us whether we can reject or fail to reject the null hypothesis. If the p-value is less than the chosen significance level, we can reject the null hypothesis and conclude that there is a significant relationship between the variables. If the p-value is greater than the significance level, we fail to reject the null hypothesis and conclude that there is no significant relationship.