Join free to take this lesson
Anyone can look around, but taking a lesson needs a free account. With one, your answers are checked step by step and your progress is saved, so you can stop and pick up where you left off on any device.
11 steps ยท about 25 min
By the end you can
- Make N random numbers between 0 and 1 with rng.random(N), and between a and b with rng.uniform(a, b, N)
- Say why a program with a seed prints the same number every time it runs
- Count how many numbers pass a test with np.sum(u < p)
- Estimate a probability as the fraction of tries in which something happens
Who it is for: Anyone who has done units 1-16 of this course (or skipped units 1-4), in particular lesson 9.2 (random numbers with a seed), and physics unit 1.
The steps
- Numbers between 0 and 1
- Ten numbers
- The seed, once more
- A thousand numbers
- Between a and b
- Random places on a bench
- Probability: a fraction of tries
- How often below p?
- Fewer tries
- Why 0.3?
- A fraction of tries
Discussion 0 comments
Log in to join the discussion.