You test a classifier on a test set consisting of 10 iid items. The classifier makes 2 mistakes. Assume the true error rate is $x$.
Let the prior be $ x \sim Beta(\alpha, \beta)$. Derive the posterior given the classifier's performance.
I know that to calculate the posterior, I use the definition $p(\theta|X) \propto p(\theta)p(X|\theta)$. I can plug in the definition of the beta distribution for $p(\theta)$ but I'm not sure what to plug in for the likelihood $p(X|\theta)$.
Is the likelihood function $p(X|\theta) = x^2(1-x)^8$?
Best Answer
Your formulas look a bit strange because $\theta=x$. $X$ and $x$ are usually used to denote the random variable and the data, not the parameter.
Anyway, if $X$ is the number of mistakes among 10 iid items then $X\sim Bin(10,x)$, i.e. $X$ follows the binomial distribution. Thus $p(X|x)=\binom{10}{X} x^2(1-x)^8$, and you can compute the posterior using your formula.