Skip to content
Jien Weng
Menu

Writing

Product essays and technical notes on mathematics, AI, and research.

Linear regression8 lessons · from fitting a line to statistical testing

Follow the derivations in order. Each lesson builds on the notation and results from the previous one.

  1. Simple Linear RegressionAn introduction to simple linear regression, the OLS method, and deriving the estimators using Sxx and Sxy notation.5 min
  2. Multiple Linear RegressionExtending simple linear regression to multiple predictors using matrix notation and deriving the OLS estimator in matrix form.5 min
  3. Polynomial RegressionUnderstanding polynomial regression as a special case of multiple linear regression, with design matrix construction and overfitting considerations.5 min
  4. CorrelationDefining the Pearson correlation coefficient using Sxx, Syy, Sxy, Sx, and Sy notation, and exploring its properties.4 min
  5. R-squared: SST, SSE, SSR and the Relationship with CorrelationDefining the coefficient of determination from the sum of squares decomposition and proving that R-squared equals the square of the correlation coefficient.7 min
  6. Standard Error in RegressionDeriving the standard errors of the regression coefficients using MSE, Sxx, and the variance-covariance matrix.5 min
  7. Confidence Intervals for Regression CoefficientsConstructing confidence intervals for beta_0, beta_1, and beta_i using the t-distribution and standard errors.5 min
  8. Statistical Testing in RegressionPerforming hypothesis tests on regression coefficients using t-tests, p-values, and the connection to confidence intervals.5 min

Nov2026

  1. PostApplied AI6 min

    Why I’m Still Learning Maths

    OpenAI’s Navier–Stokes and ETH announcements, the unexpected uses of pure maths, and why I think this is a good time to start learning.

  2. PostApplied AI8 min

    Watching AI Agents Work Together in Games

    YC Labs’ Minecraft and Mindustry experiments reminded me of studying MARL: changing policies, shared rewards, and the difficulty of coordinating agents.

  3. PostApplied AI3 min

    A Design Checklist You Can Give Your AI

    How to use my design guide, what it asks an agent to check, and what three review trials showed.

Oct2026

  1. PostWeb36 minupdated Nov 12

    The Maths Behind Polymarket binary-pairs arbitrage

    Working through YES–NO arbitrage, fees paid in shares, order-book depth, and the gap between a paper trade and a live fill.

  2. PostWeb36 min

    Trying to Understand PaperTrade's Tokenomics

    How PaperTrade pays winners, rewards losses with PAPER, and gets people to participate.

Aug2026

  1. NoteMathematical Physics9 min

    Why Can't Time Flow Backwards? Entropy, Yu Deng, and What the Mathematics Actually Proves

    Reversible collisions, the Boltzmann equation, entropy, and the results of Yu Deng, Zaher Hani, and Xiao Ma.

  2. NoteWeb33 min

    CryptoRails: From Deposit to Settlement

    Deposit detection, consolidation, and verified-webhook settlement across EVM and TRON.

Jul2026

  1. PostProduct Management2 min

    How I Define When a Payment Is Complete

    The settlement boundary, its trade-off, and the acceptance criteria I work through with engineers.

  2. NoteStochastic Modelling13 min

    The Fokker-Planck Equation Explained, from an SDE to the Density it Evolves

    Derive the Fokker-Planck equation from Ito's lemma, then solve an Ornstein-Uhlenbeck example in Python and check it three ways.

Jun2026

  1. NoteMachine Learning12 minupdated Nov 12

    An Introduction to MLOps: A Complete Tutorial with a Hands-On Example

    A plain-language tutorial that follows the Intro to MLOps slides end to end: reproducibility, the software cycle, DevOps, the ML lifecycle, MLOps, and MLflow, with diagrams and a runnable hands-on.

  2. PostWeb31 min

    TRON Energy Is a Product Requirement

    Why TRON resource management changes the payment flow and the user experience.

