Teaching

Taught courses

  • 2019-2021: ST337/ST405: Bayesian forecasting and intervention
  • 2021-2023: ST208 Mathematical methods

Lecture notes

Note: Current students should refer to the latest set of lecture notes

Bayesian forecasting and intervention

*see instructions in the following sections

Running the Python scripts

Instructions for using the Python scripts:

  1. With Anaconda (possible on all platforms, tested on MS Windows 10)
    • install Anaconda
    • run the Anaconda Prompt from the start menu and enter:
      conda install bokeh
      (this only needs to be done the first time)
    • move to the directory where the scripts are, e.g.:
      cd Documents\ST337_plots
    • then, for instance, if you want to run the Python script StandardDistributions.py:
      bokeh serve StandardDistributions.py
      this will give an address of the form http://localhost:5006/StandardDistributions that you can copy/paste into the web browser of your choice.
  2. Without Anaconda (tested but Linux or Mac only)
    • install the package python3.6:
      sudo apt-get update
      sudo apt-get install python3-venv
    • run the following to create a virtual environment (safer) and install the required packages:
      python3 -m venv ST337_plots
      cd ST337_plots
      source bin/activate
      pip install --upgrade pip
      pip install --upgrade bokeh
      pip install --upgrade scipy
    • then, for instance, if you want to run the Python script StandardDistributions.py:
      bokeh serve StandardDistributions.py
      this will give an address of the form http://localhost:5006/StandardDistributions that you can copy/paste into the web browser of your choice
    • once you are done, you can exit the virtual environment with:
      deactivate

Running a Python notebook

With Anaconda (possible on all platforms, tested on MS Windows 10)

  • install Anaconda (if not already done so for the scripts)
  • run the Anaconda Navigator from the start menu and launch the “Jupyter Notebook”.
  • A new browser window (or tab) appears which displays the folder and files at the root of your user folder. Navigate to where the notebook file (.ipynb) is and click on it.
  • Another window or tab appears with the content of the notebook. You can use the “Run” button to run a cell (all the cells that are not text-only have to be run in order).
  • You can modify and re-run any cell but the following cells will also need to be re-run to propagate the modification (if you change the model but do not re-run the Kalman filter, the results will not change).
  • More information can be found on the official page.