### 6.4. Statistical information encoding

Statistical measures of variation of certain parameters and functions can be embedded in a DAVE-ML model in several ways. This information is captured in an `uncertainty` element, which can be referenced by `variableDef`, `griddedTableDef` and `ungriddedTableDef` elements. For maximum modeling flexibility, it is possible to add uncertainty to the independent value arguments to a function or calculation, to the output of a function itself, as well as to any output signal. Applying uncertainty at more than one location in a calculation change is probably not a good practice, however.

Details on providing the random values for uncertainties is left to the implementer.

Linear correlation between the randomness of two or more variables or functions can be specified. Although the correlation between parameters does not have a dependency direction (i.e., the statistical uncertainty of one parameter is specified in terms of the other parameter, therefore the calculation order does not matter), correlation is customarily specified as a dependency of one random variable on the value of another random variable. `correlatesWith` identifies variables or functions whose uncertainty 'depends' on the current value of this variable or parameter; the `correlation` sub-element specifies the correlation coefficient and identifies the (previously calculated) random variable or function on which the correlation depends.

These correlation sub-elements only apply to normal (Gaussian) probability distribution functions.

Each of these distribution description elements contain additional information, as described below.

```    uncertainty : effect=['additive'|'multiplicative'|'percentage'|'absolute']
EITHER
normalPDF : numSigmas=['1'|'2'|'3']
bounds { scalar value representing the one, two or three sigma bound }:
(correlatesWith* : varID |
correlation* : varID, corrCoef )
OR
uniformPDF
bounds { one or two scalar values for abs. or min/max bounds }
```

Example 16. A variable with absolute uncertainty bounds

```<DAVEfunc>
.
.
.
<variableDef name="CD zero" varID="CDo" units="nd" initialValue="0.005"> <description>
Minimum coefficient of drag with an
asymmetric uniform uncertainty band
</description>
<isOutput/>
<uncertainty effect="absolute"> <uniformPDF>
<bounds>0.001</bounds>
<bounds>0.010</bounds>
</uniformPDF>
</uncertainty>
</variableDef>
</DAVEfunc>
``` We declare the parameter `CDo` as having a nominal value of 0.005. When parametric variations are applied, the value of `CDo` can vary uniformly between 0.001 and 0.010.

Example 17. 10% uncertainty applied to output variable with a uniform distribution

```<DAVEfunc>
.
.
.
<variableDef name="angleOfAttack" varID="Alpha_deg" units="deg">
<isStdAIAA/>
</variableDef>
<variableDef name="Cm_u" varID="Cm_u" units="nd">
<description>
Coefficient of pitching moment with 10 percent
symmetric uniform uncertainty band
</description>
<isOutput/>
<uncertainty effect="percentage"> <uniformPDF>
<bounds>10.0</bounds>
</uniformPDF>
</uncertainty>
</variableDef>
<breakpointDef bpID="ALP">
<bpVals>0, 5, 10, 15, 20, 25, 30, 35</bpVals>
</breakpointDef>
<function name="Nominal Cm">
<description>
Nominal pitching moment values prior to application
of uncertainty
</description>
<independentVarRef varID="Alpha_deg"/>
<dependentVarRef varID="Cm_u"/>
<functionDefn> <griddedTableDef>
<breakpointRefs>
<bpRef bpID="ALP"/>
</breakpointRefs>
<dataTable>
5.2, 4.3, 3.1, 1.8, 0.3, 0.1, 0.0, -0.1
</dataTable>
</griddedTableDef>
</functionDefn>
</function>
</DAVEfunc>
``` We declare the output variable `Cm_u` as having the uncertainty of ±10% uniform distribution. This function gives the nominal values of `Cm_u` as a 1D function of angle-of-attack (alpha).

Example 18. Asymmetric additive uncertainty applied to output variable with uniform distribution

```<DAVEfunc>
.
.
.
<variableDef name="angleOfAttack" varID="Alpha_deg" units="deg">
<isStdAIAA/>
</variableDef>
<variableDef name="Cm_u" varID="Cm_u" units="nd">
<description>
Coefficient of pitching moment with an
asymmetric uniform uncertainty band
</description>
<isOutput/>
<uncertainty effect="additive"> <uniformPDF>
<bounds>-0.50</bounds>
<bounds>0.00</bounds>
</uniformPDF>
</uncertainty>
</variableDef>
<breakpointDef bpID="ALP">
<bpVals>0, 5, 10, 15, 20, 25, 30, 35</bpVals>
</breakpointDef>
<function name="Nominal Cm">
<description>
Nominal pitching moment values prior to application
of uncertainty
</description>
<independentVarRef varID="Alpha_deg"/>
<dependentVarRef varID="Cm_u"/> <functionDefn>
<griddedTableDef>
<breakpointRefs>
<bpRef bpID="ALP"/>
</breakpointRefs>
<dataTable>
5.2, 4.3, 3.1, 1.8, 0.3, 0.1, 0.0, -0.1
</dataTable>
</griddedTableDef>
</functionDefn>
</function>
</DAVEfunc>
``` We declare the output variable `Cm_u` varies by as much as −0.5 to +0.0 about the nominal value. This delta value is in the same units as the nominal value (i.e. it is not a multiplier or percentage but an additive delta to the nominal value which comes from the 1D `Cm_u` function table description). This function gives the nominal values of `Cm_u` as a 1D function of angle-of-attack (alpha).

