[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7EW2SRGFMZXQYC38C7STXSZ":3,"skill-same:01M7EW2SRGFMZXQYC38C7STXSZ":47},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":25,"commitSha":26,"skillDirectory":27,"forksCount":28,"repositoryHtmlUrl":29,"repositoryHomepageUrl":6,"ownerHtmlUrl":30,"ownerBlogUrl":31,"ownerDescription":6,"updatedAt":32,"install":33,"resources":46},"01M7EW2SRGFMZXQYC38C7STXSZ","stochastic-processes",null,"Modeling randomness over time — Markov chains, Poisson processes, Brownian motion, SDEs, and simulation.","TanNhatCMS\u002Fjarvis","TanNhatCMS","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F113796420?v=4","01M753MV17KG5CD3152G3WQEQY","KietNT","01M7EKEDYVYQ6PWVJJMZ911VMX",0,"MIT","https:\u002F\u002Fgithub.com\u002FTanNhatCMS\u002Fjarvis\u002Fblob\u002Fmain\u002Fskills\u002Fams-stochastic-processes\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: stochastic-processes\ndescription: Modeling randomness over time — Markov chains, Poisson processes, Brownian motion, SDEs, and simulation.\ncategory: scientific\n---\n\n## Overview\n\nStochastic processes model systems that evolve randomly: molecular\ncollisions, queueing, population dynamics, asset prices, neural spikes.\nThis skill covers the core process families (Markov chains, Poisson,\nBrownian motion\u002FWiener process), stochastic differential equations\n(SDEs), stationary distributions, and simulation methods — with the\ntheoretical grounding to know which process fits the phenomenon.\n\n## When to use\n\n- Modeling a system with intrinsic randomness: reactions, queues, epidemics, diffusion\n- Choosing between discrete\u002Fcontinuous time and state representations\n- Simulating SDEs (Euler–Maruyama, Milstein) and checking the simulation\n- Finding stationary distributions, mean hitting times, or extinction probabilities\n- Deciding whether randomness is essential or just noise on a deterministic skeleton\n\n## Core concepts\n\n- **Markov property:** the future depends only on the present, not the history — the defining simplification; check it empirically (does conditioning on more history change predictions?) before assuming it.\n- **Discrete-time chains:** transition matrix P; n-step behavior from Pⁿ; stationary distribution π = πP; classification (recurrent\u002Ftransient, periodic\u002Faperiodic) determines long-run behavior.\n- **Continuous-time chains:** generator matrix Q (rates, not probabilities); holding times exponential; the master equation d p\u002Fdt = pQ — chemical kinetics and queueing live here.\n- **Poisson process:** events at constant rate λ — interarrival times exponential, counts Poisson(λt); the null model for \"random events in time\"; test against it (over\u002Funderdispersion signals mechanism).\n- **Brownian motion \u002F Wiener process:** continuous paths, independent Gaussian increments, variance ∝ t — the scaling limit of random walks; geometric Brownian motion for positive quantities (prices, populations).\n- **SDEs:** dx = a(x,t)dt + b(x,t)dW — drift + diffusion; Itô vs Stratonovich interpretations differ when noise is multiplicative (Itô: non-anticipating, standard in finance\u002Fbiology; the choice changes the drift).\n\n- **Hawkes processes:** self-exciting point processes where events raise the future event rate — earthquakes (aftershocks), finance, social contagion; the branching structure gives cluster-size distributions analytically.\n- **Mean-field limits:** many interacting particles converge to deterministic PDEs (McKean–Vlasov) as N→∞ — the bridge from agent-based stochastic models to continuum equations.\n- **Large-deviation theory:** quantifies probabilities of rare paths exponentially (Freidlin–Wentzell) — the right tool for \"how unlikely is this extreme excursion?\" beyond Gaussian approximations.\n\n## Practical workflow\n\n### 1. Choose the process family\n\n| Phenomenon | Natural model |\n|---|---|\n| Counts of events in time | Poisson \u002F Hawkes (self-exciting) \u002F Cox (random rate) |\n| Discrete states, random jumps | CTMC (master equation) |\n| Continuous noisy dynamics | SDE (Langevin form) |\n| Diffusion in space | Brownian motion \u002F Fokker–Planck PDE |\n| Population with demographic noise | Birth–death process \u002F diffusion approximation |\n\n### 2. Simulate correctly\n\n```python\nimport numpy as np\nrng = np.random.default_rng(0)\n# Euler-Maruyama for dx = a(x)dt + b(x)dW\nx = x0\nfor _ in range(n_steps):\n    x += a(x)*dt + b(x)*np.sqrt(dt)*rng.normal()\n# Check: halve dt, confirm weak\u002Fstrong convergence rates\n```\n\n1. Match the scheme to the need: Euler–Maruyama (weak order 1, simple), Milstein (strong order 1, needs derivative of diffusion) for pathwise accuracy.\n2. Verify by convergence: refine dt and check the error shrinks at the theoretical rate — against an analytical solution or a very fine reference.\n3. For CTMCs: Gillespie algorithm (exact event-driven simulation) beats fixed-timestep approximations for reaction\u002Fqueueing systems.\n\n### 3. Analyze: distributions and timescales\n\n1. **Stationary distributions:** solve πQ = 0 (chains) or the stationary Fokker–Planck equation (SDEs) — compare simulation histograms against theory.\n2. **First-passage\u002Fhitting times:** mean extinction time, mean time to absorption — often the actual quantity of interest (how long until the population dies out?).\n3. **Parameter inference:** likelihoods from transition densities (exact when available, e.g., OU process) or via simulation-based methods (ABC, particle MCMC) otherwise.\n\n### 4. Validate against data\n\n1. Check the Markov assumption and the noise structure (are increments really independent? Gaussian? state-dependent variance suggests multiplicative noise).\n2. Compare predicted vs observed: stationary distribution shape, autocorrelation timescale, extreme-event frequency.\n3. Distinguish intrinsic stochasticity from parameter uncertainty and measurement noise — they need different data and different models.\n\n### 5. Fit a stochastic model to data\n\n1. Choose observables that identify the model: stationary distribution shape, autocorrelation time, event-count dispersion — different processes can share means but differ in fluctuations.\n2. Estimate by likelihood when transition densities are known (OU process, CTMC); otherwise use simulation-based inference (ABC, synthetic likelihood, particle MCMC).\n3. Validate by simulating from the fitted model and comparing fluctuation statistics — not just the mean trajectory — with the data.\n\n## Common pitfalls\n\n- **Itô vs Stratonovich confusion:** with multiplicative noise the two calculi give different SDEs — state the interpretation; converting adds a drift correction.\n- **Euler–Maruyama with big dt:** stability and accuracy both degrade — convergence-test every SDE simulation.\n- **Assuming Markov without checking:** history dependence (refractory periods, memory) breaks the whole apparatus — test first.\n- **Poisson by default:** real event data are usually overdispersed (bursty) or underdispersed (refractory) — check dispersion before modeling.\n- **Confusing ensemble and time averages:** ergodicity is an assumption — a single long trajectory need not explore the stationary distribution (metastability, absorbing states).\n- **Noise as an afterthought:** adding Gaussian noise to a deterministic model is not stochastic modeling — derive the noise from the mechanism (demographic, thermal, measurement).\n- **White-noise abuse:** real noise has finite correlation time — white-noise SDEs can misbehave (infinite variance velocities); check whether colored noise or explicit fast dynamics is needed.\n- **Ergodicity assumed, not earned:** single-trajectory time averages equal ensemble averages only for ergodic systems — metastable and non-stationary systems violate this silently.\n","## Overview\n\nStochastic processes model systems that evolve randomly: molecular\ncollisions, queueing, population dynamics, asset prices, neural spikes.\nThis skill covers the core process families (Markov chains, Poisson,\nBrownian motion\u002FWiener process), stochastic differential equations\n(SDEs), stationary distributions, and simulation methods — with the\ntheoretical grounding to know which process fits the phenomenon.\n\n## When to use\n\n- Modeling a system with intrinsic randomness: reactions, queues, epidemics, diffusion\n- Choosing between discrete\u002Fcontinuous time and state representations\n- Simulating SDEs (Euler–Maruyama, Milstein) and checking the simulation\n- Finding stationary distributions, mean hitting times, or extinction probabilities\n- Deciding whether randomness is essential or just noise on a deterministic skeleton\n\n## Core concepts\n\n- **Markov property:** the future depends only on the present, not the history — the defining simplification; check it empirically (does conditioning on more history change predictions?) before assuming it.\n- **Discrete-time chains:** transition matrix P; n-step behavior from Pⁿ; stationary distribution π = πP; classification (recurrent\u002Ftransient, periodic\u002Faperiodic) determines long-run behavior.\n- **Continuous-time chains:** generator matrix Q (rates, not probabilities); holding times exponential; the master equation d p\u002Fdt = pQ — chemical kinetics and queueing live here.\n- **Poisson process:** events at constant rate λ — interarrival times exponential, counts Poisson(λt); the null model for \"random events in time\"; test against it (over\u002Funderdispersion signals mechanism).\n- **Brownian motion \u002F Wiener process:** continuous paths, independent Gaussian increments, variance ∝ t — the scaling limit of random walks; geometric Brownian motion for positive quantities (prices, populations).\n- **SDEs:** dx = a(x,t)dt + b(x,t)dW — drift + diffusion; Itô vs Stratonovich interpretations differ when noise is multiplicative (Itô: non-anticipating, standard in finance\u002Fbiology; the choice changes the drift).\n\n- **Hawkes processes:** self-exciting point processes where events raise the future event rate — earthquakes (aftershocks), finance, social contagion; the branching structure gives cluster-size distributions analytically.\n- **Mean-field limits:** many interacting particles converge to deterministic PDEs (McKean–Vlasov) as N→∞ — the bridge from agent-based stochastic models to continuum equations.\n- **Large-deviation theory:** quantifies probabilities of rare paths exponentially (Freidlin–Wentzell) — the right tool for \"how unlikely is this extreme excursion?\" beyond Gaussian approximations.\n\n## Practical workflow\n\n### 1. Choose the process family\n\n| Phenomenon | Natural model |\n|---|---|\n| Counts of events in time | Poisson \u002F Hawkes (self-exciting) \u002F Cox (random rate) |\n| Discrete states, random jumps | CTMC (master equation) |\n| Continuous noisy dynamics | SDE (Langevin form) |\n| Diffusion in space | Brownian motion \u002F Fokker–Planck PDE |\n| Population with demographic noise | Birth–death process \u002F diffusion approximation |\n\n### 2. Simulate correctly\n\n```python\nimport numpy as np\nrng = np.random.default_rng(0)\n# Euler-Maruyama for dx = a(x)dt + b(x)dW\nx = x0\nfor _ in range(n_steps):\n    x += a(x)*dt + b(x)*np.sqrt(dt)*rng.normal()\n# Check: halve dt, confirm weak\u002Fstrong convergence rates\n```\n\n1. Match the scheme to the need: Euler–Maruyama (weak order 1, simple), Milstein (strong order 1, needs derivative of diffusion) for pathwise accuracy.\n2. Verify by convergence: refine dt and check the error shrinks at the theoretical rate — against an analytical solution or a very fine reference.\n3. For CTMCs: Gillespie algorithm (exact event-driven simulation) beats fixed-timestep approximations for reaction\u002Fqueueing systems.\n\n### 3. Analyze: distributions and timescales\n\n1. **Stationary distributions:** solve πQ = 0 (chains) or the stationary Fokker–Planck equation (SDEs) — compare simulation histograms against theory.\n2. **First-passage\u002Fhitting times:** mean extinction time, mean time to absorption — often the actual quantity of interest (how long until the population dies out?).\n3. **Parameter inference:** likelihoods from transition densities (exact when available, e.g., OU process) or via simulation-based methods (ABC, particle MCMC) otherwise.\n\n### 4. Validate against data\n\n1. Check the Markov assumption and the noise structure (are increments really independent? Gaussian? state-dependent variance suggests multiplicative noise).\n2. Compare predicted vs observed: stationary distribution shape, autocorrelation timescale, extreme-event frequency.\n3. Distinguish intrinsic stochasticity from parameter uncertainty and measurement noise — they need different data and different models.\n\n### 5. Fit a stochastic model to data\n\n1. Choose observables that identify the model: stationary distribution shape, autocorrelation time, event-count dispersion — different processes can share means but differ in fluctuations.\n2. Estimate by likelihood when transition densities are known (OU process, CTMC); otherwise use simulation-based inference (ABC, synthetic likelihood, particle MCMC).\n3. Validate by simulating from the fitted model and comparing fluctuation statistics — not just the mean trajectory — with the data.\n\n## Common pitfalls\n\n- **Itô vs Stratonovich confusion:** with multiplicative noise the two calculi give different SDEs — state the interpretation; converting adds a drift correction.\n- **Euler–Maruyama with big dt:** stability and accuracy both degrade — convergence-test every SDE simulation.\n- **Assuming Markov without checking:** history dependence (refractory periods, memory) breaks the whole apparatus — test first.\n- **Poisson by default:** real event data are usually overdispersed (bursty) or underdispersed (refractory) — check dispersion before modeling.\n- **Confusing ensemble and time averages:** ergodicity is an assumption — a single long trajectory need not explore the stationary distribution (metastability, absorbing states).\n- **Noise as an afterthought:** adding Gaussian noise to a deterministic model is not stochastic modeling — derive the noise from the mechanism (demographic, thermal, measurement).\n- **White-noise abuse:** real noise has finite correlation time — white-noise SDEs can misbehave (infinite variance velocities); check whether colored noise or explicit fast dynamics is needed.\n- **Ergodicity assumed, not earned:** single-trajectory time averages equal ensemble averages only for ergodic systems — metastable and non-stationary systems violate this silently.\n",{"name":5,"category":24,"description":7},"scientific","main","af388a77c2fe5e0b4fd879cca4300a0ffa9a6579","skills\u002Fams-stochastic-processes",1,"https:\u002F\u002Fgithub.com\u002FTanNhatCMS\u002Fjarvis","https:\u002F\u002Fgithub.com\u002FTanNhatCMS","https:\u002F\u002Fmrkiet.name.vn","2026-11-07 14:23:08",{"source":8,"skillName":5,"commands":34,"prompt":44,"zipAvailable":45},[35,38,41],{"tool":36,"command":37},"npx","npx skills add TanNhatCMS\u002Fjarvis --skill stochastic-processes",{"tool":39,"command":40},"bunx","bunx skills add TanNhatCMS\u002Fjarvis --skill stochastic-processes",{"tool":42,"command":43},"pnpm","pnpm dlx skills add TanNhatCMS\u002Fjarvis --skill stochastic-processes","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FTanNhatCMS\u002Fjarvis\u002Fblob\u002Fmain\u002Fskills\u002Fams-stochastic-processes\u002FSKILL.md",true,[],[48,55,63,70,77,84],{"skillNo":49,"name":50,"nameZh":6,"description":51,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":52,"categories":53,"keywords":54,"publishedAt":19},"01M7EWYJR0J8DARY7E59Z6Y9MV","web-scrape","Turn web pages into LLM-ready markdown via the Firecrawl API (renders JS, anti-bot handling). Use when browser_open\u002Ffetch fails on JS-heavy pages, or when you need clean markdown\u002Fstructured extraction from a site. Requires FIRECRAWL_API_KEY.","https:\u002F\u002Fgithub.com\u002FTanNhatCMS\u002Fjarvis\u002Fblob\u002Fmain\u002Fskills\u002Fweb-scrape\u002FSKILL.md",[],[],{"skillNo":56,"name":57,"nameZh":6,"description":58,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":59,"sourceHtmlUrl":60,"categories":61,"keywords":62,"publishedAt":19},"01M7EWYBN5P6F2AJG3FR24T9BP","design-taste-frontend","tasteskill v2, the anti-slop frontend skill. Art direction for websites, distilled from a study of 247 curated gallery sites (One Page Love, Awwwards Sites of the Day). Deals researched directions (idea, composition, type, palette, photographs, section blueprints) from a library, enforces a strict no-slop house style with a real-browser inspector, and runs a look-and-fix loop on screenshots. Use this whenever you build, design, redesign, restyle, polish or review a landing page, marketing site, portfolio, product page, one-pager, hero or any public-facing web page, in any stack (HTML\u002FCSS, React, Next.js, Vue, Svelte, Astro, Tailwind) — also when the user says a page looks generic, templated, \"AI-made\", sloppy, or asks to make it look designed, premium, award-level or less like every other site. Not for dashboards or app screens.","https:\u002F\u002Fgithub.com\u002FTanNhatCMS\u002Fjarvis\u002Fblob\u002Fmain\u002Fskills\u002Ftaste-design\u002FLICENSE","https:\u002F\u002Fgithub.com\u002FTanNhatCMS\u002Fjarvis\u002Fblob\u002Fmain\u002Fskills\u002Ftaste-design\u002FSKILL.md",[],[],{"skillNo":64,"name":65,"nameZh":6,"description":66,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":67,"categories":68,"keywords":69,"publishedAt":19},"01M7EWY8FQFNQ2GB7NZZWGSSDX","test-driven-development","Use when implementing any feature or bugfix, before writing implementation code","https:\u002F\u002Fgithub.com\u002FTanNhatCMS\u002Fjarvis\u002Fblob\u002Fmain\u002Fskills\u002Fsuperpowers-tdd\u002FSKILL.md",[],[],{"skillNo":71,"name":72,"nameZh":6,"description":73,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":74,"categories":75,"keywords":76,"publishedAt":19},"01M7EWY5SHBFRH1HDHVWM9K7TV","systematic-debugging","Use when encountering any bug, test failure, or unexpected behavior, before proposing fixes","https:\u002F\u002Fgithub.com\u002FTanNhatCMS\u002Fjarvis\u002Fblob\u002Fmain\u002Fskills\u002Fsuperpowers-debugging\u002FSKILL.md",[],[],{"skillNo":78,"name":79,"nameZh":6,"description":80,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":81,"categories":82,"keywords":83,"publishedAt":19},"01M7EWY3NM0Z0JAKS7HDZ24K66","requesting-code-review","Use when completing tasks, implementing major features, or before merging to verify work meets requirements","https:\u002F\u002Fgithub.com\u002FTanNhatCMS\u002Fjarvis\u002Fblob\u002Fmain\u002Fskills\u002Fsuperpowers-code-review\u002FSKILL.md",[],[],{"skillNo":85,"name":86,"nameZh":6,"description":87,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":88,"categories":89,"keywords":90,"publishedAt":19},"01M7EWY0WRMWX4M9ZFY0WKC593","brainstorming","You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or planning anything new, in software or out of it (a talk, a business, a renovation).","https:\u002F\u002Fgithub.com\u002FTanNhatCMS\u002Fjarvis\u002Fblob\u002Fmain\u002Fskills\u002Fsuperpowers-brainstorming\u002FSKILL.md",[],[]]