Click the badge below to run this tutorial in your browser—no installation required!
- Load and explore synthetic NYC Subway ridership data
- Implement OLS regression from scratch using matrix algebra
- Use
statsmodelsfor full regression analysis - Interpret coefficients, R², t-statistics, p-values, and confidence intervals
- Perform diagnostic checks and visualizations
If you prefer to run locally:
git clone https://github.com/YOUR-USERNAME/ols-regression-tutorial.git
cd ols-regression-tutorial
pip install -r requirements.txt
jupyter notebook OLS_Python_Tutorial.ipynbThe nyc_subway_ridership.csv file contains simulated data for educational purposes.
For real NYC subway data, visit: https://data.ny.gov/d/wujg-7c2s