> ## Documentation Index
> Fetch the complete documentation index at: https://docs.plantpredict.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Uncertainty Analysis

> Understanding uncertainty components and exceedance probability calculations in PlantPredict prediction results

PlantPredict calculates uncertainty estimates to express the range of possible energy production outcomes. The uncertainty analysis combines multiple independent error sources to produce exceedance probability values (P50, P75, P90, P99) that characterize the likelihood of achieving specific energy production levels.

## Uncertainty Components

PlantPredict uses five independent uncertainty components that are combined using the root-sum-of-squares method. Each component represents a distinct source of prediction uncertainty.

| Component                            | Symbol                  | Units | Description                                                                           |
| ------------------------------------ | ----------------------- | ----- | ------------------------------------------------------------------------------------- |
| Interannual Variability              | $\sigma_{\text{int}}$   | %     | Year-to-year variation in solar resource at the site location                         |
| Irradiance Measurement Accuracy      | $\sigma_{\text{sens}}$  | %     | Uncertainty in the irradiance sensor measurements used to develop the weather dataset |
| Monitoring Period Representativeness | $\sigma_{\text{mon}}$   | %     | Uncertainty from the monitoring period not fully representing long-term conditions    |
| Spatial Variability                  | $\sigma_{\text{spa}}$   | %     | Uncertainty from extrapolating point measurements to the entire site area             |
| Modeling Accuracy                    | $\sigma_{\text{model}}$ | %     | Uncertainty in the PV performance model algorithms                                    |

## Total Uncertainty Calculation

### Total Irradiance Uncertainty

The total irradiance uncertainty combines all irradiance-related error sources:

$$
\sigma_{\text{irr}} = \sqrt{\sigma_{\text{int}}^2 + \sigma_{\text{sens}}^2 + \sigma_{\text{mon}}^2 + \sigma_{\text{spa}}^2}
$$

This represents the combined uncertainty in the solar resource estimate, independent of the PV modeling uncertainty.

### Total Energy Uncertainty

The total energy uncertainty combines the irradiance uncertainty with the modeling accuracy:

$$
\sigma_{\text{total}} = \sqrt{\sigma_{\text{irr}}^2 + \sigma_{\text{model}}^2}
$$

This represents the overall uncertainty in the predicted energy production.

## Exceedance Probability Calculation

PlantPredict uses a normal distribution assumption to calculate exceedance probabilities. The P50 value represents the median expected production (50% probability of exceedance), while higher P-values (P75, P90, P99) represent increasingly conservative estimates with higher probabilities of being achieved.

### Z-Score Application

For each exceedance probability level, a z-score is applied to adjust the P50 result:

**For irradiance-based metrics** (GHI, POA Insolation):

$$
\text{Value}_{P_x} = \text{Value}_{P50} \times (1 - z_x \times \sigma_{\text{irr}})
$$

**For energy-based metrics** (Plant Net Energy, Specific Yield, Capacity Factor):

$$
\text{Value}_{P_x} = \text{Value}_{P50} \times (1 - z_x \times \sigma_{\text{total}})
$$

where $z_x$ is the z-score corresponding to exceedance probability $x$.

### Standard Z-Score Values

The z-score represents the number of standard deviations from the mean in a normal distribution:

| Exceedance Probability | Z-Score |
| ---------------------- | ------- |
| P50                    | 0.000   |
| P75                    | 0.674   |
| P90                    | 1.282   |
| P95                    | 1.645   |
| P99                    | 2.326   |

### Metrics Adjusted by Uncertainty

The following summary result metrics are adjusted for each exceedance probability level:

**Irradiance-adjusted metrics** (using $\sigma_{\text{irr}}$):

* GHI Sum
* POA Insolation

**Energy-adjusted metrics** (using $\sigma_{\text{total}}$):

* Plant Net Energy
* Plant Gross Energy
* Array Net Energy
* Block Net Energy
* Specific Yield DC
* Specific Yield AC
* AC Capacity Factor
* Total BoS Loss
* Nighttime Losses
* ESS PV Energy
* ESS Battery Energy

**Derived metrics**:

* Performance Ratio is recalculated from the adjusted Specific Yield DC and POA Insolation values

## Example Calculation

For a prediction with the following uncertainty inputs:

| Component                                                    | Value |
| ------------------------------------------------------------ | ----- |
| Interannual Variability ($\sigma_{\text{int}}$)              | 3.0%  |
| Irradiance Measurement Accuracy ($\sigma_{\text{sens}}$)     | 5.0%  |
| Monitoring Period Representativeness ($\sigma_{\text{mon}}$) | 2.0%  |
| Spatial Variability ($\sigma_{\text{spa}}$)                  | 2.0%  |
| Modeling Accuracy ($\sigma_{\text{model}}$)                  | 2.9%  |

**Step 1: Calculate total irradiance uncertainty**

$$
\sigma_{\text{irr}} = \sqrt{3.0^2 + 5.0^2 + 2.0^2 + 2.0^2} = \sqrt{9 + 25 + 4 + 4} = \sqrt{42} = 6.48\%
$$

**Step 2: Calculate total energy uncertainty**

$$
\sigma_{\text{total}} = \sqrt{6.48^2 + 2.9^2} = \sqrt{42 + 8.41} = \sqrt{50.41} = 7.10\%
$$

**Step 3: Calculate P90 energy value**

For a P50 Plant Net Energy of 100 GWh:

$$
\text{Energy}_{P90} = 100 \times (1 - 1.282 \times 0.0710) = 100 \times 0.909 = 90.9 \text{ GWh}
$$

## Interpretation

* **P50**: The median expected value; there is a 50% probability that actual production will exceed this value
* **P75**: A moderately conservative estimate; 75% probability of exceedance
* **P90**: A conservative estimate commonly used for financing; 90% probability of exceedance
* **P99**: A highly conservative estimate; 99% probability of exceedance

The uncertainty values are user-specified inputs that should reflect the specific characteristics of the project's solar resource assessment and the confidence in the modeling methodology.
