pearson_r_test

std.stats.pearson_r_test · Level L5

The 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.

p = I_{1−r²}((n − 2)/2, ½)

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.

xf64[n]yf64[n]Sizen2.0correlationrSubtractnu0.5Multiplyr21.0Reshaper1Multiplya0.0SubtractxrMaximumxbBetaIncpReshapep1Concatoutoutf64[2]
  • 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₁ form to 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.
Accuracy in detail
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

Calls
Called by
—
sha256:6db0f4247152d6905662cda9e6b05433bd5509286b24542ebae9e1b7d606b73d

The 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.

ΣEML 2026

Efficient New Language — a high-density semantic overlay for humans and AI agents.

This site’s demos run on the real EML toolchain, in your browser.

© 2026 EveMissLab (一言諾科技有限公司) / Neo.K. All rights reserved.