spc_hotelling_t2 — SPC multivariate op

• 데이터 종류: matrix → table

• 호출: import fullseye as fs; fs.ledger.spc_hotelling_t2(data, alpha=0.0027, mean=None, cov=None)(구현을 직접 호출하려면 import spc; spc.spc_hotelling_t2(data, alpha=0.0027, mean=None, cov=None), 원장에서 가져오려면 opsspc.get("spc_hotelling_t2"))

• GPU: 없음(CPU 참조 구현만)

사용법

Hotelling T² 다변량 SPC. 관리 한계는 단계에 따라 고른다(phase I 은 Beta 분포, 모수가 알려진 경우는 χ² 분포).

> 아래 상세 설명은 원문입니다 —— 요약과 제목은 번역되어 있습니다.

data is a 2-D array of shape (m, p) — m observations of p correlated features. Each row's statistic is::

T^2_i = (x_i - mu)' S^-1 (x_i - mu)

The control limit depends on where mu and S come from, and the op picks it from what you pass:

• Phase I (default, neither mean nor cov) — mu and S are the sample mean and ddof=1 covariance of the *same* rows. Then m T^2_i / (m-1)^2 follows Beta(p/2, (m-p-1)/2) exactly (Gnanadesikan & Kettenring 1972; Tracy, Young & Mason 1992), so::

UCL = (m-1)^2 / m * Beta_{1-alpha}(p/2, (m-p-1)/2)

In phase I T^2_i <= (m-1)^2/m holds for every row whatever the data, so

the phase-II F limit (which exceeds that bound for small m) can never

alarm there. Needs m >= p + 2.

• Known parameters (both mean and cov) — the in-control mean and covariance are taken as known (a specification, or estimates from a very large reference). Then T^2 ~ chi^2_p and UCL = chi^2_{p, 1-alpha}, independent of how many rows are charted (one row is enough).

• Phase II with estimated parameters — if mean / cov were estimated from a separate in-control reference of n rows and new rows are charted against them, the exact limit is p (n+1)(n-1) / (n (n-p)) * F_{1-alpha}(p, n-p) with n the size of the *reference*, not of the charted data. This op treats passed parameters as known (chi-square limit, the n -> inf limit of that F form); for a small reference compute the F limit with your n and compare t2 against it.

Passing only one of mean / cov is refused: no standard control limit exists for a half-known parameter set.

At false-alarm rate alpha (default 0.0027, the 3-sigma-equivalent). Returns a dict with the per-row t2 array, the ucl, the phase used ("phase_I" / "known"), the integer indices out_of_control, and boolean in_control. The mean row (x == mu) has T^2 == 0 (pinned in the tests).

Raises ValueError: a non-2-D / empty *data*, fewer than p+2 observations in phase I, only one of mean / cov, alpha outside (0, 1), a singular covariance, or non-finite / mislabelled input.

참고(샘플 데이터·문헌)

• 샘플 데이터 카탈로그(DL URL / 라이선스) —— 2-D 는 skimage.data(BSD/public)+ 합성, 3-D 는 실데이터 소스(Stanford/PDS 등)의 DL URL.

• 연산자의 내력·참고문헌 —— 이 연산자 족의 바탕이 된 연구/기법의 출처.

• 알고리즘의 정전(저자·연도)과 용도는 위의 패밀리 사용 가이드에 적혀 있습니다.

실행 가능한 예제(이 연산자를 실제로 호출하는 검증된 샘플)

• poc_spc — py -3.11 examples/poc_spc.py

타입이 이어지는 다음 연산자(table 를 입력으로 받는 것)

msa_anova_table · msa_gauge_rr · msa_bias_linearity · msa_attribute_agreement · gum_standard_uncertainty · gum_propagate · gum_expanded · gum_monte_carlo

같은 카테고리(multivariate)

—


*Provenance: spc.py — SPC 연산자 레지스트리. 이 op 노트는 tools/opdocs.py md 가 자동 생성합니다(직접 편집하지 마세요).*

© 2026 Kazufumi Furuse — Fullseye operator documentation. Licensed under Apache-2.0.