Central Limit Theorem
Install and import#
npm install fintech-algorithmsimport { centralLimitTheorem } from "fintech-algorithms/financial-mathematics-statistics-and-data-foundations/sampling-estimation-and-statistical-inference/central-limit-theorem";Signature#
centralLimitTheorem(input)Worked example#
verified This is the worked example published in the article, replayed by the test suite on every run. The output cannot drift.
Input#
{
"sample": [2, 3, 4, 3, 4],
"estimates": [3, 3.1, 3.2, 3.3, 3.4],
"populationMean": 3.2,
"alpha": 0.05,
"mseBenchmark": 0.1,
"nullMean": 3,
"alternativeMean": 3.5,
"practicalThreshold": 0.1,
"comparisons": 5
}Call#
centralLimitTheorem(input)Returns#
object with 2 fields: standardizedMeans, center
{
"standardizedMeans": [
-1.2649110640673535,
-0.6324555320336768,
0,
0.6324555320336739,
1.2649110640673507
],
"center": -1.1546319456101628e-15
}Diagrams#
How it works#
This page states the contract — how to call it correctly. The article explains the concept: why it works, and where it breaks.
References#
- Product and Process Comparisons — NIST/SEMATECH e-Handbook
- Confidence Intervals — NIST/SEMATECH e-Handbook
- Historical-example decision