Interactive Playground
Practise every chapter directly in your browser or download self-contained Python projects
Interactive Python Playground
Practise data science directly in your web browser—no local installation required—or download self-contained chapter project packages containing full datasets, starter scripts, and worked model solutions for your IDE.
1. Practise in Your Browser
Each playground page compiles and runs Python code right in your browser via Pyodide and quarto-live. Type your code, inspect plots inline, and test your hypotheses with zero software setup.
2. Download Chapter Projects
Download the self-contained .zip package for any chapter to practise in VS Code, Positron, or JupyterLab. Each package contains the study CSVs, starter Python scripts, and clean reference solutions.
Every Chapter Works in Four Progressive Stages:
Practise the Chapter
Repeat the textbook's core methods on the case study with starter templates, progressive hints, and verifiable solutions.
Go Further
Tackle advanced questions, edge cases, simulations, and real-world comparative benchmark datasets.
Check Understanding
Quick conceptual and diagnostic questions with model answers revealed on click to test your theoretical foundation.
Do It Yourself
Open-ended thesis tasks without scaffolding—empty code cells where you formulate the strategy and write the implementation.
Part 1: Foundations of Python Programming and Data Handling
Chapters 1 – 4Getting Started with Python
Variables, basic data types, lists, functions, arithmetic operations, and analyzing supervisor sleep records.
Data Structures in Python
pandas DataFrames, Series, column indexing, data types, missing value checks, and survey inspection.
Data Manipulation
Filtering rows, selecting columns, computing composite scores, grouping, pivoting, and merging longitudinal semesters.
Data Visualization
Designing publication-ready figures: histograms, KDE density curves, boxplots, violin plots, and multi-facet scatterplots.
Part 2: Statistical Analysis for Research
Chapters 5 – 10From Research Question to Data
Translating research questions into testable variables, Likert reverse coding, and calculating validated composite scales.
Descriptive Statistics & EDA
Central tendency, dispersion, interquartile ranges, skewness, kurtosis, and Shapiro-Wilk normality diagnostics.
Hypothesis Testing & Inference
Independent and paired t-tests, Mann-Whitney U, Wilcoxon signed-rank tests, Chi-Square contingency tables, and effect sizes.
ANOVA and Regression
One-way and two-way factorial ANOVA, Tukey HSD post-hoc comparisons, OLS linear regression, and residual assumption checks.
Multivariate Statistical Methods
Multiple regression with interaction terms, multicollinearity diagnostics (VIF), and Principal Component Analysis dimensionality reduction.
Mixed-Effects Models
Hierarchical linear models for repeated measures: random intercepts, random slopes, intraclass correlation (ICC), and longitudinal growth.
Part 3: Machine Learning with Python
Chapters 11 – 16Introduction to Machine Learning
Supervised vs unsupervised workflows, stratified train/test splits, StandardScaler preprocessing, cross-validation, and metrics.
Classification Models
Logistic Regression, Decision Trees, and Random Forests predicting student retention, dropout risk, and confusion matrix evaluation.
Predictive Regression
Regularization techniques: Ridge (L2), Lasso (L1), and ElasticNet for multicollinear thesis predictors and automated feature selection.
Advanced Clustering
Unsupervised clustering: K-Means, hierarchical agglomerative clustering with dendrograms, and silhouette validation of student profiles.
Neural Networks
Multi-Layer Perceptrons (MLPClassifier / MLPRegressor): architecting hidden layers, activation functions, loss curves, and non-linear patterns.
Time Series Forecasting
Decomposing seasonal trends, autocorrelation (ACF/PACF), rolling metrics, and ARIMA forecasting for longitudinal student metrics.
Part 4: Reproducible Research and Applications
Chapters 17 – 19Reproducible Research
Authoring reproducible documents with Quarto: computational reports, parameterization, automated APA tables, and bibliography management.
Using AI with Python
Collaborating with LLM coding assistants: debugging tracebacks, automated qualitative open-response coding, and academic verification rigor.
Putting It All Together
The complete thesis capstone: executing an end-to-end reproducible research workflow from raw survey CSVs to a defended results chapter.
All playground pages and downloadable project zips work on the study data files. You can also download any individual dataset directly:
The 600-student dataset used across the playground exercises was synthesized by a computer program to provide realistic empirical properties (including true positive effects, subtle interactions, and honest null findings). It does not represent real persons and should be utilized exclusively for academic learning and methodological practice.