# 'ESS' in Turing.jl

**URL:** <https://discourse.julialang.org/t/ess-in-turing-jl/103650>\
**Category:** Statistics\
**Tags:** question, package, turing\
**Created:** [September 8, 2023, 8:39am UTC](https://discourse.julialang.org/t/ess-in-turing-jl/103650 "2023-09-08T08:39:21Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![PrimulaBunce](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/primulabunce/32/46933_2.png) [@PrimulaBunce](https://discourse.julialang.org/u/PrimulaBunce)\
**Post date:** [September 8, 2023, 8:39am UTC](https://discourse.julialang.org/t/ess-in-turing-jl/103650/1 "2023-09-08T08:39:21Z")

</div>

Hi,

I’m new to MCMC, and I’m using the Turing package to implement NUTS.

```plaintext
par_NUTS = sample(model, NUTS(1000, 0.65), MCMCThreads(), 1000, 3)

```

 ![image](https://global.discourse-cdn.com/julialang/original/3X/1/3/133a680c137dc43178b364b030557a522f5c50b4.png)

I’m trying to figure out what the Effective Sample Size (ESS) values returned in the summary statistics mean.

I’ve run 3 separate chains. When I check the ESS values for the individual chains and the combined chains they turn out to be identical:

```plaintext
# Appended chains
summarystats(par_NUTS; append_chains=true)
# Individual chains
summarystats(par_NUTS; append_chains=false)[1]
summarystats(par_NUTS; append_chains=false)[2]
summarystats(par_NUTS; append_chains=false)[3]

```

What does this mean? Is it the relative ESS values that are returned?

---

<div class="post-metadata">

**Author:** ![Red-Portal](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/red-portal/32/9102_2.png) [@Red-Portal](https://discourse.julialang.org/u/Red-Portal)\
**Post date:** [November 20, 2023, 6:40pm UTC](https://discourse.julialang.org/t/ess-in-turing-jl/103650/2 "2023-11-20T18:40:17Z")

</div>

Could you post the full output or even the actual chains in a `JLD2` file?

---

<div class="post-metadata">

**Author:** ![Christopher\_Fisher](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/christopher_fisher/32/26132_2.png) [@Christopher\_Fisher](https://discourse.julialang.org/u/Christopher_Fisher)\
**Post date:** [November 20, 2023, 9:12pm UTC](https://discourse.julialang.org/t/ess-in-turing-jl/103650/3 "2023-11-20T21:12:58Z")

</div>

Hmmm. In most cases, I don’t think ESS should be equal for each chain and the combined chain. This might be a bug. Can someone verify?

---

<div class="post-metadata">

**Author:** ![Christopher\_Fisher](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/christopher_fisher/32/26132_2.png) [@Christopher\_Fisher](https://discourse.julialang.org/u/Christopher_Fisher)\
**Post date:** [November 20, 2023, 9:21pm UTC](https://discourse.julialang.org/t/ess-in-turing-jl/103650/4 "2023-11-20T21:21:53Z")

</div>

I think `par_NUTS[:,:,i]` gives the correct ESS for the ith chain.
