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?

To answer these questions, we will use a statistical tool called cross-tabulation (crosstabs) analysis and chi-square analysis. Here are the steps to answer each question:

a) To conduct a crosstabs analysis, we will create a contingency table that shows the relationship between the Parent variable and the Math variable. Here is the contingency table:

| Math=0 | Math=1 | Total
-----------|---------|---------|-------
Parent=1 | 20 | 0 | 20
Parent=2 | 10 | 10 | 20
-----------|---------|---------|-------
Total | 30 | 10 | 40

This table shows the count of females who took advanced math (Math=1) or did not take advanced math (Math=0) based on the type of parent(s) they were raised by.

b) To calculate the percentage of female students who took advanced math, we will divide the count of females who took advanced math (Math=1) by the total count of females. In this case,

Percentage = (Count of females who took advanced math / Total count of females) * 100
= (10 / 40) * 100
= 25%

Therefore, 25% of female students took advanced math class.

c) To calculate the percentage of female students who did not take advanced math class when raised by their father only (Parent=1), we will divide the count of females who did not take advanced math (Math=0) and were raised by their father (Parent=1) by the total count of females raised by their father only. In this case,

Percentage = (Count of females who did not take advanced math and raised by their father / Total count of females raised by their father only) * 100
= (20 / 20) * 100
= 100%

Therefore, 100% of female students did not take advanced math class when raised by just their father.

d) To perform the chi-square analysis, we will compare the observed frequencies (counts) with the expected frequencies (counts) under the assumption of independence. The chi-square test will help us determine if there is a statistically significant association between the Parent and Math variables.

Here are the observed and expected frequencies contingency table:

| Math=0 | Math=1 | Total
-----------|---------|---------|-------
Parent=1 | 20 | 0 | 20
Parent=2 | 10 | 10 | 20
-----------|---------|---------|-------
Total | 30 | 10 | 40

The chi-square test will give us a test statistic value and a p-value. The null hypothesis (H0) assumes no significant association between the Parent and Math variables, while the alternative hypothesis (Ha) assumes a significant association between the variables.

To interpret the chi-square results, we compare the p-value to a significance level (e.g., 0.05). If the p-value is less than the significance level, we reject the null hypothesis and conclude that there is a significant association between the variables. Otherwise, if the p-value is greater than the significance level, we fail to reject the null hypothesis and conclude that there is no significant association.

e) The null hypothesis (H0) for the chi-square test is that there is no significant association between the Parent and Math variables. The alternative hypothesis (Ha) is that there is a significant association between the variables.

The results of the chi-square test will determine whether we reject or fail to reject the null hypothesis based on the p-value and the chosen significance level. If the p-value is less than the significance level, we reject the null hypothesis, suggesting that there is a significant association. If the p-value is greater than the significance level, we fail to reject the null hypothesis, indicating that there is no significant association.

Please note that in order to perform the chi-square analysis, you would need to use statistical software or a calculator that provides chi-square test functionality.