Algorithms
GENERAL NOTATION
Notation | Description |
---|---|
`n` | Total records (items) |
`X_i` | Value of `i`th item of `X` |
`Y_i` | Value of `i`th item of `Y` |
`w_i` | Weight of `i`th item |
`N` | Total of frequency |
`R(X)_i` | Corresponding rank for `X_i` |
`\barX` | Mean of `X` [?] |
`\text{VAR}(X)` | Variance of sample for `X` [?] |
`\text{VAR}_p(X)` | Variance of population for `X` [?] |
`\text{SD}(X)` | Standard Deviation of sample for `X` [?] |
`\text{SD}_p(X)` | Standard Deviation of population for `X` [?] |
`\text{COV}(X, Y)` | Covariance of sample for `X` and `Y` [?] |
`\text{COV}_p(X, Y)` | Covariance of population for `X` and `Y` [?] |
-
HISTOGRAM'S NUMBER OF BINS
Square-root choice:
`k = \ceil{ \sqrt{N} \ }`
Sturges' formula:
`k = \ceil{ \log_2 N } + 1`
Rice rule:
`k = \ceil{ 2N^(1/3) }`
-
Q-Q PLOT
Fractional Ranks:
`f r_\text{dist}(X_i) = (R(X)_i - 3/8) / (n + 1/4)` (Blom, 1958)
Scores:
`a_\text{dist}(X_i) = F_\text{dist}^(-1) (f r_\text{dist}(X_i))`
where `F_\text{dist}^(-1)` is the inverse cumulative specified distribution function.
Plot:
`(X_i, a_\text{dist}(X_i)) \qquad\quad i = 1, 2, ..., n`
-
PEARSON CORRELATION
`r_{xy} = {\text{COV}(X, Y)} / {\text{SD}(X) \ \text{SD}(Y)}`
Significance level for `r_{xy}` is based on
`t = r_{xy} \sqrt{(N-2)/(1-r_{ij}^2)}`
which, under the null hypothesis, is distributed as a `t` with `N-2` degrees of freedom.
-
SPEARMAN'S RANK CORRELATION
Coming soon...
-
ONE-SAMPLE T TEST
Coming soon...
-
ONE-WAY ANOVA
Coming soon...
-
F TEST
Coming soon...
-
LINEAR REGRESSION
Coming soon...