Skip to content
SagarKalauniPublic

About

Interactive D3.js & MathJax simulation of Quantile-Quantile (Q-Q) Plots for assessing Gaussian normality, skewness, kurtosis, and heavy-tailed distributions at Lindenwood University.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

2 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 

Repository files navigation

🦁 Quantile-Quantile (Q-Q) Plot — Normality Diagnostics Masterclass

Lindenwood University — Interactive Data Science & Machine Learning Masterclass

Live Interactive Lab Course Author


📖 Overview

An interactive diagnostic visualization for Normal Quantile-Quantile (Q-Q) Plots. Designed for Lindenwood University statistics and regression students to visually link distribution shapes (right/left skewness, leptokurtic heavy tails, platykurtic light tails, and bimodality) to their signature geometric patterns on a Q-Q plot.

🔗 Launch the Live Interactive Application: https://sagarkalauni.github.io/qq-plot/


📐 Mathematical Formulation

Given ordered sample observations $x_{(1)} \le x_{(2)} \le \dots \le x_{(n)}$, the normal Q-Q plot pairs the $i$-th order statistic $x_{(i)}$ against the corresponding theoretical standard normal quantile $z_{(i)}$:

$$p_i = \frac{i - 0.5}{n}, \qquad z_{(i)} = \Phi^{-1}(p_i)$$

where $\Phi^{-1}(\cdot)$ is the probit function (inverse cumulative distribution function of $\mathcal{N}(0, 1)$). If the sample originates from $\mathcal{N}(\mu, \sigma^2)$, the points $(z_{(i)}, x_{(i)})$ lie approximately on the reference line:

$$x_{(i)} \approx \mu + \sigma z_{(i)}$$


✨ Key Interactive Features

  • Synchronized Density & Q-Q Canvas: View the empirical histogram/KDE side-by-side with the live Q-Q plot.
  • Distribution Presets: Instantly switch between Normal, Right-Skewed (Log-Normal/Exponential), Left-Skewed, Heavy-Tailed (Student's $t$ / Cauchy), and Uniform distributions.
  • Interactive Outlier Injection: Drag or add points to see how tail departures bend the ends of the Q-Q curve.
  • Regression Residual Diagnostics: Understand how to verify the $\varepsilon_i \sim \mathcal{N}(0, \sigma^2)$ assumption in OLS regression.

🎓 Pedagogical & Course Context

  • Institution: Lindenwood University (College of Science, Technology, and Health)
  • Course Curriculum: MTH 34500 — Regression Analysis & MTH 34200 — Probability & Mathematical Statistics II
  • Instructor & Author: Sagar Kalauni, M.S. (Full-Time Faculty in Data Science)
  • Tech Stack: HTML5, Tailwind CSS, D3.js (Dynamic Data Visualization), MathJax (LaTeX Mathematical Rendering), Vanilla ES6+ JavaScript (Zero-Dependency Client-Side Execution).

🚀 Running Locally

Because this visualizer is engineered as a self-contained, zero-build client-side application, you can run it immediately in any modern browser:

# Clone the repository
git clone https://github.com/SagarKalauni/qq-plot.git

# Navigate into the project directory
cd qq-plot

# Open index.html directly in your browser or serve locally:
python -m http.server 8000

🔗 Explore the Complete Interactive Masterclass Suite

Module Topic Live Link
Linear Regression Ordinary Least Squares & Residual Minimization Launch
Logistic Regression Sigmoid Probabilities & Binary Cross-Entropy Launch
Regularization ($L_1 / L_2$) Lasso vs. Ridge Constraint Geometry Launch
K-Nearest Neighbors Instance-Based Learning & Distance Metrics Launch
Support Vector Machine Maximum-Margin Hyperplanes & Soft Margin $C$ Launch
RBF Kernel SVM Non-Linear Kernel Trick & $(\gamma, C)$ Tuning Launch
Decision Tree (CART) Recursive Splitting, Gini & Entropy Launch
Random Forest Bagging & Ensemble Variance Reduction Launch
Voting Classifier Hard Majority vs. Soft Probability Voting Launch
K-Means Clustering Lloyd's Algorithm, Voronoi & Elbow WCSS Launch
Confusion Matrix Precision, Recall, Specificity & $F_1$-Score Launch
Confidence vs. Prediction Intervals Mean Response vs. Individual Uncertainty Launch
Bootstrapping Non-Parametric Resampling with Replacement Launch
Q-Q Plot Gaussian Normality & Tail Diagnostics Launch
Train-Test Split & CV Holdout Partitioning & $K$-Fold Cross-Validation Launch
One-Hot Encoding Categorical Expansion & Dummy Variable Trap Launch

Developed with ❤️ for Data Science students by Sagar Kalauni · Portfolio

About

Interactive D3.js & MathJax simulation of Quantile-Quantile (Q-Q) Plots for assessing Gaussian normality, skewness, kurtosis, and heavy-tailed distributions at Lindenwood University.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages