# Math and Statistics The last chapter (and possibly the least popular part of the course) is about using Python for math. It is here mainly because Python is very popular in scientific computation, aka number crunching (with ‹numpy› and ‹scipy› doing all the heavy lifting there), and in data science (mainly with ‹pandas›). It is also a gateway to more advanced statistics that is also very often driven by Python scripts (think machine learning). All in all, getting a feel for using the big toys cannot hurt, even if the math perhaps does, a little. NB. For exercises in this chapter, you need ‹numpy ≥ 1.22›, ‹pandas› and ‹pandas-stubs ≥ 2022.2›. Demonstrations: 1. (to be done) Practice exercises: 1. ‹linear› – matrices warmup 2. ‹volume› – polyhedron volume 3. ‹signal› – generating sine waves 4. ‹stats› – simple stats with pandas 5. ‹outliers› – dealing with irregularities in data 6. ‹student› – the t-test Regular exercises: 1. ‹hist› – drawing histograms with ASCII art 2. ‹dft› – discrete Fourier transform 3. ‹null› – the null space of a matrix 4. ‹frames› – slicing and dicing pandas dataframes 5. ‹regress› – linear regression, with outliers 6. ‹anova› – TBD analysis of variance Voluntary exercises: 1. (nothing here yet)