simulation
Mathematical Programming with Python
https://people.sc.fsu.edu/~jburkardt/classes/...
python_2025/simulation/simulation.html
simulation:
using the numpy.random.choice() function to simulate a number of
systems involving a probabilistic element. By repeating an experiement
many times, we can estimate the mean and standard deviation.
In some cases, a histogram can also help us understand the results.
Lecture notes:
-
draw_one.py,
keep drawing from a deck (with replacement) until you get a particular card.
-
draw_all.py,
keep drawing from a deck (with replacement) until you
have seen every card.
-
fly_in_a_maze.py,
follow a fly's random walk through a maze.
-
weather.py,
how long til Pittsburgh gets a work week with at least
four sunny days?
Last revised on 19 February 2025.