# How to model product of multiple random variables

**URL:** <https://discourse.pymc.io/t/how-to-model-product-of-multiple-random-variables/3478>\
**Category:** Questions\
**Created:** [June 24, 2019, 5:32pm UTC](https://discourse.pymc.io/t/how-to-model-product-of-multiple-random-variables/3478 "2019-06-24T17:32:46Z")\
**Posts on this page:** 1\
**Showing post:** 8

<div class="post-metadata">

**Author:** ![George](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.pymc.io/george/32/2012_2.png) [@George](https://discourse.pymc.io/u/George)\
**Post date:** [June 27, 2019, 9:16pm UTC](https://discourse.pymc.io/t/how-to-model-product-of-multiple-random-variables/3478/8 "2019-06-27T21:16:45Z")

</div>

Also, can you take a look at the codes? I draft these codes based on a question you have answered before, but it does not work:

> [@How to set up a custom likelihood function for two variables](https://discourse.pymc.io/t/how-to-set-up-a-custom-likelihood-function-for-two-variables/906/5):
>
> Thanks for the response. However, I still encountered some errors. I took the method like you suggested, but get a error like this: CustomizablePickler(buffer, self.\_reducers).dump(obj) AttributeError: Can't pickle local object 'likelihood.\<locals\>.obs' Here is my complete code. # Underlying parameters for prior 1 sigma\_1 = 0.49786792462 mu\_1 = 0.510236734833 # Underlying parameters for prior 2 sigma\_2 = 0.62667474617 mu\_2 = 0.169577686173 # Physical properties # Unit as default(KG) k\_1 =…

---

_[View the full topic](https://discourse.pymc.io/t/how-to-model-product-of-multiple-random-variables/3478)._
