Skip to content

Covariance ​

Generated from the engine's own definition: compute-engine's symbol, which we neither extend nor document by hand.

Sample covariance (n − 1 denominator) of paired data, given as two equal-length collections or one collection of (x, y) pairs.

✓ checked against that system · ! checked, with disagreements (hover a chip)Wolfram LanguageCovariance✓
Covariance(collection<any>, collection<any>?) -> nan | realSample covariance (n − 1 denominator) of paired data, given as two equal-length collections or one collection of (x, y) pairs.
Typed signatures
TypePackageApplies
(collection<nothing | number | tuple>, collection<nothing | number>?) -> nan | realcompute-enginealways
(collection<any> | distribution, collection<any>?) -> list<list<real>> | nan | realstatisticsreplaces compute-enginealways

Domain: Compute engine

Examples

Scope #

Exact rationals give an exact covariance, 9/49/4

live ↗
InCovariance⁡([1,32],[2,11])\operatorname{Covariance}(\bigl\lbrack1, \frac{3}{2}\bigr\rbrack, \bigl\lbrack2, 11\bigr\rbrack)Out94\frac{9}{4}

Approximate data at 20 digits gives an approximate result

live ↗
InCovariance⁡(N([1,2,5,6],20),N([2,3,6,8],20))\operatorname{Covariance}(N(\bigl\lbrack1, 2, 5, 6\bigr\rbrack, 20), N(\bigl\lbrack2, 3, 6, 8\bigr\rbrack, 20))Out6.56.5
About
Examples2
Checked againstWolfram Language 2 agree
CrosswalkWolfram Language