Learning Statistics with Python
  • Cover
  • Ch 0
  • Ch 1
  • Ch 2
  • Ch 3
  • Ch 4
  • Ch 5
  • Ch 6
  • Ch 7
  • ๐Ÿ“– Book

Learning Statistics with Python

HKUST Business School ยท ISOM 5650

Learning Statistics
with Python

Explore statistical ideas through Python and real examples.
Read the book, run the slides, and put each idea into practice.

Taught by Prof. Xuhu Wan ยท Fall 2026

8 chapters45 sectionsInteractive PythonSection practice & quizzes

Course content

Choose a section to explore its slides, or open its practice. Each chapter ends with a quiz.

Chapter 0

Basics of Python

Open chapter โ†—

Python as a calculator, numbers, strings, lists, tuples, sets, dictionaries, control flow, comprehensions, functions, error handling, modules, NumPy arrays and SciPy probabilities.

5 sections ยท Section slides & practice
  1. 01Values, Numbers and Strings
    Video + slides โ†—Practice โ†—
  2. 02Containers and Object Identity
    Video + slides โ†—Practice โ†—
  3. 03Branches, Loops and Comprehensions
    Video + slides โ†—Practice โ†—
  4. 04Functions, Formatting and Error Handling
    Video + slides โ†—Practice โ†—
  5. 05Modules, NumPy and SciPy
    Video + slides โ†—Practice โ†—
Chapter 0 quiz10 questions ยท Review the whole chapter
Start quiz โ†—

Chapter 1

Data Structures and Methods of Series

Open chapter โ†—

Series foundations: structures, arithmetic, summaries, cleaning, selection, time-series features and labelled charts, following a numbered learning path.

5 sections ยท Section slides & practice
  1. 01Series Foundations
    Video + slides โ†—Practice โ†—
  2. 02Value Transformations and Cleaning
    Video + slides โ†—Practice โ†—
  3. 03Selection and Index Alignment
    Video + slides โ†—Practice โ†—
  4. 04Time-series Features and Resampling
    Video + slides โ†—Practice โ†—
  5. 05Figures and Statistical Charts
    Video + slides โ†—Practice โ†—
Chapter 1 quiz10 questions ยท Review the whole chapter
Start quiz โ†—

Chapter 2

DataFrames

Open chapter โ†—

A numbered data-engineering path: table foundations, evidence-led audit and repair, grouped tables, validated joins, feature pipelines and research applications, with a 3.5-hour classroom route.

5 sections ยท Section slides & practice
  1. 01DataFrame Foundations
    Video + slides โ†—Practice โ†—
  2. 02Data Quality: Audit, Repair and Selection
    Video + slides โ†—Practice โ†—
  3. 03Grouped Tables, Joins and Reshaping
    Video + slides โ†—Practice โ†—
  4. 04Feature Pipelines and Research Applications
    Video + slides โ†—Practice โ†—
  5. 05Interactive Visualisation
    Video + slides โ†—Practice โ†—
Chapter 2 quiz10 questions ยท Review the whole chapter
Start quiz โ†—

Chapter 3

Reshaping Statistics

Open chapter โ†—

Statistics across business applications: distributions of customer and operating measurements, sampling uncertainty, experiments and multiple comparisons, association and cohort prediction evaluation, followed by portfolio loss and tail risk.

5 sections ยท Section slides & practice
  1. 01Feature Distributions and Diagnostics
    Slides โ†—Practice โ†—
  2. 02Sampling Uncertainty and Comparisons
    Slides โ†—Practice โ†—
  3. 03Research Design and Multiple Testing
    Slides โ†—Practice โ†—
  4. 04Association and Prediction Evaluation
    Slides โ†—Practice โ†—
  5. 05Portfolio Losses and Tail Risk
    Slides โ†—Practice โ†—
Chapter 3 quiz10 questions ยท Review the whole chapter
Start quiz โ†—

Chapter 4

Statistical Predictive Models

Open chapter โ†—

Business prediction across delivery, inventory, customers, fraud and finance: target definitions, losses and decision costs; OLS, inference, model selection, nonlinear learners, causal designs, attention and walk-forward evaluation.

