Baysian econometrics Assume we have the following Bayesian problem. The prior for π is P(π = 1/2) = P(π = 1/3) = 1/2. We then observe X = x1+x2+....+x10 where x1,...,x10 iid P(xi = 1) = 1 − P(xi = 0) = π What is the posterior distribution for π when X = 5 ? (Explain your computation) 
I'm going to use $\alpha$ rather than $\pi$ $P[\alpha X] = \dfrac{P[X\alpha]P[\alpha]}{P[X]}$ given $\alpha$ the $x_i$'s form a binomially distributed sequence. $P[\text{X 1's}] = \binom{10}{X} \alpha^X (1\alpha)^{10X}$ and thus $P[X  \alpha] = \binom{10}{X} \alpha^X(1\alpha)^{10X},~0 \leq X \leq 10$ $P[\alpha]=\dfrac 1 2$ so we end up with $P[\alpha X] = \dfrac{\frac 1 2 \binom{10}{X}\alpha^{X}(1\alpha)^{10X}}{\frac 1 2 \binom{10}{X}\left(\left(\frac 1 2\right)^{10} + \left(\frac 1 3\right)^X\left(\frac 2 3\right)^{10X}\right)} $ $P[\alpha X]=\dfrac{\alpha^{X}(1\alpha)^{10X}}{\left(\left(\frac 1 2\right)^{10} + \left(\frac 1 3\right)^X\left(\frac 2 3\right)^{10X}\right)},~0 \leq X \leq 10,~\alpha \in \left \{\dfrac 1 2, \dfrac 1 3 \right \}$ I leave it to you to evaluate $P[\alpha  5]$ 
Thanks Romsek, very clear your demonstration. I have a serie of exercises in this field. exercise: You go to see a doctor because you broke your left thumb while using a hammer. The doctor selects you at random to have a blood test for HIV, which for the purposes of this exercise we will say is currently suspected to affect 1 in 10,000 people in your neighborhood. The test is such that the probability of a false positive is 1%. The probability of a false negative is zero. You test positive. What is the new probability that have HIV ? (do the computation using Bayes theorem and explain the result). 
why don't you give it a go first and post your work if you have any problems. 
You are right Romsek, for the first i have done the same reasonning like you but i had some the difficult to get that the distribution of X is binomial. THANKS FOR YOU ANSWER. For the second, here is what i have done, is it correct? THanks for you help I begin with this: H: "event to have HIV" Hc:" the opposite event of H" T: positif test N: negatif test With the design of the tree ( i don't nkow how to put it here) P(T)= (1/10000)*100%+1%*(11/10000) P(T)=P(H)*P(T/H)+P(Hc)*P(T/Hc)=P(H)*P(T/H)+(1P(H))*P(T/Hc) , thus P(H)= (P(T)P(T/Hc))/(P(T/H)P(T/Hc)) 
I find it a bit hard to decipher what you've written. Let me show it and you can compare the two. $P[HIV]=\dfrac {1}{10000}$ $P[!HIV]= \dfrac{9999}{10000}$ Let $T=1$ be a positive test result. $T=0$ is a negative test result $P[THIV]=1$ $P[T!HIV] = 0.01$ $P[T] = P[THIV]P[HIV] + P[T!HIV]P[!HIV] = 1\cdot \dfrac{1}{10000}+(0.01)\cdot \dfrac{9999}{10000} = \dfrac{10099}{1000000}$ we are after $P[HIV T]$ $P[HIVT] = \dfrac{P[THIV]P[HIV]}{P[T]}=\dfrac{1\cdot \frac{1}{10000}}{\frac{10099}{1000000}} = \dfrac{100}{10099} \approx 0.9902\%$ This shows that the test has far too high a false alarm rate for the a priori probability of having HIV rendering the text useless. 
OK I get the point, for P(T) we have the same result but after, I compute P(HIV) . To get the power of the test, as you do, i have to compute P(HIV/T). So to be useful, the probability as to be egal to 1? this means, we can miss some HIV people with this kind of test. Thanks a lot. 
Quote:
The probability that you actually have HIV given positive test results is only 0.99%. I took a look at $P[HIVT]$ and saw that you need $P[T!HIV]=10^{4}$ for $P[HIVT]\approx 50\%$ and $P[T!HIV]=10^{5}$ for $P[HIVT]\approx 90\%$ 
Quote:

Thanks again for your help, for the next exercis, we have Consider the density f(xλ) = 1/λ*exp(−x) for x ≥ 0. 1) If the prior for λ ≥ 1 is uninformative i.e. π(λ) ∝ 1 what is the posterior ? Is it proper ? 2) If the prior for λ ≥ 1 is π(λ) ∝ λ^(−2) what is the posterior ? Is it proper ? Does it admit an expectation ? Does it admit a variance ? 
All times are GMT 8. The time now is 05:52 PM. 
Copyright © 2019 My Math Forum. All rights reserved.