This is the complete study package for Statistical Methods using Python Programming (STS-105). It is a practical paper with no theory units of its own: the statistics it implements belongs to the other papers, and what it adds is the discipline of building each method from arithmetic rather than calling it.
scipy.stats.ttest_1samp
does not.
For the same methods done with packages — which is what STS-208 and most employment ask for — see Python for Data Analysis.
Every prescribed program, written out and run: matrix arithmetic and exact inverses; four sorts and two searches with their comparison counts; median and mode including the cases a library hides; grouped frequency tables and the grouping error they carry; four moments converted and checked a second way; five distributions generated from a linear congruential stream; binomial, Poisson and negative binomial fitted to one over-dispersed data set; normal, exponential and Cauchy fitted to one grouped one; correlation with both regression lines; seven tests of hypotheses; and both analyses of variance.
REFERENCEThe prescribed objectives, the list of concepts to be covered, and the twelve-item practical list, as printed.
| Program | The theory behind it |
|---|---|
| 1, 2 — matrices, determinant, inverse | Linear Algebra and Linear Models, Unit 1, and the by-hand methods of STS-106 |
| 4, 5, 6 — summaries, moments, shape | Descriptive Statistics |
| 7 — random number generation | Distribution Theory, Unit 1 for the distributions themselves; the inverse transform is the probability integral transform |
| 8, 9 — fitting distributions | Distribution Theory and the goodness-of-fit test of Inferential Statistics |
| 10 — correlation and regression | Statistical Methods, Unit 2 for the correlation coefficient and Unit 4 for the two regression lines, their properties and the angle between them |
| 11 — tests of hypotheses | Inferential Statistics, Units 2 and 3, and Estimation Theory (STS-201) |
| 12 — analysis of variance | Design and Analysis of Experiments, and STS-203 for the two-way case with several observations per cell |
tails.py first. Four of the twelve programs need a
\(t\), \(F\) or \(\chi^{2}\) tail area, and no package may supply one. It is written once on
the practical page and imported thereafter.