You are on page 1of 6

6.1 There is an urn containing 9 balls, which can be either green or red.

The number of red balls in the


urn is not known. One ball is drawn at random from the urn, and its color is observed.

a) What is the Bayesian universe of the experiment.

Culoare roșie Culoare verde


0 1 0
1 1 0
2 1 0
3 1 0
4 1 0
5 1 0
6 1 0
7 1 0
8 1 0
9 1 0

Culoare roșie Culoare verde


0 0 1
1 0 1
2 0 1
3 0 1
4 0 1
5 0 1
6 0 1
7 0 1
8 0 1
9 0 1

b) Let X be the number of red balls in the urn. Assume that all possible values of X from 0 to 9 are equally
likely. Let Y1 =1 if the first ball drawn is red, and Y1=0 otherwise. Fill in the joint probability table for X and
Y1 given below:
X aprior Y1 = 0 (prima bila nu este rosie) Y1 = 1 (prima bila este rosie)
0 1/10 1/10 * 9/9 = 9/90 1/10 * 0/9 = 0/90
1 1/10 1/10 * 8/9 = 8/90 1/10 * 1/9 = 1/90
2 1/10 1/10 * 7/9 = 7/90 1/10 * 2/9 = 2/90
3 1/10 1/10 * 6/9 = 6/90 1/10 * 3/9 = 3/90
4 1/10 1/10 * 5/9 = 5/90 1/10 * 4/9 = 4/90
5 1/10 1/10 * 4/9 = 4/90 1/10 * 5/9 = 5/90
6 1/10 1/10 * 3/9 = 3/90 1/10 * 6/9 = 6/90
7 1/10 1/10 * 2/9 = 2/90 1/10 * 7/9 = 7/90
8 1/10 1/10 * 1/9 = 1/90 1/10 * 8/9 = 8/90
9 1/10 1/10 * 0/9 = 0/90 1/10 * 9/9 = 9/90
Suma pe coloana = 45/90 Suma pe coloana = 45/90

c) Find the marginal distribution of Y 1 and put it in the table.

Suma pe coloana = 45/90 Suma pe coloana = 45/90

d) Suppose a red ball was drawn. What is the reduced Bayesian universe?

Din matricea originala cu toate posibilitatile de extragere, se preiau doar cazurile atunci cand prima bila
extrasa este rosie, adica:

Y1 = 1 (prima bila este rosie)


1/10 * 0/9 = 0/90
1/10 * 1/9 = 1/90
1/10 * 2/9 = 2/90
1/10 * 3/9 = 3/90
1/10 * 4/9 = 4/90
1/10 * 5/9 = 5/90
1/10 * 6/9 = 6/90
1/10 * 7/9 = 7/90
1/10 * 8/9 = 8/90
1/10 * 9/9 = 9/90
Suma pe coloana = 45/90

e) Calculate the posterior probability distribution of X .

Distributia probabilitatilor aposterioare se calculeaza prin raportul dintre likelihood * probabilitatea


apriori si suma tuturor likelihood, obtinand urmatoarele rezultate:
X aprior likelihood Aprior * likelihood Aposterior
0 1/10 0/9 1/10 * 0/9 = 0/90 (0/90) / (45/90) = 0/45
1 1/10 1/9 1/10 * 1/9 = 1/90 (1/90) / (45/90) = 1/45
2 1/10 2/9 1/10 * 2/9 = 2/90 (2/90) / (45/90) = 2/45
3 1/10 3/9 1/10 * 3/9 = 3/90 (3/90) / (45/90) = 3/45
4 1/10 4/9 1/10 * 4/9 = 4/90 (4/90) / (45/90) = 4/45
5 1/10 5/9 1/10 * 5/9 = 5/90 (5/90) / (45/90) = 5/45
6 1/10 6/9 1/10 * 6/9 = 6/90 (6/90) / (45/90) = 6/45
7 1/10 7/9 1/10 * 7/9 = 7/90 (7/90) / (45/90) = 7/45
8 1/10 8/9 1/10 * 8/9 = 8/90 (8/90) / (45/90) = 8/45
9 1/10 9/9 1/10 * 9/9 = 9/90 (9/90) / (45/90) = 9/45
Suma pe coloana = 45/90 Suma pe coloana = 45/45 = 1

f) Find the posterior distribution of X by filling in the simplified table:


6.3 Suppose we look at the two draws from the urn (without replacement) as a single experiment. The
results were first draw red, second draw green. Fiind the posterior distribution of X by filling in the
simplified table.

Apriori likelihood Apriori * likelihood Aposteriori


0 1/10 0/9 * 1 1/10 * 0/9 * 1 = 0/90(*8=0/720) (0/720) / (120/720) = 0/120
1 1/10 1/9 * 8/8 1/10 * 1/9 * 8/8 = 8/720 (8/720) / (120/720) = 8/120
2 1/10 2/9 * 7/8 1/10 * 2/9 * 7/8 = 14/720 (14/720) / (120/720) = 14/120
3 1/10 3/9 * 6/8 1/10 * 3/9 * 6/8 = 18/720 (18/720) / (120/720) = 18/120
4 1/10 4/9 * 5/8 1/10 * 4/9 * 5/8 = 20/720 (20/720) / (120/720) = 20/120
5 1/10 5/9 * 4/8 1/10 * 5/9 * 4/8 = 20/720 (20/720) / (120/720) = 20/120
6 1/10 6/9 * 3/8 1/10 * 6/9 * 3/8 = 18/720 (18/720) / (120/720) = 18/120
7 1/10 7/9 * 2/8 1/10 * 7/9 * 2/8 = 14/720 (14/720) / (120/720) = 14/120
8 1/10 8/9 * 1/8 1/10 * 8/9 * 1/8 = 8/720 (8/720) / (120/720) = 8/120
9 1/10 9/9 * 0/8 1/10 * 9/9 * 0/8 = 0/720 (0/720) / (120/720) = 0/120
Prob prima 120/720 720/720 = 1
bila extrasa sa
fie rosie *
a doua bila
extrasa sa fie
verde
6.5 Suppose another 5 independent trials of the experiment are performed and Y 2 = 2 succeses are
observed. Use the posterior distribution for pi from 6.4 as the prior distribution for pi. Fiind the new
posterior distribution by filling in the simplified table.
6.7 Let Y be the number of counts of a Poisson random variable with mean mu. Suppose the 5 possible
values of p are 1, 2, 3, 4, and 5. We don’t have any reason to give any possible value more weight than
any other value, so we give them equal prior weight. Y = 2 was observed. Find the posterior distribution
by filling in the simplified table.

You might also like