Home: Part-I | Home: Part-II | Home: Part-III | Home: Part-IV | Home: BSc | Home: MSc | Curriculum: Current | Curriculum: Archive

*
***************

B. Stat. – 207
Programming with R and Python
Full marks – 100
(Examination 80, Tutorial/Terminal 15, and Attendance 5)
Number of Lectures – Minimum 60
(Duration of Examination: 4 Hours)

****

Aim of this course
This course is designed to provide basic concepts of computer programming with R and Python for statistical analysis of numeric and string data.
Objectives of this course
 » develop the basic concept of programming with R and Python.
 » design an algorithmic solution for a given problem based on R and Python programming codes.
 » write functions with R and Python for statistically analyze real word problems related to numeric and string data.
Learning outcomes of this course
At the end of the course the students will be able to
 » understand foundation concepts, syntax and the process of problem solving using R and Python programming.
 » write programs in R and Python by using basic control structures (conditional statements, loops, switches, branching, functions, etc.)
 » write programs in R and Python for solving real life problems related to big data analytics.
 » build carrier as a data scientist.

***

Course Contents
Introduction to R: R basics, code editors for R, running R programs, R language essentials – Expressions, objects, functions, arguments, vectors, functions that create vectors, matrices and arrays,  factors, lists, data frames, indexing, grouped data, finding help.
Control Structures: Conditional executions, comparison operators, logical operators, if and ifelse statements, loops, for, while and apply loop family, improving speed performance of loops.
Functions: Syntax to define and call functions, Syntax rules for functions, Control utilities for functions: return, warning and stop, function examples.
Basic Plotting: Graphical display of data and probability distributions.
Writing Example Programs: Descriptive statistics, probability and probability distributions, one- and two-sample tests, regression and correlation, and comparison them with the built-in R functions.
Introduction to Python: Learning programming with Python, writing a python program.
Values, Variables, Expressions and Statements:  Integer values, variables and assignment, identifiers, floating-point types, control codes within strings, user input, the eval function, controlling the print function, expressions, arithmetic operators, algorithms.
Conditional Execution and Iteration: Boolean expressions, ehe if and if/else statements, compound Boolean expressions, nested conditionals, multi-way decision statements, conditional expressions, the while statement, definite loops vs. indefinite loops, the for statement, nested loops, abnormal loop termination.
Writing Functions: Function basics, main function, parameter passing, global variables, default parameters, recursion, making functions reusable, documenting functions and modules.
Numeric Python: Basic concept of numpy, array with its operations, vectorized operations, matrix operations, example with univariate and multivariate statistics.
Biopython: Sequence objects, input/output, annotation, pairwise and multiple sequence alignment, accessing BLAST, PSI-BLAST, NCBI’s Entrez databases, Swiss-Prot and ExPASy, example with DNA/RNA/Protein sequences.

***

Main Books Recommended:
1)
Dalgaard, P. (2008). Introductory Statistics with R, 2nd Edition, Springer.
2)
Halterman, R.L. (2011). Learning to Program with Python.
References:
3)
Chang, J. (2008). Biopython Tutorial and Cookbook, http://biopython.org/DIST/docs/ tutorial/Tutorial.html.
4)
Downey, A. (2015). Think Python: How to Think Like a Computer Scientist, Green Tea Press, Needham, Massachusetts.
5)
Duchesnay, E. and Löfstedt, T. (2017). Statistics and Machine Learning in Python.
6)
Everitt, B. and Hothorn, T. (2006). A Handbook of Statistical Analyses Using R. Chapman & Hall/CRC
7)
Lazic, S. E., & H. L. Roche (2012). Introducing Monte Carlo Methods with R. [Robert]
8)
Suess, E. A. and B. E. Trumbo (2010). Introduction to Probability Simulation and Gibbs Sampling with R, Springer. [Kuhlma]