Probability
Probability#
Probability is the study of random events. Computers are particularly helpful here as they can be used to carry out a number of experiments to confirm and/or explore theoretic results.
In practice studying probability will often involve measuring:
expected chances of an event occurring;
the conditional chances of an event occurring given another event occurring.
Here you will see how to instruct a computer to sample such events.
Important
In this chapter you will cover:
Generating random numbers.
Randomly sampling from a given collection of items.
Write python functions to be able to repeat experiments.