**R programming ONLY **
Suppose we have two different boxes of balls.
Box A has N number of balls in it, some white some black but we
don't know how many of each color.
Box B has Kw white ball(s) and Kb black ball(s).
Please draw R number of balls from Box A and move them to Box B.
Then, please draw T balls sequentially from Box B.
Suppose the sequence of the these balls turns out to be [S1, S2,
. . . , ST ]. **We are interested in the composition of balls in
Box A.**
List your hypotheses and count up all the ways the observed data
can happen. Which hypothesis would you believe more?
(a) [R coding only] calculate the number of ways the observed
sequence [S1, S2, . . . , ST ] can happen for each hypothesis. Your
function should work for any value of N, Kw, Kb, R, T and for
any sequence of balls [S1, S2, . . . , ST ].
(b) Which hypothesis is most likely when N = 20, Kw = 10, Kb = 10,
R = 5 and the observed sequence is [W, B, B, W, B, W].
**R programming ONLY ** Suppose we have two different boxes of balls. Box A has N number of balls in it, some white some
-
- Site Admin
- Posts: 899603
- Joined: Mon Aug 02, 2021 8:13 am