{% if message %}

Covariance & Correlation

{{ message }}

{% else %}

Covariance Matrix

{% for row in covariance_data %} {% set outer_loop = loop %} {% for cell in row %} {%if loop.index0 <= outer_loop.index0 %} {% else %} {% endfor %}
{{dim_names[outer_loop.index0] }} {{ "%.1e" | format(cell.value) }} {% endif %} {% endfor %}

The covariance matrix shows how pairs of parameters vary together. The diagonal elements (Variance) show the variance of each parameter (how much it varies on its own). Larger positive values indicate the parameter estimate is less certain. The off-diagonal elements (Covariance) show the covariance between pairs of parameters, better viewed in the normalized correlation matrix.

{# End cov-matrix-container for covariance #}

Correlation Matrix

{% for row in correlation_data %} {% set outer_loop = loop %} {% for cell in row %} {%if loop.index0 <= outer_loop.index0 %} {% else %} {% endfor %}
{{ dim_names[outer_loop.index0] }} {{ "%.2f" | format(cell.value) }} {% endif %} {% endfor %}

The correlation matrix is a normalized version of the covariance matrix. Values range from -1 to +1. The diagonal elements are always 1, representing perfect correlation of a parameter with itself. Off-diagonal elements (Correlation Coefficient) show the linear correlation between pairs of parameters. +1 indicates perfect positive correlation, -1 indicates perfect negative correlation, and 0 indicates no linear correlation. Values close to +1 or -1 suggests that the parameters are highly dependent. Thus, if their variance is also high, their confidence intervals will be large.

{% endif %}