# Sampling and Monte Carlo Simulation « Previous | Next »

## Session Overview This lecture starts with some examples of how to use pylab's plotting mechanisms. It then returns to the topic of using probability and statistics to derive information from samples.

## Session Activities

### Lecture Videos

Topics covered: Plotting, randomness, probability, Pascal's algorithm, Monte Carlo simulation, inferential statistics, gambler's fallacy, law of large numbers.

## Check Yourself

In general, one cannot add probabilities.

What is a Monte Carlo simulation?

A simulation which arrives at an approximation of a probability by running many, many trials.

What is the guiding principle of inferential statistics?

A random sample tends to exhibit the same properties as the population from which it is drawn.

What is the law of large numbers (a.k.a. Bernoulli's Law)?

The law of large numbers basically says that using more test cases in a simulation involving randomness will increase our confidence in its results.

What is the gambler's fallacy?

The belief that random numbers will even out constantly (e.g. that after a string of heads, it's “time for” the coin to come up tails.)

## Problem Sets

### Problem Set 6: Simulating Robots (Due)

In this problem set you will practice designing a simulation and implementing a program that uses classes.

### Problem Set 7 (Assigned)

Problem set 7 is assigned in this session. The instructions and solutions can be found on the session page when it is due, Lecture 16 Using Randomness to Solve Non-random Problems.

## Further Study

These optional resources are provided for students that wish to explore this topic more fully.