Example 19. A 1D point-by-point, Gaussian distribution function

```<DAVEfunc>
.
.
.
<variableDef name="angleOfAttack" varID="Alpha_deg" units="deg">
<isStdAIAA/>
</variableDef>
<variableDef name="Cm_u" varID="Cm_u" units="nd">
<description>
Coefficient of pitching moment with 10 percent
symmetric uniform uncertainty band
</description>
<isOutput/>
</variableDef>
<breakpointDef bpID="ALP">
<bpVals>0, 5, 10, 15, 20, 25, 30, 35</bpVals>
</breakpointDef>
<function name="Uncertain Cm">
<independentVarRef varID="Alpha_deg"/>
<dependentVarRef varID="Cm_u"/>
<functionDefn>
<griddedTableDef>
<breakpointRefs>
<bpRef bpID="ALP"/>
</breakpointRefs>
<uncertainty effect="multiplicative"> <normalPDF numSigmas="3"> <bounds>
<dataTable> 0.10, 0.08, 0.06, 0.05, 0.05, 0.06, 0.07, 0.12
</dataTable>
</bounds>
</normalPDF>
</uncertainty>
<dataTable> 5.2, 4.3, 3.1, 1.8, 0.3, 0.1, 0.0, -0.1
</dataTable>
</griddedTableDef>
</functionDefn>
</function>
</DAVEfunc>
``` This declares the statistical uncertainty bounds of the `Cm_u` dependent variable will be expressed as a multiplication of the nominal value. This declares that the probability distribution is a normal distribution and the bounds represent 3-sigma (99.7%) confidence bounds. This table lists three-sigma bounds of each point of the `Cm_u` function as a table. The table must have the same dimensions and independent variable arguments as the nominal function; it is in effect an overlay to the nominal function table, but the values represent the bounds as multiples of the nominal function value. This table defines the nominal values of the function; these values will be used if the random variable associated with the uncertainty of this function is zero or undefined by the application.

Example 20. Two nonlinear functions with correlated uncertainty

```<DAVEfunc>
<variableDef name="angleOfAttack" varID="Alpha_deg" units="deg">
<isStdAIAA/>
</variableDef>
<variableDef name="CL_u" varID="CL_u" units="nd">
<description> Coefficient of lift with a symmetric Gaussian uncertainty
of 20%; correlates with Cm uncertainty. </description>
<uncertainty effect="multiplicative"> <normalPDF numSigmas="3">
<bounds>0.20</bounds>
<correlatesWith varID="Cm_u"/> </normalPDF>
</uncertainty>
</variableDef>
<variableDef name="Cm_u" varID="Cm_u" units="nd">
<description> Coefficient of pitching moment with a symmetric Gaussian uncertainty
distribution of 30%; correlates directly with lift uncertainty. </description>
<isOutput/>
<uncertainty effect="percentage"> <normalPDF numSigmas="3">
<bounds>30</bounds>
<correlation varID="CL_u" corrCoef="1.0"/> </normalPDF>
</uncertainty>
</variableDef>
<breakpointDef bpID="ALP">
<bpVals>0, 5, 10, 15, 20, 25, 30, 35</bpVals>
</breakpointDef>
<function name="Nominal CL">
<description> Nominal lift coefficient values prior to uncertainty </description>
<independentVarRef varID="Alpha_deg"/>
<dependentVarRef varID="CL_u"/>
<functionDefn>
<griddedTableDef>
<breakpointRefs><bpRef bpID="ALP"/></breakpointRefs>
<dataTable> 0.0, 0.1, 0.2, 0.3, 0.4, 0.45, 0.5, 0.45 </dataTable>
</griddedTableDef>
</functionDefn>
</function>
<function name="Nominal Cm">
<description> Nominal pitching moment values prior to uncertainty </description>
<independentVarRef varID="Alpha_deg"/>
<dependentVarRef varID="Cm_u"/>
<functionDefn>
<griddedTableDef>
<breakpointRefs><bpRef bpID="ALP"/></breakpointRefs>
<dataTable> 5.2, 4.3, 3.1, 1.8, 0.3, 0.1, 0.0, -0.1 </dataTable>
</griddedTableDef>
</functionDefn>
</function>
</DAVEfunc>
``` Lift coefficient has a nominal value that varies with angle-of-attack according to a nonlinear 1D table (given in the "Nominal CL" table defined in this example). When performing parametric variations, `CL_u` can take on a multiplicative variation of up to 20% (3-sigma) with a Gaussian distribution. This element indicates that the variation of lift coefficient correlates directly with the variation in pitching moment coefficient. Pitching-moment coefficient has a nominal value that varies as a function of angle-of-attack, according to a nonlinear 1D table (given in the "Nominal Cm" table defined in this example). When performing parametric variations, `Cm_u` can take on a 30% variation (3-sigma) with a Gaussian distribution. This element indicates that the variation of pitching moment correlates directly with the variation in lift coefficient.

2011-03-31