Skip to content

Latest commit

 

History

History
71 lines (44 loc) · 3.06 KB

File metadata and controls

71 lines (44 loc) · 3.06 KB

🧠 Bayesian Statistics with Python

This repository is a comprehensive guide to mastering Bayesian Inference using Python. It transitions from the fundamental probability theory of Bayes' Theorem to advanced applications in Econometrics, Finance, and Machine Learning using modern probabilistic programming libraries like PyMC and ArviZ.


📚 Course Curriculum

The repository is structured into 15 chapters, each providing theoretical context and runnable Python implementations.

Part 1: Foundations

  • Chapter 1-3: Bayes' Theorem, Frequentist vs. Bayesian debates, and Conjugate Priors.
  • Chapter 4-6: Bayesian Estimators, Credible Intervals, Loss Functions, and Hypothesis Testing.

Part 2: Computational Methods

  • Chapter 7-8: Markov Chain Monte Carlo (MCMC) - from basic Metropolis-Hastings to advanced NUTS.
  • Chapter 9: Variational Inference (ADVI) for high-dimensional scaling.

Part 3: Modeling & Applications

  • Chapter 10-11: Linear/Logistic Regression and Hierarchical (Multilevel) Models.
  • Chapter 12-14: Model Diagnostics, Model Averaging (BMA), and Sensitivity Analysis.
  • Chapter 15: Deep Dive Applications:
    • Econometrics: BVAR, Panel Data, and State-Space Models (Nile River flow).
    • Finance: Portfolio Optimization and Bayesian Value-at-Risk (VaR).
    • Machine Learning: Bayesian Neural Networks (BNN), Gaussian Processes, and LDA.

🛠️ Tech Stack

  • Probabilistic Programming: PyMC
  • Exploratory Analysis: ArviZ
  • Data Science: NumPy, Pandas, Matplotlib, Scikit-Learn

🚀 Getting Started

  1. Clone the Repository:
    git clone https://github.com/Vipeen21/bayesian-statistics-python.git
    cd bayesian-statistics-python
  2. Install Requirements:
    pip install pymc arviz numpy pandas matplotlib scikit-learn
  3. Explore: Start with the Introduction or jump directly into Chapter 15 to see Bayesian methods applied to real-world financial and economic data.

📈 Featured Example: Bayesian Neural Networks

One of the highlights of this repo is the implementation of Bayesian Neural Networks (BNNs). Unlike standard NNs, a BNN provides a full distribution for its weights, allowing for Uncertainty Quantification in classification—visualized through decision boundaries where the model "knows what it doesn't know."


⚖️ License

This project is licensed under the MIT License.

Created and maintained by Vipeen Kumar