# Predictive with uniform likelihood

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.

• 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?
– whuber
Oct 30, 2014 at 2:20
• The domain of $x$ depends on $\theta$? Oct 30, 2014 at 2:59
• @whuber I guess the question's been edited since $p(\theta)$ is currently a beta distribution with parameters 2,2. Oct 30, 2014 at 3:01
• @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.
– whuber
Oct 30, 2014 at 3:11
• @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. Oct 30, 2014 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}

• Thanks so much, forgot about accounting for those in the integration! Oct 30, 2014 at 12:57
• @BrewStats: I think there's an error in the last step actually. Maybe someone can fix it. Oct 30, 2014 at 12:59
• Ah yeah, this is increasing on (0,1), so something is still off. Oct 30, 2014 at 13:02
• @BrewStats: Think I got it now. Oct 30, 2014 at 13:02
• 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$ Oct 30, 2014 at 13:06

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

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