6 sections ยท Section slides & practice
  1. 01Targets, Regression and OLS
    Slides โ†—Practice โ†—
  2. 02Inference and Model Selection
    Slides โ†—Practice โ†—
  3. 03Nonlinear Models and Loss Classification
    Slides โ†—Practice โ†—
  4. 04Causal Questions and Research Designs
    Slides โ†—Practice โ†—
  5. 05Cross-sectional Attention Features
    Slides โ†—Practice โ†—
  6. 06Walk-forward Decisions and Portfolio Accounts
    Slides โ†—Practice โ†—
Chapter 4 quiz10 questions ยท Review the whole chapter
Start quiz โ†—

Chapter 5

Bayesian Methods for Investment Research

Open chapter โ†—

Bayesian foundations for investment research: priors, posterior and predictive checks, robust regression, sequential learning, hierarchical stock signals, model uncertainty and walk-forward portfolio evidence.

6 sections ยท Section slides & practice
  1. 01Bayesian Foundations and Risk Estimates
    Slides โ†—Practice โ†—
  2. 02Bayesian Regression and Predictive Checks
    Slides โ†—Practice โ†—
  3. 03Robust Regression with Fat Tails
    Slides โ†—Practice โ†—
  4. 04Sequential Learning and Adaptive Risk
    Slides โ†—Practice โ†—
  5. 05Bayesian Signals and Partial Pooling
    Slides โ†—Practice โ†—
  6. 06Model Uncertainty and Portfolio Evidence
    Slides โ†—Practice โ†—
Chapter 5 quiz10 questions ยท Review the whole chapter
Start quiz โ†—

Chapter 6

Time Series Models for Volatility and Risk

Open chapter โ†—

Time-series models for volatility: clustering, ARCH/GARCH, asymmetric shocks, variance forecasts, VaR and volatility targeting. Stationarity, chronological evaluation, relationships and hidden states provide the supporting tools.

6 sections ยท Section slides & practice
  1. 01Stationarity, Dependence and ARIMA
    Slides โ†—Practice โ†—
  2. 02Forecast Benchmarks and Walk-forward Learning
    Slides โ†—Practice โ†—
  3. 03Cointegration and Pairs Trading
    Slides โ†—Practice โ†—
  4. 04Kalman Filters and Regime Switching
    Slides โ†—Practice โ†—
  5. 05ARCH, GARCH and Conditional Risk
    Slides โ†—Practice โ†—
  6. 06Asymmetric Volatility and Position Sizing
    Slides โ†—Practice โ†—
Chapter 6 quiz10 questions ยท Review the whole chapter
Start quiz โ†—

Chapter 7

Modern Statistical Learning in Practice

Open chapter โ†—

Ranking, prediction intervals, partial effects, covariance and cluster allocation, event labels and selection uncertainty. Seven sections connect the statistical methods to a revisable, source-linked coding reference.

7 sections ยท Section slides & practice
  1. 01Learning to Rank
    Slides โ†—Practice โ†—
  2. 02Quantile and Conformal Prediction
    Slides โ†—Practice โ†—
  3. 03Double Machine Learning
    Slides โ†—Practice โ†—
  4. 04Covariance Shrinkage and Cluster Allocation
    Slides โ†—Practice โ†—
  5. 05Event Labels and Two-stage Decisions
    Slides โ†—Practice โ†—
  6. 06Strategy Selection and Multiple Testing
    Slides โ†—Practice โ†—
  7. 07A Revisable Course Reference for Coding
    Slides โ†—Practice โ†—
Chapter 7 quiz10 questions ยท Review the whole chapter
Start quiz โ†—

In this course

00Python basics01Pandas Series02DataFrames03Reshaping statistics04Predictive models05Bayesian methods06Time series07Statistical learning

Learn by doing

Read the section, predict what its code will do, then run and change the examples. Use section practice to check your understanding and finish with the chapter quiz.

For fuller explanations and review, use the companion book.

Open interactive book โ†—
 

ยฉ 2026 Prof. Xuhu Wan ยท ISOM, HKUST Business School