cov {IntervalQuestionStat} | R Documentation |
Calculate the sample covariance between two random intervals
Description
This function calculates the sample covariance between two realizations of
nonempty compact real intervals drawn from two random intervals
saved as two different
IntervalList
objects.
Usage
## S4 method for signature 'IntervalList,IntervalList'
cov(x, y, theta = 1)
Arguments
x |
A list of intervals, that is, an |
y |
A list of intervals, that is, an |
theta |
A single positive real number saved as a |
Details
Let and
be two interval-valued random
sets and let
be a sample of
independent observations drawn
from
. Then, the sample covariance
between
and
is defined as the following
real number given by
where and
with and
being the sample Aumann means
of the given one-dimensional random samples.
Value
This function returns the calculated sample covariance of two samples
of interval-valued data, which is defined as a real number.
Therefore, the output of this function is a single
numeric
value.
Author(s)
José García-García garciagarjose@uniovi.es
See Also
Other sample central tendency and dispersion measures such as sample
Aumann mean and sample Fréchet variance can be calculated through
mean()
and var()
functions, respectively.
Examples
## Some cov() examples changing theta
list1 <- IntervalList(c(0, 3, 2, 5, 6), c(4, 5, 4, 8, 7))
list2 <- IntervalList(c(3, 0, 3, 1, 4), c(7, 4, 6, 2, 6))
cov(list1, list2)
cov(list1, list2, 1/3)
## Note that cov(X, X) = var(X)
cov(list1, list1)
var(list1)
cov(list1, list1, 1/3)
var(list1, 1/3)