Further Exercises
Contents
12. Further Exercises#
12.1. Section 1#
12.1.1. Exercise 1#
Using NumPy, generate a sequence of 2d points drawn uniformly from the unit square.
12.1.2. Exercise 2#
Create a square array containing the distances between all possible pairs of points you generated in Exercise 1.
12.1.3. Exercise 3#
Use your solution to Exercise 2 to find the nearest neighbouring point for all the points you generated in Exercise 1.
12.1.4. Exercise 4#
For a 1000 points how long would it take to repeat Exercises 1, 2, and 3 1000 times ?
12.1.5. Exercise 5#
Generate two samples from a normal distribution using NumPy. Use different parameters for each distribution.
12.1.6. Exercise 6#
Find a suitable test in scipy.stats to see if the data you obtained in Exercise 5 is drawn from the same distribution.
12.1.7. Exercise 7#
Same as exercise 7, but use a non parametric test.
12.1.8. Exercise 8#
Draw data from mutiple normal distributions and bin them into small squares on a grid of your choosing.
12.1.9. Exercise 9#
Use your data from Exercise 8 to create an annotated heatmap simialr to that in the plotnine gallery.