I'm trying to get a predictive density and currently getting something which I know can't be true (based on both logic and simulation based techniques. Here's the relevant information.

$\theta$ is a probability and thus $0 \leq \theta \leq 1$

$p(x|\theta) = 1/\theta$ (uniform) edit: $0 \leq x \leq \theta$ (and $p(x|\theta) = 0$ otherwise)

$p(\theta) = 6\theta (1-\theta)$ (prior but we are unable to observe data)

$p(x) = \int_\theta p(x | \theta) \cdot p(\theta) d\theta$ (general way to find the predictive, if I'm not mistaken)

What I have,

$\int_0^1 6\theta(1-\theta) \frac{1}{\theta} d\theta$.

Unfortunately, solving this seems to just give me 3 (both by integration by parts or by simplifying it first). But the predictive should be a function in $x$ which is monotonically decreasing and concave up, right?

Edit: here are the results of my simulation (100000 trials), for reference/checking. predictive simulation

  • $\begingroup$ Your formula for $p(\theta)$ does not give a probability distribution for $\theta\in[0,1]$. Perhaps $\theta$ is supposed to be restricted to a narrower interval? $\endgroup$ – whuber Oct 30 '14 at 2:20
  • $\begingroup$ The domain of $x$ depends on $\theta$? $\endgroup$ – Neil G Oct 30 '14 at 2:59
  • $\begingroup$ @whuber I guess the question's been edited since $p(\theta)$ is currently a beta distribution with parameters 2,2. $\endgroup$ – Neil G Oct 30 '14 at 3:01
  • 1
    $\begingroup$ @Neil G you're right--it is a valid distribution. It's hard to tell what "$x_1$" or "$d$" are, though, and how they might be related to each other. And $p(x|\theta)$ is not a distribution function--until one understands that implicitly it may be intended to be $0$ when $x\lt 0$ or $x\gt \theta$ (I suspect). That's probably the crux of the problem. $\endgroup$ – whuber Oct 30 '14 at 3:11
  • $\begingroup$ @whuber, Sorry about those creeping in. I meant to simply everything to thetas and x's as opposed to the variables I had in the problem itself. $\endgroup$ – BrewStats Oct 30 '14 at 12:31

With the bounds, you have

$$ \begin{align} f(x) &= \int_0^1 6\theta(1-\theta) \frac{1}{\theta} [x < {\theta}] d\theta \\ &= 6\int_x^{1} (1-\theta) d\theta \\ &= 3\left(x-1\right)^2 \end{align} $$

  • $\begingroup$ Thanks so much, forgot about accounting for those in the integration! $\endgroup$ – BrewStats Oct 30 '14 at 12:57
  • $\begingroup$ @BrewStats: I think there's an error in the last step actually. Maybe someone can fix it. $\endgroup$ – Neil G Oct 30 '14 at 12:59
  • $\begingroup$ Ah yeah, this is increasing on (0,1), so something is still off. $\endgroup$ – BrewStats Oct 30 '14 at 13:02
  • $\begingroup$ @BrewStats: Think I got it now. $\endgroup$ – Neil G Oct 30 '14 at 13:02
  • $\begingroup$ I think something is still off, I just posted a histogram of my simulation results. $x$ can't be greater than 1 since it's still bounded above by $\theta$ in the predictive and $0\leq \theta \leq 1$ $\endgroup$ – BrewStats Oct 30 '14 at 13:06

Your problem is that you have omitted the bounds on $x$ in $p(x|\theta)$.

  • $\begingroup$ Sorry about that, I just added them, it's bounded below by 0 and above by $\theta$ $\endgroup$ – BrewStats Oct 30 '14 at 12:30
  • 2
    $\begingroup$ I interpreted the question as "what am I doing wrong?" Hence it was an answer to that question. $\endgroup$ – Tom Minka Oct 30 '14 at 12:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.