Posterior predictive check question

I now thought a while about it and still do not get it.

In my understanding, to get a posterior predictive distribution by sampling, the process should go as follows:

  • First I draw a value of my estimated parameter from the posterior, i.e. in this case some mu.
  • I set this mu as the parameter of my likelihood, which in this case is the mean of a Normal. The sigma of this normal is fixed to 2 in my example.
  • I then sample a value of this Normal with the drawn mu value and sigma =2.
  • The result of this process is a new sampling value ^x for my PPD.
  • I repeat this process many times and stack up the different ^x values to a histogram (or finally a kde).

This histogram or kde is my first posterior predictive distribution.

When I then repeat this to get 100 PPDs and plot these kde’s, I should get the result of plot_ppc for the posterior_predictive.

Nowhere in this process I can see that the observed values play a role. They just contributed to the sampling of the posterior, which has happened before.

What do I misunderstand?