# Clarification on combined residual error

**URL:** <https://discourse.pumas.ai/t/clarification-on-combined-residual-error/561>\
**Category:** Uncategorized\
**Created:** [November 30, 2021, 1:59pm UTC](https://discourse.pumas.ai/t/clarification-on-combined-residual-error/561 "2021-11-30T13:59:11Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![sai\_matcha](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.pumas.ai/sai_matcha/32/297_2.png) [@sai\_matcha](https://discourse.pumas.ai/u/sai_matcha)\
**Post date:** [November 30, 2021, 1:59pm UTC](https://discourse.pumas.ai/t/clarification-on-combined-residual-error/561/1 "2021-11-30T13:59:11Z")

</div>

Hi … i have a basic doubt here, seeking some clarification.

I learned to use combined error in NONMEM in perticular way, which is  
F(1+EPS1) + EPS2  
I am trying to understand how pumas translate this  
Pumas additive error :

```auto
Normal(μ, σ)

```

which i understand as : F + EPS\_add

Pumas proportinal error

```auto
Normal(μ, μ*σ)

```

which i understand as : F \* EPS\_prop

I tried to write combined error from these two informations , which will be equvivalnet to : F(1+EPS1) + EPS2

my understanding of code is

```auto
Normal(μ, (σ_add + sqrt((μ*σ_prop)^2)))
or
Normal(μ, (sqrt(σ_add^2) + sqrt((μ*σ_prop)^2)))

or if i want variance for aditive eror
Normal(μ, ((σ_add^2) + sqrt((μ*σ_prop)^2)))

```

but it is given as

```auto
Normal(μ, sqrt(σ_add^2 + (μ*σ_prop)^2))

```

[https://docs.pumas.ai/stable/model\_components/error\_models/](https://docs.pumas.ai/stable/model_components/error_models/)

Can someone help me to understand this

Thanyou

---

<div class="post-metadata">

**Author:** ![benjaminrich](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.pumas.ai/benjaminrich/32/156_2.png) [@benjaminrich](https://discourse.pumas.ai/u/benjaminrich)\
**Post date:** [November 30, 2021, 2:16pm UTC](https://discourse.pumas.ai/t/clarification-on-combined-residual-error/561/2 "2021-11-30T14:16:39Z")

</div>

It is related to how you derive the distribution of a sum of 2 independent normally distributed random variables (see e.g. [https://en.wikipedia.org/wiki/Sum\_of\_normally\_distributed\_random\_variables](https://en.wikipedia.org/wiki/Sum_of_normally_distributed_random_variables)). Basically, the variance of the sum is the sum of the variances. If `σ_add` and `μ*σ_prop` are the standard deviations for the additive and proportional error components respectively, then `σ_add^2` and `(μ*σ_prop)^2` are the respective variances. Take the square root of the sum to get the standard deviation for the combined error.

---

<div class="post-metadata">

**Author:** ![sai\_matcha](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.pumas.ai/sai_matcha/32/297_2.png) [@sai\_matcha](https://discourse.pumas.ai/u/sai_matcha)\
**Post date:** [December 1, 2021, 5:48am UTC](https://discourse.pumas.ai/t/clarification-on-combined-residual-error/561/3 "2021-12-01T05:48:33Z")

</div>

Thanks for answering. i have one more doubt here  
if i want SD, formula will be

```auto
σ_add + μ*σ_prop

```

similarly for variance , it should be

```auto
σ_add^2 + (μ*(σ_prop)^2)

```

why should i square the `μ` as well?

Thanks

---

<div class="post-metadata">

**Author:** ![andreasnoack](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.pumas.ai/andreasnoack/32/22_2.png) [@andreasnoack](https://discourse.pumas.ai/u/andreasnoack)\
**Post date:** [December 1, 2021, 1:01pm UTC](https://discourse.pumas.ai/t/clarification-on-combined-residual-error/561/4 "2021-12-01T13:01:43Z")

</div>

Please see [How to define error - #7 by andreasnoack](https://discourse.pumas.ai/t/how-to-define-error/82/7) which explains the relationship between the formuations.
