Welcome to the STAT 545 Worksheets!

Everything you need to know about the (autograded!) worksheets can be found here.

These worksheets are designed to help you:

  1. Apply knowledge acquired in class to solve problems with data.
  2. Practice coding skills through self-directed autograded walkthroughs.

STAT 545A:

  • Percentage of final grade: 10%
  • Number of Worksheets: 5 graded, 1 ungraded (corresponding to Weeks 1-A and 2-A).
  • Deadline: Every Friday by 11:59pm (starting on Week 3-A)
  • Grading: To get full marks for each worksheet, you must successfully answer at least 40% of all autograded questions.

STAT 545B:

  • Percentage of final grade: 10%
  • Number of Worksheets: 3 graded
  • Deadline: Every Saturday by 11:59pm (starting on Week 1-B)
  • Grading: To get full marks for each worksheet, you must successfully answer some pre-specified amount of the autograded questions.

Objectives

The purpose of these worksheets are two-fold:

  1. To provide you with exercises for practicing concepts and tools, and
  2. To provide a framework to go over in class.

The built-in tests give you instant feedback as to whether your answers are correct.

We envision you interacting with the worksheet at a level appropriate to you, completing as many questions that will give you a sufficient challenge for learning the material. Interact on your own and in class, experimenting with different code.

Downloading the Worksheets

First, you can find the worksheets on the main navigation dashboard.

How to download the lecture worksheets:

  1. Right Click
    Safari: Download Linked File as
    Chrome: Save Link As
    Microsoft Edge: Save link as
    Firefox: Save link as

  2. Command-line (bash shell), where URL is https://raw.githubusercontent.com/...

    $ wget <URL>

       OR

    $ curl -O -J <URL>

Loading a Worksheet

You can fill out the worksheets using jupyter. We decided against RStudio here because jupyter works nicely with an autograder called nbgrader.

Steps for loading a worksheet using jupyter lab or jupyter notebook:

  1. Open a shell/Terminal
    • Mac: Open an app called “Terminal”
    • Windows/other: You can open a shell using RStudio – just go to Tools > Shell...
  2. Type jupyter lab (or you could use jupyter notebook).
  3. Navigate to where you downloaded the worksheet, and open it.

Steps for loading a worksheet using UBC Syzygy (pronounced SIZ-ijee)

  1. Go to ubc.syzygy.ca.
  2. Sign in with your CWL account.
  3. Upload your worksheet file, and open it from there.

Steps for loading a worksheet using Google Colab: TBD

  1. Go to Google Colab
  2. TBD

Jupyter

The worksheets are made up of stacked “cells”; some contain text, others contain code. Here are some tips for working on a worksheet in jupyter:

  • Press “shift + enter” (Windows) or “shift + return” (Mac) to execute the contents of a cell.
    • If you do this on a text (markdown) cell, it will just re-render the markdown.
  • You won’t be able to change most of the cells – only the ones where we ask you to put an answer.

Autograder

The worksheets use an autograder called nbgrader. With it, you get instant feedback as to whether your answer is acceptable or not.

Here is more info:

  • Autograded questions are easily identifiable in the worksheets through their labelling as QUESTION. Any other instructions that prompt the student to write code are activities, which are not graded and thus do not contribute to marks - but do contribute to the workflow of the worksheet!
  • When you reach an autograded question:
    1. Input and execute your answer in the code cell.
    2. To get instant feedback as to whether your answer is acceptable, execute the code cell immediately following your answer cell. This cell contains tests that check whether your answer is acceptable or not. If this cell runs error-free, then your answer is correct!
  • Some code cells above a question will need to be run in order for the question or test cell to run error-free. For example, there will almost surely be a cell that loads R packages with library() near the top of the worksheet that will definitely need to be executed!

Submitting your worksheets

Submit your worksheet file to canvas.