# Distribution that takes as parameter another distribution

**URL:** <https://discuss.ai.google.dev/t/distribution-that-takes-as-parameter-another-distribution/24740>\
**Category:** General Discussion\
**Tags:** tf-probability, help\_request\
**Created:** [November 4, 2022, 10:26am UTC](https://discuss.ai.google.dev/t/distribution-that-takes-as-parameter-another-distribution/24740 "2022-11-04T10:26:20Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Julian\_CHAMBRIER](https://d1dlmcr85iqnpo.cloudfront.net/user_avatar/discuss.ai.google.dev/julian_chambrier/32/11722_2.png) [@Julian\_CHAMBRIER](https://discuss.ai.google.dev/u/Julian_CHAMBRIER)\
**Post date:** [November 4, 2022, 10:26am UTC](https://discuss.ai.google.dev/t/distribution-that-takes-as-parameter-another-distribution/24740/1 "2022-11-04T10:26:20Z")

</div>

Hello,

I would like to know if it is possible, with tensorflow, to make distributions which take in parameter other distributions.

Here is an example:

tfd.PERT(1, tfd.Normal(1, 2), 10)

or tfd.PERT(tfd.PERT(1, 2, 3) , tfd.PERT(20, 23, 25), 100)

I know there is tfd.JointDistributionSequential but I’m not sure if it does the job.

Thank you for you help

---

<div class="post-metadata">

**Author:** ![Aniket\_Dubey](https://d1dlmcr85iqnpo.cloudfront.net/user_avatar/discuss.ai.google.dev/aniket_dubey/32/16664_2.png) [@Aniket\_Dubey](https://discuss.ai.google.dev/u/Aniket_Dubey)\
**Post date:** [October 21, 2024, 9:46am UTC](https://discuss.ai.google.dev/t/distribution-that-takes-as-parameter-another-distribution/24740/3 "2024-10-21T09:46:16Z")

</div>

Hi @Julian_CHAMBRIER ,

> [@Julian\_CHAMBRIER](#):
>
> I know there is tfd.JointDistributionSequential but I’m not sure if it does the job.

To create distributions in TensorFlow Probability that take other distributions as parameters, you can use` tfd.JointDistributionSequential` or create custom distributions.

If you need more flexibility or want to define more complex hierarchical relationships, you can create custom distributions using TFP’s `tfd.Distribution` class.

Additionally you can refer to this official [Documentations](https://www.tensorflow.org/probability/api_docs/python/tfp/distributions/JointDistributionSequential) for better understanding and functionality .

Thank You .
