welch_t_test
std.stats.welch_t_test · Level L5Welch's two-sample t-test, without assuming equal variances: [t, ν, p] with t = (x̄ − ȳ)/√(sₓ²/n + s_y²/m), ν from the Welch–Satterthwaite formula, and the two-sided p = I_{ν/(ν+t²)}(ν/2, ½).
Signature
welch_t_test(x: f64[n], y: f64[m]) → f64[3]
Requires: m, n ≥ 2
Structure
The function as NOVA stores it: one box per input, operation and output, and arrows that carry values. A double border marks another library function this one runs — called once, or by Scan once per element; select it to open that function.
- input
- operation
- constant
- call
- output
Verification
- Signature proven by NOVA’s shape solver, for every size with m, n ≥ 2.
- Agrees with the reference
t and ν exactly; p through the t CDF's ₂F₁ formto 80 digits (100-digit arithmetic), on all 40 test cases. - All 120 float64 results inside the running error bound; the closest uses 10% of it.
- Interpreter and NumPy backend return bit-identical results.
- correctly rounded (the float64 nearest the exact value)
- 39%
- bit-equal to the NumPy formula in float64
- 96%
- largest error, in units in the last place
- 33
Large ulp counts appear where a result is tiny next to the numbers it is computed from (after cancellation, for example), so one unit in the last place is tiny too; the absolute error is still inside the bound. Results within their own error of zero are not counted.
Note
ν is usually not a whole number; the p-value is the t distribution's at that ν. The reference uses the CDF's hypergeometric form, a different special function from the graph's incomplete beta.
Identity
sha256:9f03b87531975582cd1f13dcbac797124627c4052f25da7c8113008fd58cac08The semantic hash of the graph. It changes when the program changes, and never when only its documentation does.
Control handle
- Symbol
- Ω:std.stats.welch_t_test · Ω:welch_t_test
- Pins
sha256:0d0d708982dddd57ac77cbc56ed5b29d37f851fdd3fb8c057735babd25a15188this graph and the 2 it reaches through calls- Evidence
sha256:e9ad73b84f17b6f4a570d060d0ed959700f11cd5071627d302741008802cda64the hash of its verification record- Needs
- no capability: a pure function
Through NOVA’s control layer, the symbol launches this function only while the program still matches what it pins: a change to this graph, or to any graph it reaches, needs a migration first.