Skip to content

Esta página también está en español.

Léela en español

このページは日本語でも読めます。

日本語で読む

本页也有简体中文版本。

阅读简体中文版本

Covariance (covariance)

The sample covariance of two lists of the same length.

How to write it

covariance(xs, ys)

The sum of the products of the deviations from the means, divided by n - 1.

xs
The first list. Takes a list.
ys
The second list, as long as the first. Takes a list.

Examples

  • covariance⁡([1,2,3,4],[2,4,5,9])=113\displaystyle \operatorname{covariance}(\left[ 1, 2, 3, 4 \right], \left[ 2, 4, 5, 9 \right]) = \frac{11}{3}
    covariance([1, 2, 3, 4], [2, 4, 5, 9])

    In the solver, covariance([1, 2, 3, 4], [2, 4, 5, 9]) gives 11/3.

    Open in the solver
  • cvar

    The conditional value at risk of a loss: its expected value over the worst share 1 - level.

  • correlation

    The correlation coefficient of two lists of the same length.

  • distributed

    A variable and the distribution it follows, as probability and expectation read it.

  • cdf

    The probability that a variable with a distribution is at most a value.

  • expectation

    The expected value of an expression of a variable with a distribution or a process.

  • binomial_distribution

    The number of successes in n independent trials that each succeed with chance p.