GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
Math::Symbolic::Custom::ErrorPropagation(3) User Contributed Perl Documentation Math::Symbolic::Custom::ErrorPropagation(3)

Math::Symbolic::Custom::ErrorPropagation - Calculate Gaussian Error Propagation

  use Math::Symbolic qw/parse_from_string/;
  use Math::Symbolic::Custom::ErrorPropagation;
  
  # Force is mass times acceleration.
  my $force = parse_from_string('m*a');
  
  # The measurements of the acceleration and the mass are prone to
  # statistical errors. (Hence have variances themselves.)
  # Thus, the variance in the force is:
  my $variance = $force->apply_error_propagation('a', 'm');
  
  print $variance;
  
  # prints:
  # (
  #   ((sigma_a ^ 2) * ((partial_derivative(m * a, a)) ^ 2)) +
  #   ((sigma_m ^ 2) * ((partial_derivative(m * a, m)) ^ 2))
  # ) ^ 0.5

This module extends the functionality of Math::Symbolic by offering facilities to calculate the propagated variance of a function of variables with variances themselves.

The module adds a method to all Math::Symbolic objects.

This method does not modify the Math::Symbolic tree itself, but instead calculates and returns its variance based on its variable dependencies which are expected to be passed as arguments to this method in form of a list of variable names.

The variance is returned as a Math::Symbolic tree itself. It is calculated using the Gaussian error propagation formula for uncorrelated variances:

  variance( f(x_1, x_2, ..., x_n ) ) =
    sqrt(
      sum_over_i=1_to_n(
        variance(x_i)^2 * (df/dx_i)^2
      )
    )

In the above formula, the derivatives are partial derivatives and the component variances "variance(x_i)" are represented as "sigma_x_i" in the resulting formula. (The "x_i" is replaced by the variable name, though.)

Please refer to the SYNOPSIS for an example.

Please send feedback, bug reports, and support requests to one of the contributors or the Math::Symbolic mailing list.

List of contributors:

  Steffen M�ller, symbolic-module at steffen-mueller dot net

New versions of this module can be found on http://steffen-mueller.net or CPAN.

Math::Symbolic

Math::Symbolic::Custom, Math::Symbolic::Custom::Base,

2013-06-05 perl v5.32.1

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.