Skip to content

Commit

Permalink
Update website
Browse files Browse the repository at this point in the history
  • Loading branch information
MarieAugerMethe committed Sep 4, 2024
1 parent f23467e commit a57f9ef
Show file tree
Hide file tree
Showing 10 changed files with 580 additions and 0 deletions.
284 changes: 284 additions & 0 deletions Code-of-Conduct.html

Large diffs are not rendered by default.

203 changes: 203 additions & 0 deletions JUPYTERLAB_GUIDE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,203 @@
# JupyterLab Guide

This guide contains tips and FAQs which help to avoid common issues that arise when using JupyterLab.

# Table of Contents
### Tips
1. [Open multiple notebook tabs](#open-multiple-notebook-tabs)
2. [Check solutions or feedback](#check-solutions-or-feedback)
3. [Check memory usage](#check-memory-usage)
4. [Get a fresh copy of a notebook](#get-a-fresh-copy-of-a-notebook)
5. [View hidden files](#view-hidden-files)
6. [Clone a GitHub repo](#clone-a-github-repo)
7. [Get a copy of everything](#get-a-copy-of-everything)

### FAQs
1. [Why did I get a zero/low-mark when I submitted everything on time?](#why-did-i-get-a-zerolow-mark-when-i-submitted-everything-on-time)
2. [Why are none of my cells running?](#why-are-none-of-my-cells-running)
3. [Why does my kernel keep dying?](#why-does-my-kernel-keep-dying)
4. [Why did I get a zero on a question when all the tests passed?](#why-did-i-get-a-zero-on-a-question-when-all-the-tests-passed)
5. [Why did I get a low mark on a question when all the tests passed?](#why-did-i-get-a-low-mark-on-a-question-when-all-the-tests-passed)
6. [I made a typo in my code, can I still get marks for the question?](#i-made-a-typo-in-my-code-can-i-still-get-marks-for-the-question)
7. [I am getting a 400 (Bad Request) or 404 (Not Found) error, how do I fix it?](#i-am-getting-a-400-bad-request-or-404-not-found-error-how-do-i-fix-it)
8. [How do I get a blank worksheet or tutorial for practice?](#how-do-i-get-a-blank-worksheet-or-tutorial-for-practice)

## Tips

## Open multiple notebook tabs

When working on a notebook, you might want to have multiple tabs of the same notebook open to easily reference previous questions.

**DO NOT** open another browser tab, create another instance of JupyterLab, and open the same notebook. Doing so may overwrite the notebook you are working on with an empty or half-completed version.

Instead, use JupyterLab's built in tab functionality to create another view for the notebook.

To do so in JupyterLab, right click the tab that contains the notebook in question.

On the dropdown menu, click **New View for Notebook**:

![Alt text](images/image1.png)

This will create a split screen, showing a copy of the notebook on half of the screen.

## Check solutions or feedback

Solutions and feedback are uploaded to your home directory. This is a different directory to where assignments are stored.

To get to your home directory, open JupyterLab and then click the small grey folder icon on top of the menu to the left that shows files and folders.

![Alt text](images/image2.png)

Then that same menu should show assignment solutions and feedback. Solutions are typically released a few days after the due date, feedback is released after assignments are graded (this may take a couple weeks as tutorials are manually graded).

## Check memory usage

Student JupyterLab instances are limited to 2GB (2048MB) of memory usage, if that limit is reached by running a notebook then the kernel will be killed and cells will stop running.

To check how much memory JupyterLab is using, there is a indicator on the bottom left of the window:

![Alt text](images/image3.png)

The maximum amount of memory usage a notebook should use is around 1GB (1024MB). If you find that JupyterLab is hitting the limit very often, here are some steps you can take:

### Restart your JupyterLab server

On the top left, go to **File -> Hub Control Panel** and it will open a window with a red button with text **Stop My Server**, click the button and then click the **Log Out** button on the top right.

Close the browser tab and then open JupyterLab again from Canvas.

### Check your code

If restarting your server does not work, then there may be an issue with your code.

Run your notebook one cell at a time. If you hit a cell that causes memory usage to hit the 2GB limit, examine the code in the cell to make sure there aren't any errors e.g. running a function on unfiltered data.

## Get a fresh copy of a notebook

If you need a new copy of a notebook, for example if you accidentally deleted a grading cell or want one for practice, first rename the notebook you have in your account currently.

For example if you need a new copy of a `worksheet_wrangling.ipynb`, right-click it in the file menu and choose the **Rename** option and rename it to `worksheet_wrangling_old.ipynb`.

Then close JupyterLab and then open the assignment again on Canvas. A new copy of the assignment should be created in place of the renamed assignment.

## View hidden files

*Warning*: Only delete hidden files that you have created, other hidden files may be used by the server

To view hidden files, on the top left go to **View** and on the dropdown click **Show Hidden Files**

## Clone a GitHub repo

To clone a GitHub repo for collaborative work, follow these steps:

1. Find the HTTPS repo link from GitHub and copy it to the clipboard

![alt text](images/image5.png)

2. Go to your JupyterLab and make sure you're in the home directory by clicking the small grey folder icon on the top left of the menu that shows your files and folders

![Alt text](images/image2.png)

3. Go to the JupyterLab git extension menu by clicking its tab on the left of JupyterLab:

![alt text](images/image6.png)

4. Click "Clone a Repository" and then paste the repo link from step 1 into the box and click Clone.

![alt text](images/image7.png)

The repo should now be in your home directory in a folder titled with the name of your repo.

To get to your cloned repo, remember to navigate to the home directory as shown in step 2.

## Get a copy of everything

To get a zipped copy of all of your work at the end of term:

1. Open a terminal by clicking the terminal icon when you first open JupyterLab from the Canvas homepage or in a new JupyterLab tab.

![Alt text](images/image4.png)

2. Enter the following command into the terminal:
```
cd /home/jovyan/work/ && zip -r backupjupyterlab.zip *
```
If you received a `Disk quota exceeded` error, then there are too many files. Delete any files or folders that you don't need (especially large .csv files) and try the command again.

3. Go to your home folder [as described here](#check-solutions-or-feedback) and there should be a zip file. Right-click the file and click Download to download a copy onto your device.

## FAQs

### Why did I get a zero/low-mark when I submitted everything on time?

If you are aware of the above, then make sure that you are opening another notebook tab [in the correct way](#open-multiple-notebook-tabs). If you opened another browser tab with JupyterLab, then there is a chance your notebook was overwritten.

Lastly, do not rename the assignment notebook file or any folders. The autograder relies on those names to collect submissions.

### Why are none of my cells running?

Before anything else, try restarting JupyterHub as described [here](#restart-your-jupyterlab-server).

Make sure you're using a compatible browser. We recommend Chrome, Edge, or Firefox. Also update your browser to the latest version.

Update your device's operating system to the latest version and reboot your device.

Disable any extensions to check if they are affecting JupyterLab.

Try opening JupyterLab in an incognito browser session.

### Why does my kernel keep dying?

Please read [Check memory usage](#check-memory-usage).

### Why did I get a zero on a question when all the tests passed?

You may have deleted a grading cell accidentally (grading cells are cells that contain test functions e.g. `test_3.2()`).

The autograder relies on these cells to give students marks. Creating a new cell and then copying the test function into that cell will not fix the issue.

If you do accidentally delete a grading cell, you should [get a fresh copy of the assignment notebook](#get-a-fresh-copy-of-a-notebook). Then, copy your work into the fresh notebook.

### Why did I get a low mark on a question when all the tests passed?

Some questions have hidden tests that are not shown in the student version of the assignment.

Your answer may have passed the visible tests but failed the hidden tests when it was being marked.

Examine the feedback for the question carefully to see if hidden tests were run on your code. Instructions for accessing feedback are [here](#check-solutions-or-feedback).

### I made a typo in my code, can I still get marks for the question?

We will not be making exceptions for typos in autograded coding questions.

Read the questions carefully as some questions request answers of a certain type (e.g. String).

The questions include tests that give instant feedback on your code. Run those tests frequently to ensure that you haven't made any typos.

### I am getting a 400 (Bad Request) or 404 (Not Found) error, how do I fix it?

Before continuing with the instructions below, try JupyterLab again after restarting your browser.

The errors could be due to your browser's cache and it may need to be cleared.

Instructions:

[For Edge](https://www.microsoft.com/en-us/edge/learning-center/how-to-manage-and-clear-your-cache-and-cookies?form=MA13I2)

[For Chrome](https://support.google.com/accounts/answer/32050?hl=en&co=GENIE.Platform%3DDesktop)

[For Firefox](https://support.mozilla.org/en-US/kb/how-clear-firefox-cache)

After clearing your browser's cache, restart the browser and try opening JupyterLab again.

If it still has the same error, try using Incognito or Private Browsing on your browser.

Lastly, disable any browser extensions as they could interfere with JupyterLab. Also check that your browser is updated to its latest version.

### How do I get a blank worksheet or tutorial for practice?

Follow the instructions [here](#get-a-fresh-copy-of-a-notebook) to get a blank copy of a tutorial or worksheet.




Binary file added images/image1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/image2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/image3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/image4.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/image5.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/image6.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/image7.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
93 changes: 93 additions & 0 deletions lecture-learning-outcomes.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
# Learning Outcomes by Week

### Week 1: Introduction to Statistical Inference and Sampling
From this section, students are expected to be able to:
1. Describe real-world examples of questions that can be answered with the statistical inference methods presented in this course (e.g., estimation, hypothesis testing).
2. Name common population parameters (mean, proportion, median, variance, standard deviation, and correlation) that are often estimated using sample data, and write computer scripts to calculate estimates of these parameters.
3. Define the following terms in relation to statistical inference: population, sample, population parameters, estimate, sampling distribution, sample distribution.
4. Write an R script to draw random samples from a finite population (e.g., census data).
5. Write an R script to reveal a sampling distribution from a finite population.

### Week 2: Populations and Sampling
From this section, students are expected to be able to:
1. Compare and contrast quantitative and categorical variables.
2. Explain random and representative sampling and how this can influence estimation.
3. Define random variables and explain how they relate to sampling.
4. Define standard error and explain its purpose.
5. Compare and contrast population distribution, sample distribution and an estimator's sampling distribution.
6. Explain what a sampling distribution is, list its properties, and its purpose in statistical inference.

### Week 3: Bootstrapping and its Relationship to the Sampling Distribution
From this section, students are expected to be able to:
1. Explain why we don’t know/have a sampling distribution in practice/real life.
2. Define bootstrapping.
3. Write a computer script to create a bootstrap distribution to approximate a sampling distribution.
4. Contrast the bootstrap sampling distribution with an assumed sampling distribution.
5. Estimate the standard error of an estimator using bootstrapping.

### Week 4: Confidence Intervals via Bootstrapping
From this section, students are expected to be able to:
1. Define and calculate sample quantiles.
1. Define what a confidence interval is, and why we want to generate one.
2. Explain how the bootstrap sampling distribution can be used to create confidence intervals.
3. Write a computer script to calculate confidence intervals for a population parameter using bootstrapping.
4. Effectively visualize point estimates and confidence intervals.
5. Interpret and explain results from confidence intervals.
6. Discuss the potential limitations of these methods.

### Week 5: Mid-term #1 and Preparation for Projects
In this week, students will write a mid-term exam, and begin working on their projects.
Also from this section, students are expected to be able to
1. Propose parameters that are useful, given the type of data.
2. Propose parameters that are useful, given a question.
3. Choose an appropriate way to present estimator uncertainty, given a question, by comparing and contrasting the usefulness of confidence intervals vs. standard error.

### Week 6: Hypothesis Testing via Simulation/Randomization
From this section, students are expected to be able to:
1. Give an example of a question you could answer with a hypothesis test.
2. Differentiate composite vs. simple hypotheses.
3. Given an inferential question, formulate null and alternative hypotheses to be used in a hypothesis test.
5. Identify the steps and components of a basic hypothesis test ("there is only one hypothesis test").
6. Write computer scripts to perform hypothesis testing via simulation, randomization and bootstrapping approaches, as well as interpret the output.
8. Describe the relationship between confidence intervals and hypothesis testing.
9. Discuss the potential limitations of this simulation approach to hypothesis testing.

### Week 7: Confidence Intervals (of means and proportions) Based on the Assumption of Normality or the Central Limit Theorem
From this section, students are expected to be able to:
1. Describe the Law of Large Numbers.
2. Describe a normal distribution.
3. Explain the Central Limit Theorem and its role in constructing confidence intervals.
4. Write a computer script to calculate confidence intervals based on the assumption of normality / the Central Limit Theorem.
5. Discuss the potential limitations of these methods.
6. Decide whether to use asymptotic theory or bootstrapping to compute estimator uncertainty.

### Week 8: Classical Tests Based on Normal and t- Distributions
From this section, students are expected to be able to:
1. Describe a t-distribution and its relationship with the normal distribution.
2. Use results from the assumption of normality or the Central Limit Theorem to perform estimation and hypothesis testing.
3. Compare and contrast the parts of estimation and hypothesis testing that differ between simulation- and resampling-based approaches with the assumption of normality or the Central Limit Theorem- based approaches.
4. Write a computer script to perform hypothesis testing based on results from the assumption of normality or the Central Limit Theorem.
5. Discuss the potential limitations of these methods.


### Week 9: Mid-term #2 and Project Work


### Week 10: Errors in Inference
From this section, students are expected to be able to:
1. Define type I & II errors.
2. Describe responsible use and reporting of p-values from hypothesis tests.
3. Discuss how these errors are linked to a "reproducibility crisis".
4. Measure how these errors amplify when performing multiple hypothesis testing, in the context of multiple comparisons.


### Week 11: Beyond two-group comparisons
From this section, students are expected to be able to:
1. Run a simple one-way ANOVA, without knowing the details of the test.
2. Apply FDR or Bonferroni correction to control the errors when performing multiple hypothesis testing.
3. The value of presenting an entire distribution as a prediction.
4. Estimate a population distribution using simulation (if there's time). Example: wedding planning: https://www.tomasbeuzen.com/post/party-planning-probability/
5. Calculate, interpret, and visualize prediction intervals.

### Week 12: Project Week
This week is designed as independent studying where the students will be working on a project that aims at answering an inferential question with the material they have learned from weeks 1-11.

0 comments on commit a57f9ef

Please sign in to comment.