Week 1 - Part A
Week 1 - Part A
Introduction
Samuel Touchard
1/14
Contact
2/14
Lectures and videos
Notes/slides and video clips will be posted on Moodle at the start of the week.
Videos will be posted on the Echo360 platform, with also a link on the Moodle page.
In these videos, I will go through the slides and/or show examples in R, going line by line and
explaining what I am doing.
This course is based on notes and resources developed by Dr Panayiota Constantinou, Dr Ric
Crossman...
3/14
Admin
Module information:
I Tutorials/Practicals: There are 4 lab sessions in term 2 and 4 lab sessions in term 3 (8
in total).
Questions will be uploaded on the module webpage the Friday before the lab session and
solutions the Friday after the lab session (exceptions are lab 3 and lab 6).
Note: lab 1 takes place in week 7 (week beginning 22nd Feb).
I Assessment:
70% two-hour summer exam (open-book)
30% assessed work: lab 3 and lab 6 (15% each)
Lab 3: Will be uploaded on Moodle on Friday 5th March (week 8) with a deadline at
11am on Thursday 18th March (week 10).
Lab 6: Will be uploaded on Moodle on Friday 30th April (week 1) with a deadline at
11am on Thursday 13th May (week 3).
Both projects will be submitted electronically on moodle.
4/14
This module
The Statistical Laboratory lectures aim to introduce students to the R software package,
making use of it for exploratory data analysis and simple simulations.
Content:
1. Introduction to R.
2. Exploratory data analysis: methods of visualisation and summary statistics.
3. Sampling from standard discrete and continuous distributions (Bernoulli, Geometric,
Poisson, Gaussian, Gamma).
4. Generic methods for sampling from univariate distributions.
5. The use of R to illustrate probabilistic notions such as conditioning, convolutions and the
law of large numbers.
6. Examples of modelling real data (but without formal statistical inference) and the use of
visualisations to assess fit.
5/14
Some advice
Here are some tips for making the most of the course:
6/14
Sources and recommended textbooks
7/14
Sources and recommended textbooks
Do not forget the Internet! There are a huge number of online resources available: forums,
examples, archives and documentation... If you get stuck, try searching for answers online.
7/14
Warwick resource
Moodle course ”Basic R with pointers”
https://moodle.warwick.ac.uk/course/view.php?id=41822
8/14
Warwick resource
Moodle course ”Basic R with pointers”
9/14
What is R?
R is a programming language and free software environment for statistical computing and
graphics supported by the R Foundation for Statistical Computing.
Popularity: As of February 2021, R ranks 11th in the TIOBE index (a measure of popularity of
programming languages).
Website:
https://cran.r-project.org/
10/14
Using R
There are various interfaces for using R that you can choose from. However, I strongly
recommend one of these two options:
I RStudio: Powerful, well thought out and widely used, works on all major operating
systems. Getting better all the time. Available at https://www.rstudio.com.
I R GUI (Windows, OS X): Simple, robust, effective. (Personal habits got me stuck to that
one!)
11/14
R Gui
12/14
R Studio
13/14
R Studio
I Console (bottom left): where the code, either run or directly typed, is executed.
I Source (top left): where you create your scripts and write your code.
I Environment (top right): all the objects you create will appear in here.
I Files/Plots/Packages/Help/Viewer(bottom right): where you can get help (probably the
most useful function in R!), view your created plots...
14/14