Dependence, Regression, and Model Foundations
10 algorithms in Financial Mathematics, Statistics, and Data Foundations · 10 with asserted arithmetic.
In this family#
-
Scatter Plots, Association, and Nonlinear Patterns verified
Pairs
input.xandinput.yinto plottable points and reports the Pearson correlation over them along with its sign.scatterPlotsAssociationAndNonlinearPatterns(input) -
Sample Covariance Calculation and Interpretation verified
Computes the sample covariance between
input.xandinput.yusing the n-1 denominator, and reports which way the two series move together.sampleCovarianceCalculationAndInterpretation(input) -
Pearson Correlation Calculation and Interpretation verified
Computes the Pearson correlation between
input.xandinput.yand its absolute value as a sign-free strength score.pearsonCorrelationCalculationAndInterpretation(input) -
Spearman Rank Correlation and Kendall Tau verified
Replaces
input.xandinput.ywith their ranks, averaging ranks across ties, then reports the Spearman correlation of those ranks and Kendall's tau-a from the concordant and discordant pair counts.spearmanRankCorrelationAndKendallTau(input) -
Correlation, Causation, Confounding, and Spurious Relationships verified
Contrasts the pooled correlation of
input.xandinput.ywith the correlation recomputed inside each label ininput.groups, which is where a confounded or reversed relationship shows itself.correlationCausationConfoundingAndSpuriousRelationships(input) -
Simple Ordinary Least Squares Regression verified
Fits a single-predictor ordinary least squares line of
input.yoninput.xand returns the fitted coefficients with the in-sample fitted values.simpleOrdinaryLeastSquaresRegression(input) -
Intercepts, Slopes, Coefficients, and Predictions verified
Fits the least squares line of
input.yoninput.xand evaluates it at one new predictor value,input.predictX.interceptsSlopesCoefficientsAndPredictions(input) -
Residuals, MAE, MSE, and RMSE verified
Returns the least squares residuals of
input.yoninput.xtogether with the three usual summaries of their size.residualsMaeMseAndRmse(input) -
R-Squared and Adjusted R-Squared verified
Reports the share of the variation in
input.ythat the least squares fit oninput.xaccounts for, and the same figure adjusted for the one estimated slope.rSquaredAndAdjustedRSquared(input) -
Regression Assumptions, Heteroskedasticity, and Multicollinearity verified
Runs three diagnostics on the least squares fit of
input.yoninput.x: the mean residual, a correlation between fitted values and absolute residuals standing in for non-constant error variance, and the correlation withinput.otherPredictorstanding in for collinearity.regressionAssumptionsHeteroskedasticityAndMulticollinearity(input)
What they share#
Every topic here is a record-transform, so once you have
called one the rest follow the same shape. Import paths differ only in the final segment:
import { scatterPlotsAssociationAndNonlinearPatterns } from "fintech-algorithms/foundations/dependence-regression-and-model-foundations/scatter-plots-association-and-nonlinear-patterns";
import { sampleCovarianceCalculationAndInterpretation } from "fintech-algorithms/foundations/dependence-regression-and-model-foundations/sample-covariance-calculation-and-interpretation";Read them in the order above — the sequence is pedagogical, not alphabetical.
Where this sits#
Financial Mathematics, Statistics, and Data Foundations collects 120 algorithms across 12 families. For the concept behind this family rather than the call signatures, see the concept guides.