HW 06 - Bivariate Modeling
Analyzing Associations between two variables.
Purpose
We’ve been visually exploring relationships between two variables by creating appropriate plots to assess how the distribution of a primary outcome (response/dependent) variable changes according to the level of a predictor (explanatory/independent/covariate) variable. We can learn a lot by conducting exploratory data analysis, and if description is the goal then this is where your work can stop.
However, if you want to make conclusions or inference about a relationship, then formal statistical analysis techniques are needed. We start here by formally testing if relationships or associations between two measures exist, then later will see how additional third variables can potentially disrupt or enhance any association that you may find.
Submission instructions
- Use the template provided: [QMD]
- Right click and ‘save as’, then upload this file into your
scripts
folder in Posit Cloud.
- Right click and ‘save as’, then upload this file into your
- Upload your PDF to Canvas by the due date
Instructions
In this assignment you will practice THREE(3) different types of bivariate analysis:
- (Q~B) Quantitative Outcome ~ Binary Categorical Explanatory == Two-sample t-tests for a difference in means
- (Q~C) Quantitative Outcome ~ Categorical Explanatory == ANOVA
- (B~C) Binary Outcome ~ Categorical (or Binary) Explanatory == \(\chi^{2}\) test of Association.
For each analysis you will do the following steps:
State which variable (including the variable name from your codebook) will be your explanatory variable and which will be your response variable.
- Remember, you have some variables in your codebook that can act as both categorical and quantitative.
- Decide which of those variables makes sense to “explain” the other. Don’t just blindly pick a bunch of variables.
- Think about the relationship among your variables, keeping in mind your original research questions. You may use gender as your categorical explanatory variable if you are struggling to find an explanatory and response relationship that makes sense.
Create an appropriate bivariate plot to visualize the relationship you are exploring. Calculate appropriate summary statistics. Summarize the relationship between the explanatory and outcome variables in short paragraph form.
Write the relationship you want to examine in the form of a research question.
- State the null and alternative hypotheses as sentences.
Perform an appropriate statistical analysis using the full four step method as outlined in class and described below.
- a. Define the parameters being tested. (\(\rho\), \(p_{1}\), \(\mu_{1}\), \(\beta_{1}\) etc)
- b. Translate the null and alternative hypotheses into \(H_{0}\) and \(H_{A}\) with symbols.
- c. State and verify assumptions of the test. Even if these assumptions are potentially violated, for the purposes of this assignment, acknowledge this limitation and continue with the prescribed analysis.
- d. Conduct the analysis. Make a decision whether or not to reject the null hypothesis and state your justification.
Write a conclusion in context of the problem that includes a point estimate, confidence interval, and p-value.