pymc

Build Bayesian models with PyMC and run MCMC sampling for inference.

48|6|Updated Mar 9, 2026
One-click install
npx skills add https://github.com/qinyan-ai/qinyan-academic-skills --skill pymc-qinyan-ai
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: pymc
Source: https://github.com/qinyan-ai/qinyan-academic-skills/tree/main/skills/09-%E6%9C%BA%E5%99%A8%E5%AD%A6%E4%B9%A0%E4%B8%8E%E4%BA%BA%E5%B7%A5%E6%99%BA%E8%83%BD/pymc
Command: npx skills add https://github.com/qinyan-ai/qinyan-academic-skills --skill pymc-qinyan-ai

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires arviz, numpy, pandas, matplotlib, and includes scripts (resource) and references (resource) and assets (resource) components.

What problem does it solve?

PyMC provides a principled framework for building and inferring Bayesian models, enabling robust uncertainty quantification and model comparison in data analysis.

Core Features & Use Cases

  • End-to-end Bayesian workflow: specify priors, likelihoods, sample with NUTS or VI, and perform posterior predictive checks.
  • Model evaluation and comparison: use LOO/WAIC, diagnostics, and visualization to select among alternatives.
  • Real-world use: apply hierarchical/multilevel models, time-series analysis, and Bayesian regression with principled uncertainty.

Quick Start

Install PyMC, define a simple model, and run an MCMC sample to obtain posterior estimates.

Frequently Asked Questions about pymc

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I build and sample Bayesian models in Python?

To build Bayesian models, define priors and likelihoods using PyMC APIs, then run NUTS or Variational Inference sampling to obtain posterior estimates. The Skill supports the end-to-end workflow from model specification to MCMC sampling.

What is the best way to compare Bayesian models and evaluate fit?

The best way to compare Bayesian models is using LOO or WAIC criteria. This Skill supports model evaluation and comparison by providing diagnostics, visualization, and posterior predictive checks to validate and select among alternative models.

Can I use PyMC for hierarchical and time-series analysis?

Yes, you can use PyMC for hierarchical and time-series analysis. The Skill applies probabilistic programming to multilevel models and time-series data, enabling robust uncertainty quantification and principled Bayesian regression.

How do I perform prior and posterior predictive checks?

To perform prior and posterior predictive checks, use the diagnostics and plotting utilities provided. The Skill supports validating Bayesian models by evaluating prior and posterior predictive distributions to ensure model fit.

Do I need ArviZ and NumPy to run probabilistic programming workflows?

Yes, ArviZ and NumPy are required dependencies. The Skill relies on ArviZ for diagnostics and plotting, NumPy for numerical operations, and Pandas and Matplotlib for data handling and visualization within the probabilistic programming workflow.

How do I specify priors and use coordinates in Bayesian inference?

To specify priors and use coordinates in Bayesian inference, utilize PyMC's data containers and dims APIs. The Skill supports defining model dimensions, priors, and likelihoods to structure probabilistic models effectively before sampling.