pearson_r_test
std.stats.pearson_r_test · Level L5The test of a Pearson correlation against zero: [r, p], with the two-sided p from Student's t with ν = n − 2. Since ν/(ν + t²) = 1 − r² for t = r·√(ν/(1 − r²)), the p-value is I_{1−r²}((n − 2)/2, ½) directly. Calls correlation.
Signature
pearson_r_test(x: f64[n], y: f64[n]) → f64[2]
Requires: n ≥ 3
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 n ≥ 3.
- Agrees with the reference
r exactly; t = r·√(ν/(1 − r²)); p through the t CDF's ₂F₁ formto 80 digits (100-digit arithmetic), on all 40 test cases. - All 80 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)
- 34%
- bit-equal to the NumPy formula in float64
- 56%
- largest error, in units in the last place
- 73
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.
Identity
sha256:6db0f4247152d6905662cda9e6b05433bd5509286b24542ebae9e1b7d606b73dThe semantic hash of the graph. It changes when the program changes, and never when only its documentation does.
Control handle
- Symbol
- Ω:std.stats.pearson_r_test · Ω:pearson_r_test
- Pins
sha256:0e0b28f4bfdfcb77710fd92c9945a38606b18e221d90ab43a940b2f41abe37c5this graph and the 4 it reaches through calls- Evidence
sha256:99173d52539f553374cbed841f85a7571a7b574df51d1a5a480ec84685edbe63the 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.