# Bayesian regression in PyMC3

**URL:** <https://discourse.pymc.io/t/bayesian-regression-in-pymc3/3968>\
**Category:** Questions\
**Created:** [October 15, 2019, 10:42am UTC](https://discourse.pymc.io/t/bayesian-regression-in-pymc3/3968 "2019-10-15T10:42:17Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Nandita\_Khetan](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.pymc.io/nandita_khetan/32/1848_2.png) [@Nandita\_Khetan](https://discourse.pymc.io/u/Nandita_Khetan)\
**Post date:** [October 15, 2019, 10:42am UTC](https://discourse.pymc.io/t/bayesian-regression-in-pymc3/3968/1 "2019-10-15T10:42:17Z")

</div>

I am relatively new to PyMC3 and using it to simply fit some observed data to a linear model and estimate the coefficients. However, the sd values that i get using **pm.summary(trace)** and the ones that i get in the diagonal of the covariance matrix **pm.trace\_cov(trace)** after **sd = np.sqrt(np.diag(cov))** are not same. What am i missing here?  
Thanks a lot for the help.

---

<div class="post-metadata">

**Author:** ![sammosummo](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.pymc.io/sammosummo/32/96_2.png) [@sammosummo](https://discourse.pymc.io/u/sammosummo)\
**Post date:** [October 16, 2019, 4:19pm UTC](https://discourse.pymc.io/t/bayesian-regression-in-pymc3/3968/2 "2019-10-16T16:19:44Z")

</div>

Could you post some code to illustrate the issue (with toy data if necessary)?
