ScientificErrorAnalysis - Maple Programming Help

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

ScientificErrorAnalysis

 Variance
 return the variance of a quantity-with-error

 Calling Sequence Variance( obj )

Parameters

 obj - quantity-with-error

Description

 • The Variance( obj ) command returns the variance of the quantity-with-error obj.
 • The quantity-with-error obj can have functional dependence on other quantities-with-error.
 If the quantity-with-error obj does not have functional dependence on other quantities-with-error, the uncertainty of obj is accessed and converted to the variance (by squaring).
 If the quantity-with-error obj has functional dependence on other quantities-with-error, the variance is calculated using the usual formula of error analysis involving a first-order expansion with the dependent form and covariances between the other quantities-with-error. This process can be recursive.
 The variance ${u}^{2\left(y\right)}$ in $y$, where $y$ depends on the ${x}_{i}$, is

${u\left(y\right)}^{2}=\sum _{i=1}^{N}\phantom{\rule[-0.0ex]{5.0px}{0.0ex}}{\left(\frac{\partial }{\partial {x}_{i}}y\right)}^{2}{u\left({x}_{i}\right)}^{2}+2\left(\sum _{i=1}^{N-1}\phantom{\rule[-0.0ex]{5.0px}{0.0ex}}\sum _{j=i+1}^{N}\phantom{\rule[-0.0ex]{5.0px}{0.0ex}}\left(\frac{\partial }{\partial {x}_{i}}y\right)\left(\frac{\partial }{\partial {x}_{j}}y\right)u\left({x}_{i},{x}_{j}\right)\right)$

 where $u\left({x}_{i}\right)$ is the error in ${x}_{i}$, $u\left({x}_{i},{x}_{j}\right)$ is the covariance between ${x}_{i}$ and ${x}_{j}$, and the partials are evaluated at the central values of the ${x}_{i}$.
 • Variances involving physical constants are calculated naturally and correctly in the implied system of units because central values and errors are obtained from the interface to ScientificConstants.

Examples

 > $\mathrm{with}\left(\mathrm{ScientificConstants}\right):$
 > $\mathrm{with}\left(\mathrm{ScientificErrorAnalysis}\right):$
 > $a≔\mathrm{Quantity}\left(10.,2.\right):$
 > $\mathrm{Variance}\left(a\right)$
 ${4.}$ (1)
 > $\mathrm{GetConstant}\left(h\right)$
 ${\mathrm{Planck_constant}}{,}{\mathrm{symbol}}{=}{h}{,}{\mathrm{value}}{=}{6.62606876}{}{{10}}^{{-34}}{,}{\mathrm{uncertainty}}{=}{5.2}{}{{10}}^{{-41}}{,}{\mathrm{units}}{=}{J}{}{s}$ (2)
 > $\mathrm{Variance}\left(\mathrm{Constant}\left(h\right)\right)$
 ${2.704}{}{{10}}^{{-81}}$ (3)
 > $\mathrm{GetConstant}\left({m}_{e}\right)$
 ${\mathrm{electron_mass}}{,}{\mathrm{symbol}}{=}{{m}}_{{e}}{,}{\mathrm{derive}}{=}\frac{{2}{}{{R}}_{{\mathrm{∞}}}{}{h}}{{c}{}{{\mathrm{α}}}^{{2}}}$ (4)
 > $\mathrm{Variance}\left(\mathrm{Constant}\left({m}_{e}\right)\right)$
 ${5.154122619}{}{{10}}^{{-75}}$ (5)
 > ${\mathrm{GetError}\left(\mathrm{Constant}\left({m}_{e}\right)\right)}^{2}$
 ${5.154122618}{}{{10}}^{{-75}}$ (6)