Can you give me some suggestion on how to solve this?
Let $X_1, ... X_{20} |\theta \stackrel{iid}{\sim} Bern(\theta)$ and suppose $\theta \stackrel{}{\sim} Beta(2,2)$, namely:
$P[X_i = x | \theta] = \theta^x(1-\theta)^{1-x} \mathbb{1}_{0,1} (x)$ , and $g(\theta) = 6\theta(1-\theta)\mathbb{1}_{[0,1]}(\theta)$
(a) identify the posterior distribution of $\theta$, given $X_1=x_1, ... X_{20} = x_{20} $
What I did:
$f_{\theta | x}(\theta | x) = \frac{6\theta(1-\theta)}{\theta^{\sum_{i=1}^{n}x_{i}}(1 - {\theta)^{n-\sum_{i=1}^{n}x_{i}}} 6\theta(1-\theta)}$
Is this wrong? What is the range?
(b) determine the predictive distribution of $X_{21}$, given the observed sample, namely $P[X_{21} = 1 | x_1,...x_{20}]$
What I did:
$f_{x}(x) = \theta^{\sum_{i=1}^{n}x_{i}}(1 - {\theta)^{n-\sum_{i=1}^{n}x_{i}}6\theta(1-\theta)}$
(c) If the observed sample is such that $s_{20} = \sum_{i=1}^{20} x_i = 10$, determine $P[\theta < 0.5 | x_1,...x_{20}]$
What I did:
Should I compute the integral or the sum of $f_{x}(x)$? Or something totally different?