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.
npx agentmods add skills/arcadi4/nerdy/probabilistic-analysis-and-randomized-algorithmsnpx skills add Arcadi4/nerdy --skill probabilistic-analysis-and-randomized-algorithmsgit clone --depth 1 https://github.com/Arcadi4/nerdyWrote 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.
[](https://agentmods.dev/skills/arcadi4/nerdy/probabilistic-analysis-and-randomized-algorithms)<a href="https://agentmods.dev/skills/arcadi4/nerdy/probabilistic-analysis-and-randomized-algorithms"><img src="https://agentmods.dev/badge/skills/arcadi4/nerdy/probabilistic-analysis-and-randomized-algorithms.svg" alt="Measured on agentmods" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00053 | $0.02192 |
| Opus 5 | $0.00026 | $0.01096 |
| Sonnet 5 | $0.00011 | $0.00438 |
| Haiku 4.5 | $0.00005 | $0.00219 |
Grade A, and why
probabilistic-analysis-and-randomized-algorithms 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 5d ago.
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.
How it starts
The opening of the file, as written. The whole thing — 373 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Probabilistic Analysis and Randomized Algorithms
Overview
Use probability to analyze either a distribution on inputs or random choices made by an algorithm. The core move is to name the sample space first, then convert events into expectations with indicator random variables whenever direct counting becomes messy.
Shared CLRS Conventions
Follow the parent clrs skill for mathematical formatting, formula-free headings, direct polished answers, and CLRS-wide answer style.
When to Use
- A problem asks for average-case cost under random input order.
- A randomized algorithm permutes, samples, searches, or makes random choices internally.
- Expected counts involve records, collisions, empty bins, inversions, fixed points, or repeated trials.
- A prompt asks whether a shuffle, sample, or randomized strategy is uniform.
- A problem asks for the birthday paradox, balls-and-bins, coupon collector, streaks, or online hiring.
Do not use this skill merely because an answer contains asymptotic notation. Use characterizing-running-times when probability is not part of the model.
First Distinction
| Situation | Concept | Expectation is over | Required statement |
|---|---|---|---|
| Deterministic algorithm, random input model | Average-case analysis | Input distribution | State the assumed input distribution |
| Algorithm makes random choices | Expected running time or expected cost | Random-number generator outcomes | State the guarantee for each fixed input if applicable |
Do not conflate these. Randomizing the input inside the algorithm removes the need to assume a random input distribution, but it adds work for the randomization step.
Indicator Random Variable Workflow
Use this whenever the quantity is a count of events.
- Define one event per item, trial, pair, or position.
- Define the indicator:
$$ X_i = I{A_i}. $$
- Use Lemma 5.1:
$$ E[X_i] = \Pr{A_i}. $$
- Express the total count as a sum:
$$ X = \sum_i X_i. $$
- Apply linearity of expectation:
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.
- 5d ago First seen · 373 lines · 53 tokens per session scan A 56dc06bb4489
probabilistic-analysis-and-randomized-algorithms is a skill published in the GitHub repository Arcadi4/nerdy (7 stars, last pushed 4mo ago), licensed MIT. It adds 53 tokens to every session and 2,192 once invoked, about $0.0003 per session on Opus 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-08-31.
Other skills, from other repositories
thermite
Thermite, the generic ISA-portable Rust SIMD library, and its thermite- companions (special, dual/autodiff, compensated/double-double, sort, sdf, geometry, ffi). Load when writing/reviewing/debugging code using thermite/thermite- crates - GenericVector/NumericVector/FloatVector bounds, the policy math library, masks…
oraclaw-cmaes
CMA-ES continuous optimization for AI agents. State-of-the-art derivative-free optimizer. 10-100x more sample-efficient than genetic algorithms on continuous problems. Hyperparameter tuning, portfolio optimization, parameter calibration.
oraclaw-anomaly
Anomaly detection for AI agents. Z-score, IQR, and streaming detection. Find outliers in data instantly. Sub-millisecond response. Works on single values or full datasets.
oraclaw-bayesian
Bayesian inference engine for AI agents. Update beliefs with new evidence. Prior + evidence = posterior. Multi-factor prediction with calibration tracking.
oraclaw-calibrate
Prediction quality scoring for AI agents. Brier score, log score, and multi-source convergence analysis. Know if your forecasts are accurate and if your data sources agree.
oraclaw-forecast
Time series forecasting for AI agents. ARIMA and Holt-Winters predictions with confidence intervals. Predict revenue, traffic, prices, or any sequential data. Sub-5ms inference.