Skip to main content
The uncertainty feature in Mangrove allows you to specify measurement uncertainty for data inputs and automatically calculates how uncertainty propagates through model calculations. This helps you understand the reliability and precision of your calculated results. Uncertainty can be set on:
  • Datapoint Types: Uncertainty values that apply to all data points of that type
  • Static Inputs: Uncertainty values for static (constant) input values
  • Model Calculations: Automatically computed uncertainty that propagates through model nodes
You can also override calculated uncertainty values for specific model runs when needed.

Setting Uncertainty on Datapoint Types

Accessing Uncertainty Settings

Uncertainty settings for datapoint types are configured when creating or editing event types in the Data Inputs settings:
  1. Navigate to Data InputsSettings
  2. Create a new event type or edit an existing one
  3. For each numeric datapoint type, you’ll see an “Add Uncertainty” button next to the unit field

Example: Setting Uncertainty on a Datapoint Type

Scenario: You’re creating a “Biochar Delivery” event type with a “Weight” datapoint type measured in tons.
  1. Create the event type and add a numeric datapoint type called “Weight” with unit “U.S. ton”
  2. Click “Add Uncertainty” next to the unit field
  3. Select Value Type: “Absolute”
  4. Select Conservative Direction: “Plus” (to be conservative about delivery amounts)
  5. Enter Value: 2.5 (representing ±2.5 tons)
  6. Save the event type
Now, all data points of this type will have an uncertainty of ±2.5 tons associated with them.

Setting Uncertainty on Static Inputs

Accessing Static Input Uncertainty Settings

Static inputs are configured in the Data Inputs settings:
  1. Navigate to Data InputsSettingsStatic Inputs
  2. Click “Add Input Type” to create a new static input, or edit an existing one
  3. For numeric static inputs, you’ll see an “Add Uncertainty” button next to the unit field

Uncertainty Interface

The uncertainty input interface for static inputs is identical to datapoint types:
  • Value Type: Absolute or Percentage
  • Conservative Direction: Plus (+) or Minus (-)
  • Value: The uncertainty value

How Static Input Uncertainty Works

  • Uncertainty is set on the static input’s datapoint type
  • For percentage-based uncertainty, the system uses the static input’s active value to convert to absolute uncertainty
  • The active value is the current value assigned to the static input

Example: Setting Uncertainty on a Static Input

Scenario: You have a static input “Default Moisture Content” with a value of 15% and want to set ±2% uncertainty.
  1. Navigate to Data InputsSettingsStatic Inputs
  2. Create or edit the “Default Moisture Content” static input
  3. Set the value to 15 with unit %
  4. Click “Add Uncertainty”
  5. Select Value Type: “Percentage”
  6. Select Conservative Direction: “Plus”
  7. Enter Value: 2 (representing ±2%)
  8. Save the static input
The system will calculate the absolute uncertainty as 15% × 0.02 = 0.3% when the static input is used in calculations.

Understanding Uncertainty Propagation

Uncertainty automatically propagates through model calculations based on the operators used in your model nodes. The system computes uncertainty for each node in your model tree.

Where Uncertainty is Displayed

Computed uncertainty is displayed in the Batch Calculations Table in the Ledger view:
  • Each calculated value shows its uncertainty in the format: (±value) for absolute or (±value%) for percentage-based
  • Uncertainty values appear in a dedicated column next to the calculated values

Propagation Rules

The system uses different propagation rules depending on the node type and operator:

Leaf Nodes (Data Input Nodes)

For leaf nodes that directly use data points:
  • Uncertainty comes from the data points themselves
  • If multiple data points are used, the system applies an operator reducer to combine their uncertainties
  • The operator reducer depends on the node’s configuration

Non-Leaf Nodes (Calculated Nodes)

For nodes that perform calculations using child nodes:
  1. Summation/Difference Operators:
    • Uncertainty = Sum of all child node uncertainties
    • Formula: uncertainty_total = Σ(uncertainty_child)
    • Example: If Node A has ±2 and Node B has ±3, their sum has ±5 uncertainty
  2. Product/Quotient Operators:
    • Uses relative uncertainty formula
    • Formula: uncertainty = √(Σ(relative_uncertainty²)) × value
    • Where relative_uncertainty = uncertainty_child / value_child
    • Example: If Node A (value=100, uncertainty=±5) and Node B (value=50, uncertainty=±2) are multiplied:
      • Relative uncertainties: 5/100 = 0.05, 2/50 = 0.04
      • Combined: √(0.05² + 0.04²) = √(0.0025 + 0.0016) = √0.0041 ≈ 0.064
      • Result value = 100 × 50 = 5000
      • Final uncertainty = 5000 × 0.064 = ±320
  3. Max/Min Operators:
    • Uses the uncertainty from the node with the maximum or minimum value
    • Example: If comparing Node A (value=100, uncertainty=±5) and Node B (value=80, uncertainty=±3):
      • For Max: Result = 100 with uncertainty = ±5 (from Node A)
      • For Min: Result = 80 with uncertainty = ±3 (from Node B)

