From Cleaned Data to Hypotheses¶
This module bridges the gap between transformed survey data and empirical hypothesis testing. Using grouped comparisons and cross-tabulations, we examine whether observed differences between groups are substantively meaningful.
Theory¶
Suggested Conceptual Reading & Discussion¶
Code: Live Demo & Hands-on Lab¶
Student Group Live Demo (Group 2)¶
- Topic: Subgroup Analysis & Cross-Tabulations (
groupby(), comparing group means,pd.crosstab(..., normalize='index')). - Review the Live Demo Guidelines & Schedule.
Hands-on Practice¶
- Download and open Notebook #06 to compute grouped means and two-way cross-tabulations on your project variables.
Application¶
Milestone 4 Check-in & Review¶
- Share initial bivariate patterns and receive peer and instructor feedback on your subgroup comparisons.
Get Ready for Next Session: Think. Explore. Practice.¶
Think¶
- How does your research hypothesis translate into a formal econometric model ($Y = \beta_0 + \beta_1 X + \epsilon$)? What is the expected sign (+ / -) of the slope coefficient $\beta_1$?
- For categorical predictors (e.g., race, religion, region), what is your reference/baseline category, and how will you interpret differences relative to that baseline?
- Suggested Reading: Argyle, L. P., Busby, E. C., Fulda, N., Gubler, J. R., Rytting, C., & Wingate, D. (2023). Out of one, many: Using language models to simulate human samples. Political Analysis, 31(3), 337-351. - Illustrates rigorous regression model specifications and how contemporary computational methods interface with empirical political behavior.
Explore¶
- Live Demo (Group 3): Linear Regression & Categorical Predictors. Group 3 prepares a 10–15 min demonstration and shares the handout on WhatsApp before class (groups can book a meeting with the instructor to get direction).
- The class should review the Statsmodels Formula API Guide to follow along and lead the peer discussion.
Practice¶
- Start a modeling notebook (
modeling.ipynb) in your group repository and fit a baseline univariate regression ($DV \sim IV$) withsmf.ols. - Looking Ahead: Milestone 5 - Modeling will be due in Session 11 (Mar 05 at 08:00).