Developer-Guide/math/statistics.md

1.3 KiB

Statistics

Definitions

Range

ArrayUtils::range($values);

range = max(values) - min(values)

Mean (arithmetic)

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