# Turning a function into distrubution for turing

**URL:** https://discourse.julialang.org/t/turning-a-function-into-distrubution-for-turing/66016
**Category:** Probabilistic Programming
**Tags:** turing
**Created:** [August 8, 2021, 11:54am UTC](https://discourse.julialang.org/t/turning-a-function-into-distrubution-for-turing/66016 "2021-08-08T11:54:38Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![marouane](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/marouane/32/16267_2.png) [@marouane](https://discourse.julialang.org/u/marouane)
#### Post date: [August 8, 2021, 11:54am UTC](https://discourse.julialang.org/t/turning-a-function-into-distrubution-for-turing/66016/1 "2021-08-08T11:54:39Z")

</div>

I have a target function that I want to transform into distribution in order to use `Turing`, let’s suppose that the target function is written on this form:

```julia
logtarget(x::Vector)= log(prod(x))^2

```

how can I turn it into distribution, knowing that I have a customized distribution to propose the values of the vector `x`.
