Skip to the content

Source document. This page reproduces the syllabus this course was written to, as published — its semesters, credits and paper numbers are that document’s, not this site’s. The course itself is studied on its own, in any order.

Course Overview

TitleComputational Statistics & R Programming
Theory Credits3 (3 hrs/week)
Practical Credits1 (2 hrs/week)
Pre-requisiteDescriptive Statistics; Inferential Statistics; basic familiarity with a computer

Learning Outcomes

After learning this course the student will be able to:

  1. Be comfortable using commercial and open-source tools such as the R language and its libraries for data analytics and visualisation.
  2. Analyse real-time problems using R.
  3. Use basic R data structures to load, clean and pre-process data.
  4. Do exploratory data analysis on real-time datasets.
  5. Understand and implement linear regression.
  6. Use lists, vectors, matrices, data frames, etc.

Theory — Five Units

Unit 1: Computer Basics

Basic applications of computer; components of a computer system; Central Processing Unit (CPU); input and output units; computer memory and mass storage devices; programming languages and their applications; concept of files and folders; software and types of software; operating systems like Windows and Linux.

Open Unit 1 study material →

Unit 2: Data Processing

Data processing using spreadsheets — data entry and editing features in Excel; copy, paste, paste-special options; sort and filter options; AutoSum; finding average and standard deviation using statistical functions; matrix operations (transpose, multiply, inverse) using Excel functions; simple graphs (bar, line, pie) in Excel; exporting Excel output to MS-Word and PowerPoint.

Open Unit 2 study material →

Unit 3: Statistical Analysis in Excel

Scatter diagram; fitting of straight line, polynomial and power curves using Excel; reading \(R^2\) value and equation from the graph; predicting future values using FORECAST and TREND functions; Data Analysis ToolPak and its features; performing Student's t-test and one-way ANOVA using the ToolPak; the \(p\)-value and its interpretation.

Open Unit 3 study material →

Unit 4: R Programming

Introduction to R; features of R; environment and RStudio; basics of R — assignment, modes, operators, special numbers, logical values, basic functions, R help functions, R data structures, control structures. Vectors: definition, declaration, generating, indexing, naming, adding & removing elements, operations, recycling, special operators, vectorised if-then-else, vector equality, functions for vectors, missing values, NULL values, filtering & subsetting.

Open Unit 4 study material →

Unit 5: Matrices, Data Frames & EDA

Matrices — creating matrices, adding/removing rows & columns, operations. Creating data frames — naming, accessing, adding, removing, applying special functions, merging data frames; factors and tables. Exploratory Data Analysis — descriptive statistics, central tendency, variability, mean, median, range, variance, summary, handling missing values and outliers, normalisation. Data visualisation in R — types of visualisations, packages, basic and advanced visualisations, creating 3-D plots.

Open Unit 5 study material →

Practical — List of Exercises (11)

  1. Installing R and RStudio.
  2. Create a folder DS_R, make it the working directory, and display the current working directory.
  3. Installing the "ggplot2", "caTools", "CART" packages.
  4. Load the packages "ggplot2", "caTools".
  5. Basic operations in R.
  6. Working with vectors: create v1 (1–20); add 2 to each; divide each by 5; create v2 (21–30); add v1 to v2.
  7. Create a 5×5 distance matrix M and find the pair of cities with the shortest distance.
  8. Marks of 6 students (2 sections, 3 subjects): create a data structure; display marks & totals; highest total per section; add a new subject.
  9. Three people buying 4 commodities in 2 shops: create price & demand matrices; total cost per person per shop; suggest the cheaper shop.
  10. Apply summary() to find mean, median, standard deviation, etc.
  11. Implement visualisations — bar, histogram, box, line, scatter plot, etc.

Open the practical course study material →

Text Books & References

  1. Chambers, J. (2008) — Software for Data Analysis: Programming with R, Springer.
  2. Crawley, M. J. (2017) — The R Book, John Wiley & Sons.
  3. Matloff, N. (2011) — The Art of R Programming, No Starch Press.
  4. Mark Gardener (2012) — Beginning R: The Statistical Programming Language, John Wiley & Sons.
  5. Purohit, Gore & Deshmukh (2008) — Statistics Using R, Narosa.
UnitTopicApprox. Weightage
1Computer Basics15%
2Data Processing in Excel20%
3Statistical Analysis in Excel20%
4R Programming — Basics & Vectors25%
5Matrices, Data Frames & EDA20%