engineering-statistics
Skill7 starsChanged 6 months agoApache-2.0View on GitHub
Descriptive statistics, t-table confidence intervals for the mean, and simple linear regression on engineering data. Use when summarising lab or process data, computing a mean CI for sample data, or fitting a one-predictor linear regression. Don't use for autocorrelated process time-series (use time-series-process-data-analysis), censored lab data (use censored-regression), compositional data (use compositional-data-analysis), or hierarchical / multi-level models (use bayesian-hierarchical-process-models).
In this repository31 other files it gives its agents.
- absorption-stripping-designSkill
- bayesian-hierarchical-process-modelsSkill
- caustic-merox-extractionSkill
- censored-regressionSkill
- compositional-data-analysisSkill
- control-valve-sizing-isa75Skill
- convective-heat-transfer-correlationsSkill
- design-of-experimentsSkill
- dimensionless-numbersSkill
- distillation-shortcut-designSkill
- distributed-lag-modelsSkill
- engg-skills-commonSkill
- engineering-skill-creatorSkill
- equation-of-state-selectionSkill
- heat-exchanger-sizingSkill
- literature-search-engineeringSkill
- material-energy-balancesSkill
- pipe-flow-pressure-dropSkill
- process-causal-inference-dagsSkill
- process-units-conversionSkill
- reactor-sizing-and-kineticsSkill
- relief-valve-sizing-api520Skill
- separator-vessel-sizingSkill
- sour-gas-amine-treatingSkill
- statistical-process-controlSkill
- steam-tables-iapwsSkill
- thermo-process-propertiesSkill
- time-series-process-data-analysisSkill
- two-phase-flowSkill
- uvSkill
- vle-flash-calculationsSkill
The file
We split this skill into the rules it gives an agent
5 rules. About 0 are common, 3 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈3
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 65
Run the desired summary.
- Very specific: line 66
If the CI is for a process value and you suspect autocorrelation, use time-series-process-data-analysis instead.
- Distinctive: line 89
If the t-table degrees of freedom are missing for an unusual df, the script falls back to a normal-approximation CI with a warning.
- Very specific: line 94
Run the listed script with representative inputs and an --output file when a deterministic calculation is available.
- Distinctive: line 96
Check result magnitudes against the stated assumptions, references, and a hand calculation or known operating range before reporting them.
≈ “Common” is an estimate: at least 1 in 5 of the 372,429 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Engineering Statistics
Overview
Pure-Python statistics for engineering data summaries:
- Mean, median, standard deviation, min/max.
- Mean confidence interval (t-table if degrees of freedom in the built-in table, normal approximation otherwise).
- Simple linear regression (one predictor): slope, intercept, R², and SSE.
The implementation deliberately stays in the Python standard library so the skill is fast and dependency-light.
Prerequisites
uvavailable.
When to Use
- Summarising a small batch of lab measurements.
- Computing a CI for the mean of a sample.
- Fitting a single-predictor linear regression for a sanity check.
Don't use for
- Autocorrelated process time-series (
time-series-process-data-analysis). - Censored lab data with below-LOQ values (
censored-regression). - Compositional data (
compositional-data-analysis). - Hierarchical / multi-level models (
bayesian-hierarchical-process-models). - Multi-predictor regression (use
statsmodelsorscikit-learn).
Utility Scripts
uv run scripts/engg_stats.py describe --values "12.3,12.5,12.1,12.4" --output /tmp/desc.jsonuv run scripts/engg_stats.py mean-ci --values "12.3,12.5,12.1,12.4" --confidence 0.95 --output /tmp/ci.jsonuv run scripts/engg_stats.py linear-regression --x "1,2,3,4,5" --y "2.1,3.9,6.1,8.0,10.1" --output /tmp/reg.json
Procedure
- Confirm the data is i.i.d.-like (no obvious autocorrelation, no censoring, not a composition).
- Run the desired summary.
- If the CI is for a process value and you suspect autocorrelation, use
time-series-process-data-analysisinstead.
Pitfalls
- Treating SPC data as i.i.d.; lag-1 autocorrelation > 0.3 invalidates the t-CI for the mean.
- Using R² as a goodness-of-fit metric without checking residuals.
- Ignoring outliers; one or two leverage points can drive the regression.
- Computing a CI on fewer than 5 data points and reporting it as precise.
- Using mean ± 2 SD as a "95% interval" when the data is not normal.
- Reporting the slope of a linear fit with insignificant slope (CI crosses zero) as if it had physical meaning.
- Standardising the predictor before fitting and forgetting to back- transform the slope to original units.
- Using sample standard deviation
swhere population standard deviationsigmais needed (e.g. capability indices).
Fallback Strategies
- For larger or more complex problems, switch to
statsmodelsorscikit-learn(not in this skill). - If the t-table degrees of freedom are missing for an unusual df, the script falls back to a normal-approximation CI with a warning.
Verification
- Run the listed script with representative inputs and an
--outputfile when a deterministic calculation is available. - Confirm the JSON result contains
ok: true, expected units, and no unhandled warnings. - Check result magnitudes against the stated assumptions, references, and a hand calculation or known operating range before reporting them.
References
references/reporting.md— guidance for reporting CIs and regressions.
Anti-Patterns
- Reporting "p = 0.04 so the effect is real" without checking residuals.
- Computing a CI without naming the assumed sampling distribution.
- Using linear regression on a clearly non-linear trend.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

