1. Preparatory Work#
This section is intended for use in the introductory sessions held in 1st week for PPL and Human Science students. BMS students will have a separate introductory session.
1.1. Tasks for this week#
The objectives for the introductory session are as follows:
1.1.1. Sort IT issues#
You may wish to set up Anaconda/JupyterLab so you can work locally on your own laptop. The alternative is to use Colab (cloud computing).
This should be possible for most laptops by following the instructions PDF (IT SetUp) on Canvas.
We can’t promise to make everyone’s software work on their own computer but we will have a go and today is a good time to try as someone will be around to help.
1.1.2. Coding basics#
When people talk about “coding” they usually mean writing some form of instructions for a computer. Since computers don’t speak our “language” we revert to programming languages like Python. Importantly computers – like robots will follow instuctions step-by-step like a recipe.
In this course the “something” we want the computer to do is help us with probability and statistics. We will use Python which is a popular beginner friendly programming language. Coding in python often looks like writing short sentences which follow simple rules.
print("Welcome to Oxford")
This line of code tells the computer exactly what to do display the words inside the quotation marks. Importantly, coding is not about knowing fancy math or being a computer scientist, but instead giving clear, logical instructions so the computer can help us solve problems.
1.1.3. Familiarise yourself with Jupyter#
Throughout this course we will work with Python exercises and examples gathered in this book. These exercises and examples are written as Jupyter notebooks - a type of file in which blocks of text and code can be included When you view the book online you see the code already ‘executed’ - each code block has been run and its output is displayed below the block
However, you will want to interact with the code not just look at it!
You have two options here: Use Google Colab (in the cloud), or use JupyterLab (on your computer). The next two pages in these notes introduce how your create and save Jupyter notebooks in these two environments. It is important you work through the instructions for your chosen environment (JupyterLab or Colab) and complete the exercise in which you load the example “cats” data, whilst we are here to support you if you get stuck.
Warning
Students working in the Life and Mind computing lab can choose to use the desktop computers. However, if you do this, you need to save your work to One Drive. Anything you save on the computer will be wiped when you log off.
1.1.4. Get up to date with datacamp#
You should have had a letter from me over the summer advising you to complete some online modules on datacamp, covering Python basics
If you didn’t do this or didn’t/couldn’t finish it, you should come back to it today - tutors are here to help you if you get stuck
1.1.5. Do the further exercises in these course notes#
The section “preparatory work” is intended to be completed in the preparatory session (although I realise not everyone will manage this - that is OK, all topics will be revisited in the course)
1.1.6. More practice#
I can’t believe anyone will get this far, but if you do, you can find more coding practice exercises here