probability-theory

probability-theory is a skill for Claude Code, Codex from hamzabellouch/agent-skills. It costs 62 tokens per session (728 once invoked), scanned A, original, MIT.

A foundation for probability, the mathematics of uncertain events and quantities. It covers conditional probability, independence, random variables, expected values, and variance.

In plain words
What is it for?
Use it to calculate event probabilities, update beliefs with Bayes' theorem, and find averages and variation. Typical applications include counting problems and random walks.
Why use it?
It helps reason consistently about uncertainty instead of relying on intuition that can confuse related events. It provides the basis for Bayesian updates, random-process models, and statistical analysis.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to calculate event probabilities, update beliefs with Bayes' theorem, and find averages and variation. Typical applications include counting problems and random walks.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/hamzabellouch/agent-skills/probability-theory
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add hamzabellouch/agent-skills --skill probability-theory
Clone the repo
git clone --depth 1 https://github.com/hamzabellouch/agent-skills

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for probability-theory

README.md
[![agentmods](https://agentmods.dev/badge/skills/hamzabellouch/agent-skills/probability-theory/github.svg)](https://agentmods.dev/skills/hamzabellouch/agent-skills/probability-theory)
Your own site
<a href="https://agentmods.dev/skills/hamzabellouch/agent-skills/probability-theory"><img src="https://agentmods.dev/badge/skills/hamzabellouch/agent-skills/probability-theory/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for probability-theory

Your own site · 80×15
<a href="https://agentmods.dev/skills/hamzabellouch/agent-skills/probability-theory"><img src="https://agentmods.dev/badge/skills/hamzabellouch/agent-skills/probability-theory.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 62 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 728 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00062 $0.00728
Opus 5.5 $0.00025 $0.00291
Sonnet 5.5 $0.00012 $0.00146
Haiku 4.5 $0.00006 $0.00073

Measured today against content hash 69764f73f75c, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

probability-theory scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured today.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

Math/Math_Master_Library/probability-theory/SKILL.md · 33 lines

How it starts

The opening of the file, as written. The whole thing — 33 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Probability Theory

Foundations

  • Axioms (Kolmogorov): P(Omega) = 1, P >= 0, countable additivity. Inclusion-exclusion; complement.
  • Conditional probability P(A|B) = P(A and B)/P(B); independence; Bayes P(A|B) = P(B|A)P(A)/P(B); total probability. Beware base-rate neglect, Monty Hall (switching gives 2/3), Simpson's paradox, birthday paradox (23 people ~ 50.7%).
  • Counting: permutations n!, combinations C(n,k), multinomial, stars and bars C(n+k-1, k-1), derangements n! sum (-1)^k/k!.

Random variables

  • Discrete: Bernoulli, Binomial(n,p) mean np var np(1-p), Geometric (mean 1/p), Poisson(lambda) mean = var = lambda, Hypergeometric, Negative binomial.
  • Continuous: Uniform, Exponential(lambda) memoryless mean 1/lambda, Normal N(mu, sigma^2), Gamma, Beta, Chi-square, Student t, Cauchy (no mean), Pareto, Lognormal.
  • Expectation is linear (even without independence) E[sum X_i] = sum E[X_i]; Var(X) = E[X^2] - (E X)^2; Var(sum) = sum Var + 2 sum Cov; indicator variable trick.
  • Joint, marginal, conditional distributions; covariance and correlation; law of total expectation and variance; transformations (Jacobian).
  • Moment generating function M(t) = E e^{tX}; characteristic function; probability generating function.

Limit theorems & inequalities

  • Markov P(X >= a) <= E X / a; Chebyshev P(|X - mu| >= k sigma) <= 1/k^2; Chernoff/Hoeffding bounds; Jensen E f(X) >= f(E X) for convex f.
  • LLN: sample mean -> mu (weak: in probability; strong: a.s.). CLT: sqrt(n)(mean - mu)/sigma -> N(0,1). Berry-Esseen rate.
  • Convergence modes: a.s., in probability, in L^p, in distribution.
  • Borel-Cantelli lemmas; Kolmogorov 0-1 law.

Stochastic processes

  • Markov chains: transition matrix P, stationary distribution pi P = pi, irreducible/aperiodic -> convergence; absorbing chains; hitting times; gambler's ruin; random walks (recurrent in 1D/2D, transient in 3D, Polya).
  • Poisson process (exponential inter-arrivals), birth-death, queues (M/M/1: rho = lambda/mu, L = rho/(1 - rho)), renewal theory.
  • Martingales, optional stopping, Doob inequalities; Brownian motion and Ito calculus (Black-Scholes); branching processes.

Read the full file on GitHub · 33 lines

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. today Changed · -23 lines · +31 tokens per session 69764f73f75c
  2. 7d ago First seen · 56 lines · 31 tokens per session scan A 04e327630f08

Subscribe to this mod's changes

probability-theory is a skill published in the GitHub repository hamzabellouch/agent-skills (8 stars, last pushed today), licensed MIT. It adds 62 tokens to every session and 728 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-10-10.

Related

Other skills, from other repositories

agricultural-sciences-professor

Use when a task needs the judgment of a tenure-track or tenured Agricultural Sciences faculty member at a land-grant university — deciding whether to submit a grant this cycle versus wait, allocating time across the teaching/research/extension appointment split, diagnosing a stalled graduate student or field trial, or…

wonsukchoi/domain-experts · 75 tokens

biology-professor

Use when a task needs the judgment of a Biology Professor at a research university — writing or defending an NIH/NSF grant budget, deciding authorship order on a paper, navigating an IACUC or biosafety protocol, mentoring a PhD student through a stalled project, or converting a course when active-learning data doesn't…

wonsukchoi/domain-experts · 73 tokens

chemistry-teacher-postsecondary

Use when a task needs the judgment of a Postsecondary Chemistry Teacher — grading a lab report where the numeric result misses the "expected" value but the methodology is sound, distinguishing a conceptual misunderstanding from an arithmetic slip on a problem set, deciding how much procedural freedom to give students…

wonsukchoi/domain-experts · 85 tokens

thesis-control

Use when AI-assisted thesis or manuscript edits risk claim drift, scope creep, loss of intended use, experiment-role promotion, or repeated revisions that fail to converge; provides author-intent control, lightweight or strict contracts, drift audits, revision escalation, and human gates.

yha9806/academic-writing-toolkit · 57 tokens

manuscript-reframe

Reframe report-like academic drafts into paper-form scientific arguments while preserving or explicitly renegotiating author intent; requires an approved old-versus-proposed spine, evidence and argument baselines, analysis-role control, and post-edit drift review.

yha9806/academic-writing-toolkit · 53 tokens

paper-explain-figures

A workflow for explaining figures from research papers, including what charts, diagrams, or images show and how to read them.

huangwb8/ChineseResearchLaTeX · 160 tokens