From cf33098c914165e0acf1c3c5add7b6902c615b69 Mon Sep 17 00:00:00 2001 From: Dennis Eichhorn Date: Thu, 8 Sep 2022 19:18:41 +0200 Subject: [PATCH] add statistics draft --- math/statistics.md | 80 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 80 insertions(+) create mode 100644 math/statistics.md diff --git a/math/statistics.md b/math/statistics.md new file mode 100644 index 0000000..1b407a5 --- /dev/null +++ b/math/statistics.md @@ -0,0 +1,80 @@ +# Statistics + +## Definitions + +### Range + +```php +ArrayUtils::range($values); +``` + +$$ +range = max(values) - min(values) +$$ + +### Mean (arithmetic) + +```php +Average::mean($values); +``` + +$$ +mean = \frac{1}{n}\sum_{i=1}^{n}a_i +$$ + +## Variable types + +Variables are characteristics (i.e. height, weight) + +### Quantitive + +Quantitative variables represent a measer, they are numeric. + +#### Discrete + +Countable and finite possibilities/results/options. + +#### Continuous + +Not countable and infinite number of possibilities/results/options. + +### Qualitative + +Qualitative variables represent categories/levels, they are not numeric. + +#### Nominal + +Cannot be ordered, they have the same importance/level/value (i.e. hair color). A category can also by yes/no (= two levels). + +#### Ordinal + +Can be ordered, they have different importance/level/value (i.e. risk severity) + +### Transformation + +It is possible to transfrom variables: + +* Continuous to discrete: by removing steps in between (i.e. age only in years) +* Quantitive to qualitive: by asigning numeric ranges a quality (i.e. school grades in pass and fail) + +## Tests + +### Chi-square + +#### Goodness of fit test + +#### Test of independence + +### t-test + +#### One sample + +#### Two samples + +#### Paired samples + +### Correlation + +#### Pearson correlation + +#### Spearman's rank correlation \ No newline at end of file