# Turning the target function for M-H into a distribution

**URL:** https://discourse.julialang.org/t/turning-the-target-function-for-m-h-into-a-distribution/65747
**Category:** General Usage
**Created:** [August 3, 2021, 1:01pm UTC](https://discourse.julialang.org/t/turning-the-target-function-for-m-h-into-a-distribution/65747 "2021-08-03T13:01:35Z")
**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 3, 2021, 1:01pm UTC](https://discourse.julialang.org/t/turning-the-target-function-for-m-h-into-a-distribution/65747/1 "2021-08-03T13:01:35Z")

</div>

I have a target function that I want to transform into a 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 a distribution, knowing that I have a customized distribution to propose the values of the vector `x`
