# Very new to all of this. Why doesn't this three line toy example work?

**URL:** <https://discourse.pymc.io/t/very-new-to-all-of-this-why-doesnt-this-three-line-toy-example-work/3468>\
**Category:** Questions\
**Created:** [June 22, 2019, 9:34am UTC](https://discourse.pymc.io/t/very-new-to-all-of-this-why-doesnt-this-three-line-toy-example-work/3468 "2019-06-22T09:34:41Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Joana](https://avatars.discourse-cdn.com/v4/letter/j/ed655f/32.png) [@Joana](https://discourse.pymc.io/u/Joana)\
**Post date:** [June 22, 2019, 9:34am UTC](https://discourse.pymc.io/t/very-new-to-all-of-this-why-doesnt-this-three-line-toy-example-work/3468/1 "2019-06-22T09:34:41Z")

</div>

```
with pm.Model() as model:

    likelihood = pm.Normal('prior', 10, 2, observed=[12,13,15])   
    posteriorSamples = pm.sample(draws=5000,step=pm.NUTS(),
progressbar=True,)['likelihood']
```

---

<div class="post-metadata">

**Author:** ![junpenglao](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.pymc.io/junpenglao/32/8_2.png) [@junpenglao](https://discourse.pymc.io/u/junpenglao)\
**Post date:** [June 22, 2019, 12:36pm UTC](https://discourse.pymc.io/t/very-new-to-all-of-this-why-doesnt-this-three-line-toy-example-work/3468/2 "2019-06-22T12:36:46Z")

</div>

because there is no free parameters in your model, thus nothing to be sampled from.

---

<div class="post-metadata">

**Author:** ![Joana](https://avatars.discourse-cdn.com/v4/letter/j/ed655f/32.png) [@Joana](https://discourse.pymc.io/u/Joana)\
**Post date:** [June 24, 2019, 10:43pm UTC](https://discourse.pymc.io/t/very-new-to-all-of-this-why-doesnt-this-three-line-toy-example-work/3468/3 "2019-06-24T22:43:58Z")

</div>

I’m misunderstanding something important. My intent is to say…

What is the distribution of values, assuming a prior of Normal(10,2), and the observations 12,13,15?

---

<div class="post-metadata">

**Author:** ![junpenglao](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.pymc.io/junpenglao/32/8_2.png) [@junpenglao](https://discourse.pymc.io/u/junpenglao)\
**Post date:** [June 25, 2019, 4:58am UTC](https://discourse.pymc.io/t/very-new-to-all-of-this-why-doesnt-this-three-line-toy-example-work/3468/4 "2019-06-25T04:58:54Z")

</div>

> [@Joana](#):
>
> What is the distribution of values, assuming a prior of Normal(10,2), and the observations 12,13,15?

This is an invalid question, as you cannot observed the prior, and it is unclear what this value you are referring to in “the distribution of values”.

In a Bayesian modeling language, I would assume that you are interested in the posterior distribution of some parameter of the likelihood (of the observed), and the prior is place on these parameters. Then your question depends on the observation likelihood function, and which parameter the prior is constraining. For example, you can have a prior of Normal(10, 2) on the **mu** of a Normal likelihood, which will give you a model like:

```python
with pm.Model() as model:
    mu = pm.Normal('prior', 10., 2.)
    likelihood = pm.Normal('likelihood', mu, 1., observed=[12,13,15])  

```

Noted that since Normal likelihood have two parameter (mu and sigma), the parameter that gets no prior will need to be assigned a fixed value.
