科研 Skill

材料统计方法与实验设计

materials-stats

Covers statistics shared across materials characterization and simulation: design of experiments. Use for cross-cutting statistical treatment of materials data.

发布者 Codar安全审核通过v0.1.0更新于 2026-11-18

SKILL.md

Materials Statistics

Overview

Three things come up across nearly every technique in this repo: designing an experimental campaign efficiently (DOE), propagating measurement uncertainty through a derived quantity, and treating replicate/repeated measurements correctly. This skill covers those. Weibull statistics for brittle-fracture strength data live in mechanical-testing specifically because the domain context (what counts as a valid specimen population, ASTM conventions) is inseparable from the technique there; Bayesian-optimization-for-experiment-selection lives in high-throughput-autonomous-labs since that's about choosing the next experiment, not analyzing completed ones.

When to use this skill

Activate when the request involves:

  • Design of experiments, DOE, factorial design, uncertainty quantification, error propagation, measurement uncertainty, replicate measurements
  • Terms: full factorial, fractional factorial, Latin hypercube, propagation of error, confidence interval
  • "Design an experiment to test multiple factors," "propagate uncertainty through this calculation," "how many replicates do I need"

Core usage

Design of experiments — factorial design

from pyDOE2 import fullfact, fracfact

full_design = fullfact([3, 3, 2])   # 3 levels x 3 levels x 2 levels — e.g. temperature x time x atmosphere
# Full factorial grows combinatorially — fractional factorial trades some
# interaction-effect resolution for far fewer runs, standard for screening
# many factors before a smaller focused full-factorial or response-surface study:
frac_design = fracfact("a b c abc")

Uncertainty propagation (a general, technique-agnostic tool)

import numpy as np

def propagate_uncertainty(func, values, uncertainties, n_samples=100000, seed=42):
    """Monte Carlo error propagation — more robust than analytical propagation
    formulas for nonlinear functions or correlated/non-Gaussian inputs, at the
    cost of being approximate/sampling-based rather than exact."""
    rng = np.random.default_rng(seed)
    sampled_inputs = [rng.normal(v, u, n_samples) for v, u in zip(values, uncertainties)]
    sampled_outputs = func(*sampled_inputs)
    return {"mean": sampled_outputs.mean(), "std": sampled_outputs.std()}

# Example: propagating uncertainty in density = mass / volume
density_result = propagate_uncertainty(
    lambda m, v: m / v, values=[10.5, 2.1], uncertainties=[0.02, 0.01]
)

Replicate measurement treatment

from scipy import stats

def replicate_summary(measurements, confidence=0.95):
    """Standard error and confidence interval from replicate measurements —
    required whenever reporting a mean value from more than one measurement,
    across any technique in this repo."""
    n = len(measurements)
    mean = np.mean(measurements)
    sem = stats.sem(measurements)
    ci = stats.t.interval(confidence, n - 1, loc=mean, scale=sem)
    return {"mean": mean, "sem": sem, f"{int(confidence*100)}%_CI": ci, "n": n}

Validation & Pitfalls

Canonical references: Montgomery, Design and Analysis of Experiments (10th ed., 2019), for DOE; Taylor, An Introduction to Error Analysis (2nd ed., 1997), for uncertainty propagation.

  • Fractional factorial designs sacrifice the ability to resolve certain interaction effects — check the design's resolution (which interactions are confounded with which) before choosing one, not just the run-count savings. A resolution III design confounds main effects with two-factor interactions, which can be seriously misleading if those interactions are actually important for the system being studied.
  • Monte Carlo uncertainty propagation assumes the input uncertainty distributions (often assumed Gaussian, as in the code above) are actually representative — a systematic (not random) error source, or a genuinely non-Gaussian measurement error distribution, isn't captured correctly by a naive Gaussian Monte Carlo approach; identify systematic error sources separately rather than folding them into a random-uncertainty propagation.
  • A single measurement has no meaningful "uncertainty" without either an instrument-specified precision or actual replicate measurements — don't report a confidence interval computed from a single data point treated as if it were a distribution. Replicate measurements (not just repeated reads of the same acquisition) are needed to capture real measurement-to-measurement variability.
  • Reporting "n" (number of replicates/samples) is not optional — a mean value without a stated sample size and uncertainty is incomplete for any quantitative materials claim, matching the broader principle (shared with this repo's sibling neuroscience skills project) that no reported number should stand without its uncertainty.
  • DOE assumes factors are actually independently controllable at the specified levels — in practice, some factor combinations may be physically unachievable or produce a different regime entirely (e.g. a temperature/atmosphere combination that changes reaction mechanism) — check that the full designed factor space is physically sensible before running it, not just statistically efficient.

示例提示词

我想设计一组实验方案并对这批材料数据做不确定度传播分析。

所属插件

材料表征、性能与材料信息学面向实验与数据驱动的材料研究:XRD/电镜/谱学/热分析/力学测试等表征,合成与加工,电化学与半导体表征,相场、CALPHAD 与连续介质力学,材料数据库、特征工程、贝叶斯优化与主动学习,选材与生命周期评价。

安装该插件会一并获得同领域的 42 个 Skill / MCP。

同插件的其他科研 Skill

常见问题

材料统计方法与实验设计能做什么?

Covers statistics shared across materials characterization and simulation: design of experiments. Use for cross-cutting statistical treatment of materials data。

如何安装材料统计方法与实验设计?

在科搭 Codar 左侧点击「插件」,在「组件」页签搜索「材料统计方法与实验设计」并安装;在 Claude Code 或 Codex 中可以发送本页的安装提示词,或下载 Skill 包后解压到 ~/.claude/skills 或 ~/.codex/skills。

材料统计方法与实验设计需要哪些权限?

该科研 Skill没有声明额外权限;执行具体操作时仍由 Agent 按自身规则请求确认。

材料统计方法与实验设计经过官方审核吗?

是。SpeedSkills 收录的每个版本都会记录内容摘要与权限声明,当前版本已通过安全审核。