# lecture02 - CS357#2 Objectives 1 Design a numerical...

This preview shows pages 1–7. Sign up to view the full content.

CS357 #2

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
Objectives 1. Design a numerical experiment in Python+numpy+scipy 2. Write efficient Python+numpy by avoiding loops 3. Study how arrays of data scale in Python 4. Observe the limits of precision
1. An experiment Brownian motion Brownian motion is the random motion of particles suspended in a fluid (a liquid or a gas) resulting from their collision with the quick atoms or molecules in the gas or liquid. The term "Brownian motion" can also refer to the mathematical model used to describe such random movements, which is often called a particle theory. -Wikipedia x ( t + Δ t ) = x ( t ) + N (0 , σ 2 Δ t ; t, t + Δ t ) update particle position random amount

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
1. An experiment Brownian motion x ( t + Δ t ) = x ( t ) + N (0 , σ 2 Δ t ; t, t + Δ t ) mean variance independence
1. An experiment Write an algorithm! How does the distance from the origin depend on n, the number of steps? Is our algorithm efficient? Can we repeat the algorithm?

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
2. Loops Is Python slow?
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

### What students are saying

• As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

Kiran Temple University Fox School of Business ‘17, Course Hero Intern

• I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

Dana University of Pennsylvania ‘17, Course Hero Intern

• The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

Jill Tulane University ‘16, Course Hero Intern