ScientificErrorAnalysis - Maple Programming Help

Home : Support : Online Help : Science and Engineering : Scientific Error Analysis : Commands : ScientificErrorAnalysis/GetCorrelation

ScientificErrorAnalysis

 GetCorrelation
 return the correlation between two quantities-with-error

 Calling Sequence GetCorrelation( obj1, obj2 )

Parameters

 obj1 - quantity-with-error obj2 - quantity-with-error

Description

 • The GetCorrelation( obj1, obj2 ) command returns the correlation coefficient between the quantities-with-error obj1 and obj2.
 • The returned correlation is in the range $-1..1$.
 If obj1 and obj2 are the same, $1$ is returned.
 If no correlation is defined between obj1 and obj2 (with SetCorrelation), $0$ is returned.
 • If either or both of the quantities-with-error obj1 and obj2 have functional dependence on other quantities-with-error, Covariance is used to calculate their relative covariance, which is then converted to the correlation coefficient.
 The relationship between the covariance $u\left({y}_{1},{y}_{2}\right)$ and correlation $r\left({y}_{1},{y}_{2}\right)$ is

$r\left({y}_{1},{y}_{2}\right)=\frac{u\left({y}_{1},{y}_{2}\right)}{u\left({y}_{1}\right)u\left({y}_{2}\right)}$

 where $u\left({y}_{1}\right)$ and $u\left({y}_{2}\right)$ are the errors in ${y}_{1}$ and ${y}_{2}$.

Examples

 > $\mathrm{with}\left(\mathrm{ScientificConstants}\right):$
 > $\mathrm{with}\left(\mathrm{ScientificErrorAnalysis}\right):$
 > $\mathrm{GetCorrelation}\left(\mathrm{Constant}\left(h\right),\mathrm{Constant}\left(R\right)\right)$
 ${-}{0.010}$ (1)