一键导入
bayesian-stats
Convert frequentist statistical tests into their Bayesian equivalents. Provides mappings, code snippets, interpretation guides, and best practices.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Convert frequentist statistical tests into their Bayesian equivalents. Provides mappings, code snippets, interpretation guides, and best practices.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Use when someone is about to lose access to a machine (shared server, lab box, cloud/VM instance, expiring rental) and needs to preserve all their work before it's gone. Systematically finds everything that exists ONLY on that machine — unpushed commits, stashes, untracked/uncommitted files, dirty submodules, non-git dirs, loose files, and large gitignored artifacts — and backs it up to GitHub / HuggingFace / an off-machine archive, non-destructively. Triggers on "losing access to this machine", "back up everything before I lose the server", "migrating off this box", "decommission", "my instance expires".
Use when preparing a paper's camera-ready or arXiv release — de-anonymizing an accepted submission, packaging an arXiv tarball, checking dual-submission safety against a concurrent venue (e.g. a paper accepted at a workshop that's also under review at NeurIPS/ICML), or flagging reviewer-requested post-review additions. Encodes a byte-identity discipline (the public version changes ONLY author/venue metadata, never content), a numbers-from-scripts integrity gate, and the arXiv mechanics that actually bite.
Spin up one or more fresh-context subagents to critically evaluate a proposed theory, hypothesis, interpretation, or experimental design before committing to it. Use when the user says "have an agent critique this" / "get a second opinion on" / "is this design sound" / invokes /critique, or proactively before running any experiment or committing to a non-trivial theoretical claim.
Use when launching a multi-hour neural-network training, fine-tune, or other long GPU job autonomously from Claude Code and you need to catch failures (NaN, stuck-at-chance, dead process, throughput collapse, OOM) early instead of waking up to a wasted GPU window.
Use when the user asks to check, audit, or improve a website or web project for accessibility (a11y), WCAG compliance, screen reader support, keyboard navigation, color contrast, or alt text. Triggers a plan-mode investigation against the TeachAccess design and code checklists, then implements approved fixes.
Consolidate scattered research notes, logs, experiment outputs, and submodule docs into a single living research paper. Use when the user wants to pull together multiple source documents into one structured paper.
| name | bayesian-stats |
| description | Convert frequentist statistical tests into their Bayesian equivalents. Provides mappings, code snippets, interpretation guides, and best practices. |
| user_invocable | true |
When the user invokes /bayesian-stats, help them convert frequentist statistical tests into Bayesian equivalents.
If an argument is provided (e.g., /bayesian-stats t-test), look up that specific test. Otherwise, ask which frequentist test they want to convert.
| Frequentist Test | Bayesian Equivalent | Python Library |
|---|---|---|
| Paired t-test | Bayesian paired t-test with JZS prior → BF₁₀ | pingouin.bayesian_ttest(x, y, paired=True) |
| Independent t-test | Bayesian independent t-test with JZS prior → BF₁₀ | pingouin.bayesian_ttest(x, y, paired=False) |
| Wilcoxon signed-rank | Bayesian paired t-test (robust alternative) or Bayesian sign test via PyMC | pingouin for approximate BF, pymc for full model |
| Fisher's exact / Chi-squared | Beta-Binomial model with Beta(1,1) priors on each group's success rate | Analytical or pymc: pm.Beta("p", 1, 1) per group |
| Mixed-effects logistic regression | Bayesian mixed-effects model | bambi: `bmb.Model("y ~ condition + (1 |
| ANOVA / F-test | Bayesian ANOVA | pingouin.bayesian_anova(data, dv, between) or bambi |
| Pearson correlation | Bayesian correlation | pingouin.bayesian_corr(x, y) |
| Bootstrap CI | Posterior credible interval from MCMC | pymc model → arviz.summary() for HDI |
import pingouin as pg
bf = pg.bayesian_ttest(x, y, paired=True, r=0.707) # JZS prior, Cauchy scale r=√2/2
print(f"BF₁₀ = {bf:.3f}")
import pymc as pm
import arviz as az
with pm.Model():
p_a = pm.Beta("p_a", 1, 1) # Condition A success rate
p_b = pm.Beta("p_b", 1, 1) # Condition B success rate
pm.Binomial("obs_a", n=n_a, p=p_a, observed=k_a)
pm.Binomial("obs_b", n=n_b, p=p_b, observed=k_b)
delta = pm.Deterministic("delta", p_b - p_a)
trace = pm.sample(4000)
az.summary(trace, var_names=["delta"], hdi_prob=0.95)
az.plot_posterior(trace, var_names=["delta"], ref_val=0)
import bambi as bmb
import arviz as az
model = bmb.Model("correct ~ advice_source * question_category + (1|question_id)", data, family="bernoulli")
results = model.fit(draws=4000)
az.summary(results, var_names=["advice_source", "question_category", "advice_source:question_category"])
| BF₁₀ | Evidence |
|---|---|
| > 100 | Extreme evidence for H₁ |
| 30–100 | Very strong evidence for H₁ |
| 10–30 | Strong evidence for H₁ |
| 3–10 | Moderate evidence for H₁ |
| 1–3 | Anecdotal evidence for H₁ |
| 1/3–1 | Anecdotal evidence for H₀ |
| 1/10–1/3 | Moderate evidence for H₀ |
| 1/30–1/10 | Strong evidence for H₀ |
| < 1/30 | Very strong evidence for H₀ |
Key advantage: BF < 1/3 provides evidence for the null, not just "failure to reject." This is impossible with p-values.
uv add pingouin pymc bambi arviz