Introduction to Statistical Computing¶

-- with R and Python

Feng Li

School of Statistics and Mathematics

Central University of Finance and Economics

feng.li@cufe.edu.cn

https://feng.li/statcomp

The Evolution of Statistical Computing¶

image

Contents of this course¶

  • Part I: Introduction to R/Python
  • Part II: Statistical optimization and simulation
  • Part III: Topics in Matrices and Data Mining

Pick up right tools¶

  • R is built by statisticians and leans heavily into statistical models and specialized analytics. Data scientists use R for deep statistical analysis, supported by just a few lines of code and beautiful data visualizations.

  • Python is a multi-purpose language, much like C++ and Java, with a readable syntax that is easy to learn. Programmers use Python to delve into data analysis or use machine learning in scalable production environments.

  • What shall I do: Pick up the right tool as you need.

Setup the environment¶

Installing R¶

  • Installing R on your own computer is simple and free.

    • If you use Microsoft Windows or macOS, visit http://www.r-project.org/. It shipped with a simple graphical user interface (GUI).

    • If you use Linux, search the phrase “r-cran” in your system’s software repository. Any text editor can be used to edit R source code.

    • RStudio is a good GUI front end for R on all platforms. https://posit.co/download/rstudio-desktop/ .

Installing Python¶

  • Anaconda is popular open-source Python distribution. Download and install at https://www.anaconda.com/products/distribution .

Resources¶

  • We will cover some major R programming aspects in the first few lectures.

  • We also use Python and we assume you have some basic knowledge of it. If you need additional training, visit my Python course home page at https://feng.li/teaching/python/ .

  • Online course book (in Chinese) is available at https://feng.li/files/statscompbook/ .

Don’t worry and it’s fun!¶