IntroAnalysis:::ma223_setup() library(learnr) knitr::opts_chunk$set(echo = FALSE) learnr::tutorial_options(exercise.cap = "Exercise")
```{css, echo=FALSE} / Solution Functionality / .accordion > input[type="checkbox"] { position: absolute; left: -100vw; }
.accordion .content { overflow-y: hidden; height: 0; transition: height 0.3s ease; }
.accordion > input[type="checkbox"]:checked ~ .content { height: auto; overflow: visible; }
.accordion label { display: block; }
/ Styling /
.accordion { margin-bottom: 1em; }
.accordion > input[type="checkbox"]:checked ~ .content { padding: 15px; border: 1px solid #e8e8e8; border-top: 0; }
.accordion .handle { margin: 0; }
.accordion label { cursor: pointer; font-weight: normal; padding: 15px; }
.accordion label:hover, .accordion label:focus { background: #d8d8d8; }
/ Turning arrow / .accordion .handle label:before { font-family: 'fontawesome'; content: "\f054"; display: inline-block; margin-right: 10px; font-size: .58em; line-height: 1.556em; vertical-align: middle; }
.accordion > input[type="checkbox"]:checked ~ .handle label:before { content: "\f078"; }
.tipbox { padding: 1em 1em 1em 1em; border: 1px solid black; border-radius: 10px; box-shadow: 2px 2px #888888; }
.keyidea { border: 1px solid #54585A; background: #4F758B; color: white; }
.keyidea:before { content: "Key Idea: "; font-weight: bold; }
.tip { background: lightyellow; }
.tip:before { content: "Tip: "; font-weight: bold; }
.title{ color: #800000; background: none; }
.solution { background: #ebebeb; }
h2{ color: white; background-color: #800000; }
h3{ color: #800000; border-bottom: thick solid #696969; }
h4{ color: #800000; }
blockquote { font-size: inherit; padding: 0px 20px; }
## Background Women have been historically underrepresented in STEM. In addition to the social pressures felt by women when they enter historically male-dominated professions, women in STEM must also battle negative stereotypes of women in these disciplines. These stereotypes and biases can exist both explicitly (e.g., addressing statements such as "men have more STEM ability than women" or females being expected to assume the role of "secretary" within a team setting) and implicitly (e.g., a women being met with surprise when they state that they are studying engineering). In order to combat negative stereotypes and encourage young women interested in pursuing STEM, women who have created successful careers in STEM are held up as role models. [Van Camp, Gilbert, and O'Brien (2019)](https://link.springer.com/article/10.1007/s11218-019-09498-2) were interested in examining the importance of young women _identifying_ with these role models. They hypothesized that encouraging women to reflect on the ways in which they identify with female role models in STEM would reduce stereotypes about women in STEM and improve retention within these disciplines. They enrolled 72 first-year female students from a small, private university who expressed an interest in a STEM major. Each of the participants was randomly assigned to one of three groups: standard role model, reflective role model, control group. The women assigned to the either the "standard role model" or the "reflective role model" group were sent a biography about a successful woman in a STEM career who is an alumni of their university; the biography included information about the woman's career. After receiving the biography, participants in the "standard role model" group were asked to write a paragraph summarizing the details of the portfolio they read. Women assigned to the "reflective role model" group were asked to write a paragraph describing how they identified with the woman in the biography; here "identification" encompassed "the extent to which they [felt] similar to the role model, [could] relate to the role model, and/or [wanted] to achieve a similar level of success as the role model." Women assigned to the "control group" were given a biography about a woman who is an alumni of their university; the biography included information about the woman's hobbies. These participants were then asked to write a paragraph summarizing the biography. Participants were given a 28-item questionnaire to assess the extent to which they felt a sense of belonging within the STEM community. Participants responded to each question using a 7-point scale. Responses were collated into a single score (ranging from 1-7) with higher scores indicating a stronger sense of belonging. Nearly all (69 of the 72) participants provided their GPA at the end of the semester (remember, these were students in their first semester of college); 65 of these women were taking STEM courses, and the GPA for these courses was computed separately. We have access to the data from this study (`rolemodel`), including the treatment assigned (`condition`), their sense of belonging at the end of the study (`stembelong2`) and their GPA within stem courses at the end of the semester (`stemgpa`). > Despite efforts to recruit more women, women continue to be underrepresented at Rose-Hulman in a number of disciplines. And, women are not the only group underrepresented on campus. If you are a member of an underrepresented group and would like to identify a mentor or role model who can help you navigate the unique experiences you face on campus, do not hesitate to advocate for yourself. Nearly every female faculty member on campus could attest to the challenges they faced throughout their career. We would be happy to connect you with someone. ## Framing the Question ### Exercise: Graphical Summary > Construct a graphic comparing the distribution of the participants' GPA within STEM courses across each of the three treatment conditions. ```r ggplot() + aes() + labs()
ggplot(data = rolemodel) + aes(y = stemgpa, x = condition) + labs(y = 'GPA within STEM Courses', x = '') + geom_boxplot() + geom_jitter()
Suppose researchers are interested in comparing the average sense of belonging within STEM across the three treatment groups. That is, researchers are interested in determining if, on average, the sense of belonging within STEM differs for at least one of the role model groups ("standard", "reflective", or "control").
State the null and alternative hypotheses that capture this research objective.
Write a model for the data generating process which is a function of the parameters defined in the hypotheses above.
We are interested in estimating the parameters in the model previously described. Assuming the data is consistent with all conditions for the classical ANOVA model, compute a 95% CI for each of the parameters.
rolemodel.model.h1 = specify_mean_model() estimate_parameters()
rolemodel.model.h1 = specify_mean_model(stembelong2 ~ condition, data = rolemodel) estimate_parameters(rolemodel.model.h1, confidence.level = 0.95, assume.constant.variance = TRUE, assume.normality = TRUE)
rolemodel.model.h1 = specify_mean_model(stembelong2 ~ condition, data = rolemodel)
Specify the model for the data generating process under the null hypothesis.
Compute the ANOVA table which partitions the variability in the response in order to allow us to test the hypotheses specified above assuming the data is consistent with the conditions for the classical ANOVA model.
rolemodel.model.h0 = specify_mean_model() compare_models()
rolemodel.model.h0 = specify_mean_model(stembelong2 ~ 1, data = rolemodel) compare_models(rolemodel.model.h1, rolemodel.model.h0, alternative = 'at least one differs', assume.constant.variance = TRUE, assume.normality = TRUE)
Given the analysis conducted, one student concludes that "the research shows that having young women identify with role models is not helpful in promoting a sense of belonging." Explain why this statement is not justified.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.