{ "cells": [ { "cell_type": "code", "execution_count": 3, "id": "d4c0cc67", "metadata": { "hide_input": true, "slideshow": { "slide_type": "skip" }, "tags": [ "remove-cell" ] }, "outputs": [], "source": [ "%matplotlib inline\n", "%config InlineBackend.figure_format='retina'\n", "import numpy as np\n", "import pandas as pd\n", "import matplotlib.pyplot as plt\n", "import seaborn as sns\n", "from IPython.display import Image, display_html, display, Math, HTML" ] }, { "cell_type": "markdown", "id": "2f8d3b5e", "metadata": { "slideshow": { "slide_type": "slide" } }, "source": [ "# Markov Chains" ] }, { "cell_type": "markdown", "id": "c19bf3f2", "metadata": { "hide_input": true, "slideshow": { "slide_type": "slide" } }, "source": [ "Today we will take a temporary pause from Bayesian statistics to discuss a fundamental tool in probability." ] }, { "cell_type": "markdown", "id": "a84d1402", "metadata": { "slideshow": { "slide_type": "fragment" } }, "source": [ "Consider the following model for the weather in Boston: \n", "\n", ">If today is sunny, tomorrow will be sunny with probability 0.8; otherwise it will be rainy. If today is rainy, tomorrow will be rainy with probabililty 0.6; otherwise it will be sunny." ] }, { "cell_type": "markdown", "id": "22524230", "metadata": { "slideshow": { "slide_type": "fragment" } }, "source": [ "We can draw this scenario with a diagram like this:\n", "\n", "