PUBH 6310 - Statistical Analysis for Health Policy

Welcome to the interactive live demonstrations for PUBH 6310! 🎉

This page provides links to several live demos built with Marimo, an interactive Python notebook. These demos are designed to help you visualize and understand key statistical concepts covered in the course. To get started, simply click the link for the demo you wish to explore.


🧪 Live Demo 1: Sampling Illustration

This demo explores the fundamentals of sampling. You’ll see firsthand how we draw samples from a larger population and why the method we use is so important. We’ll cover concepts like sampling bias and demonstrate why applying sampling weights and correct for sampling design is crucial for generating accurate estimates when dealing with complex survey designs.


📊 Live Demo 2: Bivariate Analysis of Categorical Variables

Here, we dive into the relationship between two categorical variables. This demo will walk you through creating and interpreting contingency tables (cross-tabulations) and performing a Chi-squared (${\chi^2}$) test of independence. This is the perfect tool for answering questions like, “Is there a statistically significant association between a patient’s insurance type and their hospital admission status?”


📈 Live Demo 3: Logistic Regression

This demonstration introduces logistic regression, a powerful technique used to model binary outcomes (e.g., yes/no, success/failure, admitted/not-admitted). You’ll learn how to fit a logistic regression model and, most importantly, how to interpret its output, including odds ratios (OR), to understand how different predictors affect an outcome.


📉 Live Demo 4: Bivariate Analysis of Continuous Variables

This comprehensive demo covers how to analyze the relationship between two variables when at least one is continuous. We will explore two main scenarios:

  1. Two Continuous Variables: Learn to measure the strength and direction of an association using Pearson correlation (for normally distributed data) and its non-parametric alternative, Spearman’s rank correlation.
  2. One Continuous & One Categorical Variable: Discover how to compare the average of a continuous variable across different groups using tests like:

📈 Live Demo 5: Introduction to Linear Regression

This demo introduces linear regression, a powerful statistical method used for modeling the relationship between variables and making predictions. We will cover how to build, interpret, and validate regression models.

  1. Simple Linear Regression (SLR): Learn to model the relationship between one continuous dependent variable and one continuous independent variable. We’ll focus on fitting the model, interpreting the coefficients ($\beta_0$ and $\beta_1$), and understanding model fit using R-squared.
  2. Multiple Linear Regression (MLR): Extend the model to include multiple independent variables (which can be continuous or categorical). Learn to interpret coefficients in the context of other variables and assess the overall model significance.
  3. Assumption Checking: Explore the critical assumptions of linear regression (linearity, normality of residuals, homoscedasticity, and independence) and learn how to diagnose violations using plots.