Welcome to the pre-material of the MSc Translational Neuroscience! The aim of the material is to introduce you to programming in Python and to statistics. If you have already experience with programming and/or statistics, then this will be only an easy review. If not, it will give you the necessary foundation to be able to complete smooothly the modules in the MSc.
Read the instructions carefully before starting the lectures
You are expected to go trough the material in the following order:
-
Statistical theory: we prepared for you an overview of the main statistical tests and concepts. You should go through the Blackboard stats refresher as first task. In addition to the stats refresher, you will have access to more detailed stats material that you can use for reference if you need to, as well as a decision tree that directs you towards the most appropriate statisticals test to use based on your research question and data types
You can access the stats refresher at this link - to access you need to use your Imperial Email
IMPORTANT: to be able to complete the last day of the Python lectures (Lecture10 on statistics), you must have completed the stats refresher. You can work on the the other 9 coding lectures in parallel with the statistical theory, if you prefer.
-
Device set-up: there are two documents called
Setup-WindowsandSetup-Mac. Follow the instructions in the document that correspond to your operative system. If you have any questions about the set-up specifically, you can join the drop-in session with Dragos and Valentina on Thursday 6th of October from 4.30PM to 5.30PM -
Introduction to Python: we prepared 10 separate lectures on the most important concepts of programming in Python. The lecture are called LectureN (where N correspond to the number of the lecture) and are already in the order in which you should complete them.
IMPORTANT: don't skip lectures, but do follow the order we provided, because following lectures are based on previously taught material.
IMPORTANT 2: The lecture are characterised by a combination of pratical theory and code here sections. The code here sections require you to apply what you have learnt in the lectures through small exercises.
A summary of the lectures' topics is provided in the following Table.
Lecture Title Topic Lecture1 Introduction to Python syntax and variables - Jupyter Notebook
- Introduction to Bash
- Variables
- Common Python Erros
- Relational Operators
- Logical Operators
- Working with Files
- Introduction to python scripts
- Debugging
Lecture2 Introduction to Functions - Structure and application of functions
Lecture3 Introduction to Lists and Arrays - Importing Modules
- Extract elements from lists
- Lists update
- Basic operations with lists
- Extract elements from arrays
- Arrays dimentions and shapes
- Generation of arrays
- Mathematical operations with arrays
Lecture4 Introduction to Conditional Statements - Conditional statements structure and application
- Truthiness and conditional statement
Lecture5 introduction to Loops - Introduction to for loops
- Looping over lists
- Looping over strings
- Range function
- Enumerate function
- Continue and break
- Nested loops
- Introduction to While
Lecture6 Introduction to Strings manipulation - Indexing and iterating through strings
- String methods
- Cleaning messy strings
Lecture7 Introduction to Dictionaries - Dictionary methods
- Iterating through dictionaries
Lecture8 Introduction to Dataframes - Create dataframes
- Visualize dataframes
- Get information about dataframes
- Access and update data
- Detection and removal of missing values
- Replacement of wrong data
- Detection and removal of duplicates
- Merging of dataframes
Lecture9 Introduction to plotting - Scatterplots
- Histograms
- Barplots
- Boxplots
- Pie charts
- Subplots
Lecture10 Introduction to Summary Statistics and Hypothesis Testing - Summarising numerical data
- Summarising Categorical Data
- Hypothesis testing and statistical tests
- Correlation analysis
- Linear Regression
- One-way Anova
-
Exercises: when you completed both the statistical theory and the programming lectures, you can continue to complete the 5 exercises that we have prepared for you. The exercises require you to know everything we have mentioned in the lectures (both programming and statistics) and consist in analysing and preparing some real-data on cognitive behaviour, as well as solving some coding exercises. We suggest you to solve each exercise in a separate
Jupyter Notebook.IMPORTANT: In the week between the 10th and 16th of October, we will open a
Q&AChannel on teams, where you will be able to post questions about the lectures and the exercises. TheQ&Awill remain open for ONE WEEK. During this week, you have the opportunity to ask all the questions you might have. At the end of the week, we will reply to all the questions in the cannel. If we believe that one question might require longer explanations, we will schedule calls with all the students that are facing the same issues.