
A Tufts University Data Lab Workshop
Written by Uku-Kaspar Uustalu

Slides: tufts.box.com/v/python-stats
Live offerings: go.tufts.edu/workshops
Contact: datalab-support@elist.tufts.edu
Table of Contents
Workshop Overview
This hands-on interactive workshop demonstrates implementing various statistical analysis workflows in Python. The workshop notebook is a work in progress and intends to cover the following:
- Visualizing data and conducting exploratory analysis
- Conducting various statistical hypothesis tests
- Fitting and interpreting statistical models
The notebook is designed to be run in a pre-configured cloud-computing environment via Binder and does not require the installation of any software. It is also possible to run the workshop notebook using a local Anaconda or Mambaforge installation. Instructions on how to install Anaconda or Mambaforge are available here: go.tufts.edu/installingPython
Running the Workshop Notebook using a Virtual JupyterLab Instance (Recommended)

- Click on the Launch Binder button above.
- A Binder instance will launch in a new tab with the message Starting Repository.
- Wait patiently and do not close the Binder tab. After a few minutes, a JupyterLab instance will launch.
- If the workshop notebook does not automatically open, double-click on
python-stats.ipynb in the file browser on the left.
Running the Workshop Notebook using a Local Anaconda or Mambaforge Installation

- Launch a Conda-Enabled Terminal or Command Prompt.
- Windows (Anaconda): Start > Anaconda3 > Anaconda Prompt
- Windows (Mambaforge): Start > Mambaforge > Mambaforge Prompt
- macOS: Applications > Utilities > Terminal
- Run the following commands by typing or pasting the command into the console and then pressing Enter or Return.
- Download and extract the workshop materials:
curl -Lo - https://github.com/tuftsdatalab/python-stats/archive/workshop.tar.gz | tar -xzf -
- Navigate into the extracted directory:
cd python-stats-workshop
- Create a new environment for the workshop.
- Anaconda:
conda env create -f environment.yml
- Mambaforge:
mamba env create -f environment.yml
- Activate the workshop environment:
conda activate python-stats
- Open the workshop notebook in JupyterLab:
jupyter lab python-stats.ipynb
- JupyterLab will launch in a web browser. (A new tab will be generated if a browser is already open.)
- If the workshop notebook does not automatically open, double-click on
python-stats.ipynb in the file browser on the left.
- Do not close the console! Closing the console will also terminate JupyterLab. Leave the console running in the background.