Applies statistical methods for summarizing numeric data, quantifying variability, analyzing trends, detecting outliers, and interpreting distributions. Useful for data analysis and experimentation.
Ships in data-analysis. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
| Data Characteristic | Recommended Measure | Rationale |
|---|---|---|
| Numeric, meaningful additive scale | Mean | Reflects the total per observation; sensitive to extremes |
| Skewed numeric data | Median and relevant quantiles | Describes the middle and tails without letting extremes dominate |
| Nominal categories | Counts, proportions, mode | Category labels have no numeric order or mean |
| Ordinal responses | Distribution, median, ordered quantiles | Preserves ranking without assuming equal spacing |
| Revenue per user or other skewed economic data | Mean for economics; median/quantiles for typical experience | Different summaries answer different questions |
Choose summaries for the question and measurement scale. Do not average IDs or category codes, or require both mean and median for every KPI. A mean-median gap can suggest asymmetry but does not diagnose the distribution on its own.
Choose percentiles relevant to the decision; extreme quantiles in small samples are unstable and depend on interpolation. The following are positions, not guaranteed boundaries of "typical" values:
p1: First percentile (not the minimum)
p5: Fifth percentile
p25: First quartile
p50: Median
p75: Third quartile
p90: Top 10% threshold (heavy users, premium tier)
p95: Ninety-fifth percentile
p99: Extreme top 1%
Sample insight: "Half of all sessions last under 4.2 minutes, yet the top decile exceeds 22 minutes, which pushes the average to 7.8 minutes."
For numeric measures relevant to the question, examine:
# Weekly smoother — useful for daily data with weekday/weekend cycles
df['smooth_7'] = df['metric'].rolling(window=7, min_periods=1).mean()
# Four-week smoother — reduces short-term noise; does not remove all seasonality
df['smooth_28'] = df['metric'].rolling(window=28, min_periods=1).mean()
Simple rate: (current - prior) / prior
CAGR: (final / initial) ^ (1 / n_years) - 1
Log rate: ln(current / prior)
Simple growth is undefined at a zero base and often misleading for negative bases; show absolute change and explain the sign convention. Use CAGR and log growth for strictly positive values, with a valid elapsed interval. Do not silently replace zero or negative inputs. Log growth is additive over time, not a general fix for volatility.
For analysts who need quick projections rather than full modeling:
Report a conditional point forecast when supported and explain the method, horizon, and assumptions. Add a prediction interval only when a model, validation errors, or another stated method supports its coverage. A sensitivity scenario varies explicit assumptions; it is not a confidence or prediction interval. If uncertainty cannot be quantified from the available data, say so instead of inventing bounds. Backtest against a simple baseline when sufficient history is available.
Hand off to a specialist when the pattern is non-linear, multiple seasonal cycles overlap, external drivers (ad spend, holidays) matter, or when forecast precision drives resource decisions.
Z-score approach (assumes approximate normality):
z = (df['val'] - df['val'].mean()) / df['val'].std()
outliers = df[abs(z) > 3] # beyond 3 standard deviations
IQR fence approach (a descriptive flag, not a distribution-free error detector):
q1 = df['val'].quantile(0.25)
q3 = df['val'].quantile(0.75)
iqr = q3 - q1
lo = q1 - 1.5 * iqr
hi = q3 + 1.5 * iqr
outliers = df[(df['val'] < lo) | (df['val'] > hi)]
Percentile cutoff approach (selects tails even in valid data; not proof of anomalies):
outliers = df[(df['val'] < df['val'].quantile(0.01)) |
(df['val'] > df['val'].quantile(0.99))]
Never strip outliers automatically. Follow this decision process:
Document every exclusion: "We set aside 47 records (0.3% of the dataset) with order values above $50K; these bulk enterprise transactions are covered in a separate section."
Use formal testing when a sampling or experimental design and its assumptions support inference:
| Question | Appropriate Test | Conditions |
|---|---|---|
| Two independent group means differ? | Welch t-test | Independent observations; adequate behavior of the mean's sampling distribution; small, heavy-tailed samples need care |
| Two independent conversion proportions differ? | Proportions z-test or suitable exact method | Defined binary trials; check expected successes and failures for the approximation; repeated users need dependence-aware methods |
| Same entities measured twice? | Paired t-test | Correct pairing, independent pairs, suitable distribution of within-pair differences; pairing does not remove time confounding |
| Three or more independent group means? | ANOVA or Welch ANOVA | Independence; classical ANOVA additionally assumes equal variances; assess residual behavior and planned comparisons |
| Two independent ordinal or continuous distributions differ? | Mann-Whitney U | A rank/distribution test; not a generic test of medians. Location/median interpretations require additional shape assumptions; handle ties and exact/asymptotic choice explicitly |
| Two categorical variables related? | Chi-squared or suitable exact test | Independent counts, mutually exclusive cells, sufficient expected counts for the chi-squared approximation |
For clustered, repeated, censored, or time-dependent data, use a design-aware method rather than treating every row as an independent observation. See the SciPy Mann-Whitney documentation for its specific null, alternatives, and implementation assumptions.
A p-value measures how incompatible the observed test statistic is with a specified null model, through its probability of an equally or more extreme statistic under that model. It is not the probability that H0 is true or that chance alone produced the result. Statistical significance does not measure effect size, practical importance, or causality. See the ASA statement on p-values. Accompany test results with:
Whenever a correlation surfaces, explicitly evaluate:
Safe phrasing: "Users who adopt feature X exhibit 30% higher retention" Unsafe phrasing: "Feature X causes 30% higher retention" (requires experimental evidence)
Running many tests inflates false positives:
An overall trend can invert when you break the data into subgroups:
Your dataset only contains entities that persisted long enough to be recorded:
Group-level patterns may not describe individuals:
Overly specific numbers suggest unjustified confidence:
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
4 skills in this plugin
/analysis-qaQuality-check data analysis for joins, metrics, denominators, date ranges, leakage, and statistical pitfalls./data-profilingProfile datasets for schema, distributions, nulls, cardinality, outliers, relationships, and data quality./sql-cookbookCraft and optimize SQL for any warehouse dialect — Snowflake, BigQuery, Databricks, Redshift, PostgreSQL. Covers window functions, CTEs, aggregations, joins, funnel queries, cohort retention, deduplication, dialect translation, slow query tuning, and cross-platform syntax differences./data-analysis:stats-methodsfrom data-analysis
npx claudepluginhub okou-ai/okou-skills --plugin data-analysisOther plugins' skills for the same job