Implement ZTEST: One-Sample t-Test Statistic with validation tests

- Added Ztest class to compute the one-sample t-statistic using sample standard deviation with Bessel correction.
- Implemented validation tests for Ztest to ensure accuracy against manual calculations and PineScript.
- Updated documentation for Ztest, detailing its mathematical foundation, performance profile, and common pitfalls.
- Adjusted NDepend badges to reflect changes in code metrics after implementation.
- Updated missing indicators report to reflect the completion of statistical indicators, including ZTEST.
This commit is contained in:
Miha Kralj
2026-02-16 16:54:36 -08:00
parent 09ffd31a40
commit b3a64f18fa
73 changed files with 13041 additions and 88 deletions
+10 -10
View File
@@ -19,20 +19,20 @@ Statistical tools applied to price and returns. These indicators quantify relati
| [HARMEAN](harmean/Harmean.md) | Harmonic Mean | Reciprocal of arithmetic mean of reciprocals. For rates/ratios. |
| [HURST](hurst/Hurst.md) | Hurst Exponent | Long-term memory. H>0.5: trending. H<0.5: mean-reverting. |
| [IQR](iqr/Iqr.md) | Interquartile Range | P75 - P25. Robust dispersion measure. |
| JB | Jarque-Bera Test | Normality test using skewness and kurtosis. |
| KENDALL | Kendall Rank Correlation | Ordinal association. Robust to outliers. |
| KURTOSIS | Kurtosis | Tail heaviness. High kurtosis = fat tails = more extreme events. |
| [JB](jb/Jb.md) | Jarque-Bera Test | Normality test using skewness and kurtosis. |
| [KENDALL](kendall/Kendall.md) | Kendall Rank Correlation | Ordinal association. Robust to outliers. |
| [KURTOSIS](kurtosis/Kurtosis.md) | Kurtosis | Tail heaviness. High kurtosis = fat tails = more extreme events. |
| [LINREG](linreg/LinReg.md) | Linear Regression | Least squares fit. Outputs slope, intercept, R². |
| [MEDIAN](median/Median.md) | Median | Middle value in sorted window. Robust to outliers. |
| MODE | Mode | Most frequent value. Use for categorical or discrete data. |
| [MODE](mode/Mode.md) | Mode | Most frequent value. Use for categorical or discrete data. |
| [PACF](pacf/Pacf.md) | Partial Autocorrelation Function | Direct correlation at lag k after removing intermediate effects. For AR model identification. |
| PERCENTILE | Percentile | Value below which given percentage of observations fall. |
| QUANTILE | Quantile | Divides distribution into equal probability intervals. |
| [PERCENTILE](percentile/Percentile.md) | Percentile | Value below which given percentage of observations fall. |
| [QUANTILE](quantile/Quantile.md) | Quantile | Divides distribution into equal probability intervals. |
| [SKEW](skew/Skew.md) | Skewness | Distribution asymmetry. Positive: right tail. Negative: left tail. |
| SPEARMAN | Spearman Rank Correlation | Pearson on ranks. Measures monotonic relationship. |
| [SPEARMAN](spearman/Spearman.md) | Spearman Rank Correlation | Pearson on ranks. Measures monotonic relationship. |
| [STDDEV](stddev/StdDev.md) | Standard Deviation | Square root of variance. Same units as data. |
| [SUM](sum/Sum.md) | Rolling Sum | Kahan-Babuška summation. Numerically stable. |
| THEIL | Theil Index | Inequality measure. Decomposable into within/between group. |
| [THEIL](theil/Theil.md) | Theil Index | Inequality measure. Decomposable into within/between group. |
| [VARIANCE](variance/Variance.md) | Variance | Average squared deviation from mean. Units are squared. |
| ZSCORE | Z-Score | Standard deviations from mean. Normalizes different scales. |
| ZTEST | Z-Test | Hypothesis test comparing sample mean to population mean. |
| [ZSCORE](zscore/Zscore.md) | Z-Score | Standard deviations from mean. Normalizes different scales. |
| [ZTEST](ztest/Ztest.md) | Z-Test | One-sample t-test statistic against hypothesized mean. |