# Fusing measurement results

**URL:** <https://discourse.julialang.org/t/fusing-measurement-results/102100>\
**Category:** Statistics\
**Tags:** question\
**Created:** [July 26, 2023, 6:37am UTC](https://discourse.julialang.org/t/fusing-measurement-results/102100 "2023-07-26T06:37:50Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![ufechner7](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ufechner7/32/51363_2.png) [@ufechner7](https://discourse.julialang.org/u/ufechner7)\
**Post date:** [July 26, 2023, 6:37am UTC](https://discourse.julialang.org/t/fusing-measurement-results/102100/1 "2023-07-26T06:37:50Z")

</div>

I have n measurements, statistically independant with n values x\_i and n standard deviations \sigma\_i. How can I combine them to get one value and one standard deviation?

---

<div class="post-metadata">

**Author:** ![nilshg](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/nilshg/32/2283_2.png) [@nilshg](https://discourse.julialang.org/u/nilshg)\
**Post date:** [July 26, 2023, 7:43am UTC](https://discourse.julialang.org/t/fusing-measurement-results/102100/2 "2023-07-26T07:43:49Z")

</div>

By “measurements” here you mean you only have the summary statistics of the measurements? (Otherwise you could just combine all the data)

Maybe this answers your question:

> <https://math.stackexchange.com/questions/2971315/how-do-i-combine-standard-deviations-of-two-groups>

---

<div class="post-metadata">

**Author:** ![wc4wc4wc4](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/wc4wc4wc4/32/23038_2.png) [@wc4wc4wc4](https://discourse.julialang.org/u/wc4wc4wc4)\
**Post date:** [July 26, 2023, 7:44am UTC](https://discourse.julialang.org/t/fusing-measurement-results/102100/3 "2023-07-26T07:44:26Z")

</div>

I personally like [Barlow](https://www.wiley.com/en-au/Statistics:+A+Guide+to+the+Use+of+Statistical+Methods+in+the+Physical+Sciences-p-9780471922957). On page 54, chapter 4 on errors, he writes:

 ![Screenshot 2023-07-26 at 09.42.54](https://global.discourse-cdn.com/julialang/original/3X/1/b/1b9dcd19cd7ecbf3eaf84fce82695372d1d42f30.png)

---

<div class="post-metadata">

**Author:** ![aplavin](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/aplavin/32/222056_2.png) [@aplavin](https://discourse.julialang.org/u/aplavin)\
**Post date:** [July 26, 2023, 11:12am UTC](https://discourse.julialang.org/t/fusing-measurement-results/102100/4 "2023-07-26T11:12:21Z")

</div>

Just be careful and ensure you really believe the original individual errors. Otherwise, imagine you have measurements `[1±0.01, 1±0.01, 2±0.01, 2±0.01]`, and the result will be `1.5±0.005`. When you don’t believe original errors, better to do

```julia
using StatsBase
mean(vals) ± sem(vals)

```
