## Stochastic Processes: Data Analysis and Computer Simulation †

### About the course †

**Course Number**-
- 009x

**Brief Description**-
- The course deals with how to simulate and analyze stochastic processes, in particular the dynamics of small particles diffusing in a fluid.

**Full Description**-
- The motion of falling leaves or small particles diffusing in a fluid is highly stochastic in nature. Therefore, such motions must be modeled as stochastic processes, for which exact predictions are no longer possible. This is in stark contrast to the deterministic motion of planets and stars, which can be perfectly predicted using celestial mechanics. This course is an introduction to stochastic processes through numerical simulations, with a focus on the proper data analysis needed to interpret the results. We will use the Jupyter (iPython) notebook as our programming environment. It is freely available for Windows, Mac, and Linux through the Anaconda Python Distribution. The students will first learn the basic theories of stochastic processes. Then, they will use these theories to develop their own python codes to perform numerical simulations of small particles diffusing in a fluid. Finally, they will analyze the simulation data according to the theories presented at the beginning of course. At the end of the course, we will analyze the dynamical data of more complicated systems, such as financial markets or meteorological data, using the basic theory of stochastic processes.

**What You¡Çll Learn**-
- Basic Python programming
- Basic theories of stochastic processes
- Simulation methods for a Brownian particle
- Application: analysis of financial data

**Learner Testimonial**-
- None

**Course Dates**-
- Starts on 30 March, 2017

**Course Length**-
- 6 weeks

**Estimated Effort**-
- 2-3 hours per week

**Prerequisites**-
- Basic mathematics expected of a 2nd year undergraduate student (differential and integral calculus and linear algebra).

**Language**-
- Content: English
- Videos: English

**Course Level**-
- Intermediate

**Certificate Type and Price**-
- TBA

**XSeries**-
- No

**Course Staff**-
**Ryoichi Yamamoto**- Ryoichi was born in Ishikawa Prefecture, Japan in 1965. He obtained his B. Eng. (1988) and M.Eng. (1992) degrees from Kobe University and Ph.D. (1996) degree from Kyoto University. He was a research associate at Kobe University (1994--1996), a research associate (1996–-1999) and a lecturer (2000--2004) at the Department of Physics, Kyoto University, an associate professor at the Department of Chemical Engineering, Kyoto University (2004--2008). Since 2008, he has been a professor there. He works on dynamical problems of soft matters (complex fluids, glasses, polymers, and colloids) and active matters (micro-swimmers and cells) by developing and using novel methods of computer simulations suitable for those systems.

**John J. Molina**- John was born in Bogota, Colombia in 1983. He obtained his B. Sci. from the Andes University (2007), M. Sci. from the ENS-Lyon (2008), and Ph.D. from the University of Paris 6 - UPMC (2011). He joined Kyoto University as a research fellow in 2011, and since 2014 he is an assistant professor in the Department of Chemical Engineering. He is focused on studying the dynamics of soft-matter systems using computer simulations.

- Areas of Expertise:
- Soft Matter Science
- Computational Science
- Transport Phenomena

- Major Works:
- Hydrodynamic interactions of self-propelled swimmers, John J. Molina, Yasuya Nakayama, and Ryoichi Yamamoto.
- Dynamics of Highly Supercooled Liquids; Heterogeneity, Rheology, and Diffusion, Ryoichi Yamamoto and Akira Onuki.

- Connect:

### Trailers †

### Lecture contents †

**How to follow each Part**- Download all files (must do for each week) [ github ] -> "Clone or download" -> "Download ZIP" -> Extract the downloaded zip in your local working directory to create all necessary files for that week. Be careful of overwriting the files used in previous weeks.

- Method 1 (easier)
- You can start the downloaded jupyter notebooks in your web browser by simply typing the following command, where #1 and #2 represent the week and part numbers you are following.
jupyter notebook 009x_#1#2.ipynb

- Then watch the corresponding video.

- You can start the downloaded jupyter notebooks in your web browser by simply typing the following command, where #1 and #2 represent the week and part numbers you are following.

- Method 2 (harder but more useful to learn programming)
- You can start a new blank jupyter notebook by typing the following command before watching each video.
jupyter notebook

- Refer to one of the Notebooks provided via nbviewer and github while watching the video. You can find the links to the Notebooks under each video.
- Then you can type the code and commands (or copy and paste from the Notebook to the corresponding cells) directly in the blank jupyter notebook to reproduce the code presented in class.

- You can start a new blank jupyter notebook by typing the following command before watching each video.

**Week1: Python programming for beginners**

**Week2: Distribution function and random number**

- 2. Generating random numbers with Gaussian/binomial/Poisson distributions [ Notebook: nbviewer / github / pdf ]

**Week3: Brownian motion 1: basic theories**

**Week4: Brownian motion 2: computer simulation**

- 1. Random force in the Langevin equation [ Notebook: nbviewer / github / pdf ] [ Supplemental_note_4-1: pdf ]

**Week5: Brownian motion 3: data analyses**

- 1. Distribution and time correlation [ Notebook: nbviewer / github / pdf ] [ Supplemental_note_5-1: pdf ]

**Week6: Stochastic processes in the real world**

- Download simulation results to be performed in 6-2, 6-3, and 6-4, and Stock price data used in 6-4 [ github ] -> Download -> Extract in your local working directory to create 4 ".txt" and 2 ".csv" files.

### Useful Information †

- Download Python and set up a programming environment on your [Windows/Mac/Linux] PC [
**Go**]

- Python 3 official documentation [
**Go**]

- Jupyter official website [
**Go**]

- Related online resources

- edX "Introduction to Computer Science and Programming Using Python" [
**Go**]

- What I have done to make my slide presentations

- Install anaconda "Anaconda3-4.4.0-MacOSX-x86_64.pkg" downloaded from https://repo.continuum.io/archive/ .
- Install RISE (v.5.0.0) by following the instructions found in https://github.com/damianavila/RISE .
conda install -c damianavila82 rise

- Install notebook extensions by following the instructions found in http://qiita.com/Tsutomu-KKE@github/items/1326e05eb992a8aa849d . Then you can use a spell checker etc...
conda install -y -c conda-forge jupyter_contrib_nbextensions

- Install additional packages
conda install -c menpo ffmpeg conda install pandas-datareader

- Update all packages
conda update conda conda update anaconda

- Modified "~/.jupyter/jupyter_notebook_config.py" by nu-commenting the following line
c.NotebookApp.browser = u'Safari'

- Launch *.ipynb using Safari, display full screen, click the "RISE presentation icon"