A browser-native inferential statistics environment with exact distributional computations, multivariate visualization, and AI-augmented interpretation. Zero server-side dependencies. Zero data exfiltration. Every computation executes deterministically in the client runtime.
Most browser-based "statistics tools" approximate significance via hard-coded threshold tables or offload computation to remote APIs that introduce latency, privacy exposure, and vendor lock-in. R-Tool eliminates all three by implementing the full inferential pipeline — from raw data ingestion through regularized special functions to final p-value resolution — entirely within a single-page client application. The result is a workbench that behaves like a local R or SPSS session but deploys as a static web asset.
Flexible multi-modal input supporting heterogeneous datasets:
- Delimited Import — Paste or drag-and-drop CSV with automatic column type inference (numeric vs. categorical) via heuristic classification at an 80% numeric threshold
- Schema-First Manual Entry — Define column names and types a priori, then populate observations row-by-row with type-enforced validation
- Programmatic Column Detection — Quoted fields, mixed delimiters, and sparse entries are handled by a streaming character-level parser with quote-state tracking
name,age,group,score,hours,satisfaction,region
Alice,28,A,82,12,4.2,North
Bob,35,B,67,8,3.1,South
Carol,22,A,91,15,4.7,North
...
Upon ingestion, the engine partitions columns into numeric and categorical sets, auto-selects default axis mappings, and initializes the correlation inclusion vector.
Each numeric variable produces a full summary vector:
| Statistic | Method |
|---|---|
| Arithmetic Mean | |
| Sample Standard Deviation | Bessel-corrected ( |
| Median | Midpoint of sorted array; averaged middle pair for even |
| Min / Max | Extrema of observed range |
| Q1 / Q3 | Linear interpolation at positions |
| Skewness | Adjusted Fisher-Pearson: |
| Excess Kurtosis |
Example output for a variable score with
Mean: 82.67 | SD: 14.23 | Med: 85.00
Min: 54.00 | Max: 95.00
Q1: 61.50 | Q3: 90.50
Skew: -0.41 | Kurt: -1.18
A negative skew indicates left-tail elongation; a negative excess kurtosis (platykurtic) suggests lighter tails than the Gaussian reference.
Four parametric tests, each producing exact p-values from continuous distribution functions — not discretized lookup tables:
Compares means of two groups without assuming equal variances. Degrees of freedom via the Welch-Satterthwaite approximation:
Reports:
Computes
Reports:
Simple bivariate OLS with slope significance:
Slope
Partitions total variance into between-group and within-group components:
Reports:
The core of the inferential pipeline is a numerically stable implementation of the regularized incomplete beta function
-
Log-Gamma — Lanczos approximation (
$g = 7$ , 9-term series) with reflection formula for$z < 0.5$ -
Continued Fraction — Modified Lentz's method with
$\epsilon = 3 \times 10^{-14}$ convergence tolerance and 200-iteration ceiling -
Symmetry Exploitation — Automatic argument swap when
$x > (a+1)/(a+b+2)$ to ensure rapid convergence
From
All p-values are displayed to four decimal places, with values below < .0001.
Five chart types rendered via Chart.js (scatter, histogram, bar, line) and custom SVG (box plot):
| Chart | Use Case | Encoding |
|---|---|---|
| Scatter | Bivariate numeric relationships | Optional categorical grouping with color-coded series |
| Histogram | Univariate distributional shape | Configurable bin count (2–30) |
| Bar | Group means comparison | Categorical X, numeric Y (mean aggregation) |
| Line | Sequential / time-series trends | Cubic Bezier interpolation ( |
| Box Plot | Distributional comparison across groups | Custom SVG: whiskers (min/max), IQR box (Q1–Q3), median rule, per-group |
Box plot example — score by group with groups A and B:
Group A (n=8): Min=82, Q1=85.5, Med=88.5, Q3=91.5, Max=95
Group B (n=7): Min=54, Q1=56.5, Med=60.0, Q3=65.0, Max=72
Each box renders proportionally within a shared Y-axis domain with 5% padding, axis tick marks, and group labels.
Interactive Pearson
-
Diagonal —
$r = 1.00$ (blue tint) -
Strong positive (
$r > 0.50$ ) — green -
Moderate positive (
$r > 0.20$ ) — light green -
Negative (
$r < -0.20$ ) — orange -
Weak (
$|r| \leq 0.20$ ) — neutral grey
Column inclusion is toggled via checkboxes; a "Select All" control is provided.
An on-demand AI-generated statistical narrative synthesized from the current dataset state. Activated explicitly via a Generate Analysis button (no auto-computation) to preserve user agency and prevent stale interpretations.
The summary includes:
- Dataset dimensionality (
$N$ , variable counts by type) - Top-3 variable descriptives
- Strongest pairwise correlation from the active matrix
- Most recent test result
- Statistical power advisory (
$N < 30$ caveat)
A thumbs-up / thumbs-down feedback mechanism persists ratings to localStorage keyed by a deterministic hash of the dataset, enabling per-dataset feedback continuity across sessions.
| Layer | Technology |
|---|---|
| Framework | Next.js 14 (App Router, static export) |
| Visualization | Chart.js + react-chartjs-2 + custom SVG |
| Statistical Engine | Pure TypeScript — no external stats libraries |
| Readings | react-markdown |
| Persistence | Browser localStorage (feedback ratings only) |
This application is a standalone module extracted from the Mental Wealth Academy platform. It operates independently with no shared backend, database, or authentication requirements.