求ε的后验分布:非均匀骰子试验与先验均匀分布
Hey there, let's break down these two posterior distribution problems clearly, step by step.
If we don't have any observed data to update our prior belief, the posterior distribution is identical to the prior distribution.
First, a quick correction on the prior pdf provided: the original expression $f_0(x) = \frac{1}{6} \chi_{[0, \frac{1}{6}]}(x)$ isn't a valid probability density function (pdf) — its total integral over the interval $[0, \frac{1}{6}]$ is $\frac{1}{36}$, which doesn't equal 1 (a requirement for all pdfs). For a uniform distribution on $[a, b]$, the correct pdf is $\frac{1}{b-a}$. Here, $b-a = \frac{1}{6}$, so the valid prior pdf is:
$$f_0(\varepsilon) = 6 \cdot \chi_{[0, \frac{1}{6}]}(\varepsilon)$$
(where $\chi$ is the indicator function, equal to 1 when $\varepsilon$ is in $[0, \frac{1}{6}]$, 0 otherwise.)
Without any observations, the posterior distribution $f(\varepsilon|\text{no data})$ is exactly this uniform prior: it's uniform over $[0, \frac{1}{6}]$ with pdf $6$ in that interval.
Now let's solve the problem with actual observations: first roll is "6", second roll is "2" (a non-"6" outcome).
Key Definitions
- Valid prior pdf: $f_0(\varepsilon) = 6 \cdot \chi_{[0, \frac{1}{6}]}(\varepsilon)$
- Probability of rolling "6": $P(6|\varepsilon) = \frac{1}{6} + \varepsilon$
- Probability of rolling a non-"6" (like "2"): $P(\text{non-}6|\varepsilon) = \frac{5}{6} - \varepsilon$
Step 1: Calculate the Likelihood
The likelihood of our observed data (one "6" and one non-"6") is the product of the individual outcome probabilities:
$$L(\varepsilon) = P(6|\varepsilon) \times P(\text{non-}6|\varepsilon) = \left(\frac{1}{6} + \varepsilon\right)\left(\frac{5}{6} - \varepsilon\right)$$
Expanding this to simplify later steps:
$$L(\varepsilon) = \frac{5}{36} + \frac{2}{3}\varepsilon - \varepsilon^2$$
Step 2: Apply Bayes' Theorem
Bayes' Theorem tells us the posterior pdf is proportional to the product of the prior and the likelihood:
$$f(\varepsilon|\text{data}) \propto f_0(\varepsilon) \times L(\varepsilon)$$
Since the prior is 6 over $[0, \frac{1}{6}]$ (and 0 outside), the unnormalized posterior is:
$$f_{\text{unnorm}}(\varepsilon) = 6 \times \left(\frac{5}{36} + \frac{2}{3}\varepsilon - \varepsilon^2\right) = \frac{5}{6} + 4\varepsilon - 6\varepsilon^2 \quad \text{for } 0 \leq \varepsilon \leq \frac{1}{6}$$
Step 3: Normalize to Get a Valid Posterior Pdf
To turn this into a valid pdf, we divide by the total integral of the unnormalized posterior over $\varepsilon \in [0, \frac{1}{6}]$ (let's call this integral $Z$):
$$Z = \int_{0}^{\frac{1}{6}} \left(\frac{5}{6} + 4\varepsilon - 6\varepsilon^2\right) d\varepsilon$$
Calculating term by term:
- $\int_{0}^{\frac{1}{6}} \frac{5}{6} d\varepsilon = \frac{5}{36}$
- $\int_{0}^{\frac{1}{6}} 4\varepsilon d\varepsilon = \frac{1}{18}$
- $\int_{0}^{\frac{1}{6}} -6\varepsilon^2 d\varepsilon = -\frac{1}{108}$
Adding these together:
$$Z = \frac{5}{36} + \frac{1}{18} - \frac{1}{108} = \frac{15 + 6 - 1}{108} = \frac{20}{108} = \frac{5}{27}$$
Now divide the unnormalized posterior by $Z$ to get the final valid posterior pdf:
$$f(\varepsilon|\text{data}) = \frac{\frac{5}{6} + 4\varepsilon - 6\varepsilon^2}{\frac{5}{27}} = \frac{27}{5} \left(\frac{5}{6} + 4\varepsilon - 6\varepsilon^2\right)$$
Simplifying this expression gives:
$$f(\varepsilon|\text{data}) = \frac{9}{2} + \frac{108}{5}\varepsilon - \frac{162}{5}\varepsilon^2 \quad \text{for } 0 \leq \varepsilon \leq \frac{1}{6}$$
And $f(\varepsilon|\text{data}) = 0$ outside this interval.
内容的提问来源于stack exchange,提问作者Angie

