Statistical Inference Engine

CLI-native statistical inference engine for indexed CSV datasets. Supports correlation, regression, ANOVA, nonparametric tests, confidence intervals, bootstrap methods, and structured Markdown/PDF export.

Architecture Overview

The inference engine is modular and deterministic.

Core layers

  • Loader → dataset retrieval
  • Preprocessing → NA handling
  • Assumptions → statistical validation
  • Dispatcher → pure routing logic
  • Test modules → statistical computation
  • Formatter → console output
  • Exporter → Markdown / PDF generation

Execution Flow

flowchart TD
    A[Load Indexed Dataset] --> B{Multiple Files?}
    B -- Yes --> C[Merge on Key]
    B -- No --> D[Continue]
    C --> D
    D --> E[Apply NA Strategy]
    E --> F[Dispatch Test]
    F --> G[Check Assumptions]
    G -- Pass --> H[Run Parametric Test]
    G -- "Fail (AutoRoute)" --> I[Run Nonparametric Alternative]
    G -- Fail --> H
    H --> J[Compute Statistics]
    I --> J
    J --> K[Create InferenceResult]
    K --> L[Format Output]
    L --> M{Export?}
    M -- Yes --> N[Generate MD/PDF]
    M -- No --> O[CLI Display]

Example Usage

Run Pearson correlation:

indexly infer-csv dataset.csv --test correlation --x height --y weight --use-raw

Example output:

============================================================
TEST: pearson_correlation
------------------------------------------------------------
Statistic : 0.842193
P-value   : 0.000012
95% CI    : [0.712301, 0.913882]
------------------------------------------------------------
Interpretation:
  Strong positive linear association.
============================================================

Design Guarantees

  • Always returns a unified InferenceResult
  • Fisher Z-transform for Pearson CIs
  • T-distribution for mean CIs
  • Explicit alpha tracking
  • No side effects in dispatcher
  • Reproducible metadata included

Next

Continue to How It Works to understand:

  • Which test to choose
  • Required arguments
  • Example CLI commands
  • Advanced options

From Descriptive Patterns to Strategic Insight: MET Analysis with Indexly

A practical tutorial using Indexly to analyze Fitbit MET data and generate actionable marketing insight for Bellabeat’s Spring product while critically assessing statistical and tooling limitations.

How It Works

Understand when and how to use each statistical test in Indexly.

Mathematical Foundations

Mathematical formulations behind Indexly’s statistical inference engine.

References - Statistical Tests

Developer API Reference

Programmatic usage of the Indexly inference engine.

Bellabeat Movement Analysis Tutorial: Steps × METs Integrated Statistical Review

A comprehensive statistical tutorial analyzing daily steps (movement volume) and MET values (movement intensity) using descriptive statistics, Kruskal-Wallis testing, Pearson and Spearman correlation, and behavioral insight modeling.

Sleep Analysis — Recovery Patterns and Intensity Interaction

Descriptive and inferential analysis of sleep duration, efficiency, and its relationship with MET intensity using Indexly.