Learn R Programming

IntervalQuestionStat (version 0.2.0)

var: Calculate the sample Fréchet variance of a random interval

Description

This function calculates the sample Fréchet variance of a single realization of \(n\) nonempty compact real intervals drawn from an interval-valued random set stored as an IntervalList object.

Usage

# S4 method for IntervalList
var(x, theta = 1)

Value

This function returns the calculated sample Fréchet variance of the given \(n\) interval, which is defined as a non-negative real number. Therefore, the output of this function is a single numeric object.

Arguments

x

A list of intervals, that is, an IntervalList object.

theta

A single positive real number saved as a numeric object. By default, theta = 1.

Author

José García-García garciagarjose@uniovi.es

Details

Let \(\mathcal{X}\) be an interval-valued random set and let \(\left(x_{1},x_{2},\ldots,x_{n}\right)\) be a sample of \(n\) independent observations drawn from \(\mathcal{X}\). Then, the sample Fréchet variance (see Fréchet, 1948) is defined as the following non-negative real number given by $$s_{\mathcal{X}}^{2} = \frac{1}{n}\sum_{i=1}^{n}d_{\theta}^{2}\left(x_{i}, \overline{x}\right),$$ where \(\theta>0\) and \(\overline{x}\) denotes the sample Aumann mean of \(\left(x_{1},x_{2},\ldots,x_{n}\right)\). Due to \(\theta\)-distance definition, this deviation measure can also be computed as follows, $$s_{\mathcal{X}}^{2} = s_{\mathrm{mid}~\mathcal{X}}^{2}+\theta\cdot s_{\mathrm{spr}~\mathcal{X}}^{2},$$ where $$s_{\mathrm{mid}~\mathcal{X}} = \frac{1}{n}\sum_{i=1}^{n} (\mathrm{mid}~x_{i} - \mathrm{mid}~\overline{x})^{2},$$ $$s_{\mathrm{spr}~\mathcal{X}} = \frac{1}{n}\sum_{i=1}^{n} (\mathrm{spr}~x_{i} - \mathrm{spr}~\overline{x})^{2}.$$

References

Fréchet, M. (1948). Les éléments aléatoires de nature quelconque dans un espace distancié. Annales de l'institut Henri Poincaré, 10(4):215-310.

See Also

Other sample central tendency and covariance measures such as sample Aumann mean and sample covariance can be calculated through mean() and cov() functions, respectively.

Examples

Run this code
## Some var() examples
list <- IntervalList(c(1, 3), c(2, 5))
var(list)
var(list, theta = 1/3)

Run the code above in your browser using DataLab