Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

name: op-test-bartlett-sphericity
description: Bartlett's sphericity test on a vector's correlation matrix (is it the identity?); the factorability check, bit-equal to the PCA operator's Bartlett scalars.
kind: operator
category: TEST
operator: TEST_BARTLETT_SPHERICITY
type: reference
applies_to: process, compose, predict
examples_tags: [hypothesis-test, tier-1-test, parametric, multivariate, streaming-friendly]

Tests emit statistic / p-value; no Response.Components.

Use when

Checks whether a set of numeric fields are related at all, the first check before summarising them as a few underlying dimensions.

Questions it answers:

  • Do the ten satisfaction items move together enough to be worth reducing to a few scores?
  • Are these sensor readings related at all, or is each one independent noise?

Use something else:

  • MAT_CORRELATION when you want how strongly each pair is related.

Params

  • alpha — float, default 0.05. missing — listwise only.

Slot: exactly one of vector (a vectors entry) / fields, ≥ 2 members; no field, vector2 / fields2 or split_by.

  • weight — both kinds; N* = Σw or n_eff.

Inputs

Members: u4…u64, f32/f64.

Output

Statistic = χ² = −ln|R|·(N* − 1 − (2p + 5)/6), DF = p(p − 1)/2, PValue. Details: members, n, n_dropped, determinant (|R|).

Reading the output

  • statistic: A chi-square that grows as the fields’ correlations move away from all zero; a small p-value says the fields are related enough to summarise as fewer dimensions.
  • p_value: a p-value. Below alpha (0.05 unless the request sets another) the result is called significant; that is not the same as important, so read the effect size for how big it is.
  • details.determinant: The determinant of the correlation matrix, 1 when the fields are uncorrelated and near 0 when they are strongly related; the statistic grows as it shrinks.

Gotchas

  • Streamable. Same rows ⇒ same bits as the PCA operator’s Bartlett scalars (MAT_PCA).
  • Singular R: PULSE_MATRIX_SINGULAR; N* ≤ 1 + (2p + 5)/6: PULSE_MATRIX_INSUFFICIENT_N. Both warn, null figures.
  • Large n rejects almost always.

See