# The number of effective samples is smaller than 25% for some parameters

**URL:** <https://discourse.pymc.io/t/the-number-of-effective-samples-is-smaller-than-25-for-some-parameters/1050>\
**Category:** Questions\
**Created:** [April 5, 2018, 3:37am UTC](https://discourse.pymc.io/t/the-number-of-effective-samples-is-smaller-than-25-for-some-parameters/1050 "2018-04-05T03:37:28Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![adam](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.pymc.io/adam/32/694_2.png) [@adam](https://discourse.pymc.io/u/adam)\
**Post date:** [April 5, 2018, 2:11pm UTC](https://discourse.pymc.io/t/the-number-of-effective-samples-is-smaller-than-25-for-some-parameters/1050/3 "2018-04-05T14:11:13Z")

</div>

Thanks junpenglao. Your comments were really helpful. Now I have 2 more books to read 🙂  
I modeled it again without assigning ‘step’, so PyMC3 can automatically assign an appropriate sampler:

```
with model:
    trace = pm.sample(10000, tune=5000) 

```

As a result, pymc3 used two samplers:

> > NUTS: [lambda\_2\_log\_\_, lambda\_1\_log\_\_]  
> > Metropolis: [tau]

I still got the same warning of effective sample \< 25%. I’m assuming this is due to the Metropolis sampler as opposed to the NUTS. So i continued reading…  
This post ([correlation - What is causing autocorrelation in MCMC sampler? - Cross Validated](https://stats.stackexchange.com/questions/212442/what-is-causing-autocorrelation-in-mcmc-sampler)) mentions: “when using MH algorithms, to some extent you can reduce or increase your autocorrelations by adjusting the step size of proposal distribution”.

I looked at the pymc3 documentation but couldn’t find **ways to reduce step size for Metropolis ([https://docs.pymc.io/api/inference.html#module-pymc3.step\_methods.metropolis](https://docs.pymc.io/api/inference.html#module-pymc3.step_methods.metropolis)). How can I do that? Do you think that would help?**

---

_[View the full topic](https://discourse.pymc.io/t/the-number-of-effective-samples-is-smaller-than-25-for-some-parameters/1050)._