Example: Uncertainty Propagation Through a Model

Consider a simple model that calculates total emissions:
Total Emissions = (Fuel Consumption × Emission Factor) + Direct Emissions
Where:
  • Fuel Consumption = 1000 gallons (uncertainty: ±50 gallons)
  • Emission Factor = 20 kg CO₂/gallon (uncertainty: ±1 kg CO₂/gallon)
  • Direct Emissions = 500 kg CO₂ (uncertainty: ±25 kg CO₂)
Step 1: Calculate Fuel Emissions (Product)
  • Value: 1000 × 20 = 20,000 kg CO₂
  • Relative uncertainties: 50/1000 = 0.05, 1/20 = 0.05
  • Combined relative: √(0.05² + 0.05²) = √0.005 = 0.071
  • Uncertainty: 20,000 × 0.071 = ±1,420 kg CO₂
Step 2: Calculate Total Emissions (Sum)
  • Value: 20,000 + 500 = 20,500 kg CO₂
  • Uncertainty: 1,420 + 25 = ±1,445 kg CO₂
Final Result: 20,500 kg CO₂ (±1,445 kg CO₂)

Overriding Calculated Uncertainty Values

Sometimes you may want to override the automatically calculated uncertainty for a specific model run. This is useful when:
  • You have expert knowledge about the uncertainty that differs from the calculated value
  • You want to test different uncertainty scenarios
  • The calculated value doesn’t reflect real-world conditions

How to Override Uncertainty

  1. Navigate to the Ledger view and open a batch
  2. In the Batch Calculations Table, locate the node whose uncertainty you want to override
  3. Click on the uncertainty value (displayed as (±value) or (±value%))
  4. A popover will appear with an input field
  5. Enter your custom uncertainty value
  6. Click the checkmark (✓) to save, or the delete icon (🗑️) to remove an existing override

Override Behavior

  • Overrides take precedence: When an override is set, it replaces the computed uncertainty value
  • Per-model-run: Overrides are specific to each model run/batch
  • Deleting overrides: Click the delete icon to remove an override and revert to the computed uncertainty
  • Visual indication: Overridden values are displayed the same way as computed values, but you can identify them by clicking to see if an override exists

Example: Overriding Uncertainty

Scenario: Your model calculates a node with ±150 uncertainty, but based on your expert knowledge, you know the actual uncertainty should be ±200.
  1. Open the batch in the Ledger
  2. Find the node in the calculations table
  3. Click on the uncertainty value (±150)
  4. In the popover, enter 200
  5. Click the checkmark to save
The uncertainty will now display as (±200) for this batch, and the override will be used in all downstream calculations.

Best Practices and Tips

When to Use Absolute vs. Percentage Uncertainty

  • Use Absolute Uncertainty when:
    • The measurement error is constant regardless of the value (e.g., scale precision)
    • You have fixed instrument limitations
    • Example: A scale that measures to ±0.1 ton regardless of weight
  • Use Percentage Uncertainty when:
    • The measurement error scales with the value (e.g., sensor drift)
    • Uncertainty is proportional to the measured quantity
    • Example: A flow meter with ±2% accuracy

Conservative Direction Guidelines

  • Use Plus (+) when:
    • You want to be conservative about overestimating (e.g., emissions, costs)
    • Higher values represent worse outcomes
    • Example: CO₂ emissions, where overestimation is conservative
  • Use Minus (-) when:
    • You want to be conservative about underestimating (e.g., credits, benefits)
    • Lower values represent worse outcomes
    • Example: Carbon credits, where underestimation is conservative

Troubleshooting

Uncertainty not appearing in calculations:
  • Ensure uncertainty is set on the datapoint types used in your events
  • Check that data points have values (percentage uncertainty requires a value to convert)
  • Verify that the model run has completed successfully
Unexpected uncertainty values:
  • Review the propagation rules to understand how uncertainty combines
  • Check if any overrides are set that might affect the calculation
  • Verify that all input uncertainties are correctly configured
Percentage uncertainty not converting:
  • Ensure the datapoint or static input has a value set
  • Check that the value type is numeric
  • Verify the uncertainty configuration is saved correctly