May2026

  1. PostBusiness Transformation4 minupdated Nov 17

    Why We Built an Internal CRM After Trying Salesforce

    How I map sales, delivery, and finance handovers for an internal CRM at Quandatics.

  2. PostWeb32 min

    A Web3 Payment Needs More Than a Transaction Hash

    The product decisions behind payment states, confirmation, and settlement in a Web3 gateway.

  3. NoteMachine Learning9 min

    Tree-Based Models Explained: From Decision Trees to Random Forest and XGBoost

    An intuition-first but math-heavy walkthrough from decision tree splits to bagging in Random Forests and boosting in XGBoost.

Apr2026

  1. NoteSignal Processing17 min

    Fast Fourier Transform Explained from the DFT, with a Sound-Wave Example

    A first-principles walkthrough from sampled sound waves to the DFT, then from the DFT to the Cooley-Tukey FFT, with a from-scratch Python implementation and complexity proof.

  2. NoteMachine Learning13 min

    Softmax Regression Explained from Logistic Regression

    A first-principles walkthrough from odds and log-odds to logistic regression, then from logistic regression to softmax regression.

Feb2026

  1. NoteRegression5 min

    Statistical Testing in Regression

    Performing hypothesis tests on regression coefficients using t-tests, p-values, and the connection to confidence intervals.

  2. NoteRegression5 min

    Confidence Intervals for Regression Coefficients

    Constructing confidence intervals for beta_0, beta_1, and beta_i using the t-distribution and standard errors.

  3. NoteRegression5 min

    Standard Error in Regression

    Deriving the standard errors of the regression coefficients using MSE, Sxx, and the variance-covariance matrix.

Jan2026

  1. NoteRegression7 min

    R-squared: SST, SSE, SSR and the Relationship with Correlation

    Defining the coefficient of determination from the sum of squares decomposition and proving that R-squared equals the square of the correlation coefficient.

  2. NoteRegression4 min

    Correlation

    Defining the Pearson correlation coefficient using Sxx, Syy, Sxy, Sx, and Sy notation, and exploring its properties.

  3. NoteRegression5 min

    Polynomial Regression

    Understanding polynomial regression as a special case of multiple linear regression, with design matrix construction and overfitting considerations.

  4. NoteRegression5 min

    Multiple Linear Regression

    Extending simple linear regression to multiple predictors using matrix notation and deriving the OLS estimator in matrix form.

  5. NoteRegression5 min

    Simple Linear Regression

    An introduction to simple linear regression, the OLS method, and deriving the estimators using Sxx and Sxy notation.

Dec2025

  1. NoteSustainability6 minupdated Dec 2

    Solar Photovoltaic Systems for Wastewater Treatment Plants in Malaysia

    A review of energy demand, solar integration, forecasting, and control considerations for Malaysian wastewater treatment plants.

Nov2025

  1. NoteMachine Learning6 min

    Gradient Descent Algorithm Explained

    The gradient descent update rule, worked examples, and the effect of the learning rate.

  2. PostExperiences1 min

    Talentbank Boardroom Challenge 2025

    A small photo record from the Talentbank Boardroom Challenge 2025.

Oct2025

  1. NoteReinforcement Learning3 min

    Three Questions for Reinforcement Learning in Healthcare

    A practical reading of three safety questions for reinforcement learning in clinical settings: confounding, effective sample size, and prospective behaviour.

  2. NoteReinforcement Learning3 min

    Action-value methods with incremental step size in reinforcement learning

    Deriving the incremental update rule for action-value estimation in k-armed bandits, and why constant step sizes suit nonstationary problems.

Aug2025

  1. PostExperiences1 min

    A Small Talk About Hackathons

    What repeated hackathons taught me about exhaustion, comparison, and taking a proper break.

Jul2025

  1. PostExperiences1 min

    Dead Internet Theory #1

    Why polished posts can feel disconnected from the people behind them.

Dec2024

  1. PostExperiences2 min

    Building a DeepSeek-R1 Chatbot

    A Gradio chatbot experiment with visible intermediate output and the 1.5B distilled DeepSeek-R1 model.

  2. PostExperiences2 min

    Eco Finance: A PayHack Prototype

    A carbon-footprint and financial-literacy prototype built during PayHack 2024 with OpenFinance APIs.

  3. PostExperiences2 min

    First Physical Hackathon Experience

    What I learned from my first physical hackathon at PayHack 2024, where we used OpenFinance APIs to prototype a financial-literacy app.