Bayesian Update in the Presence of Noise - Estimating the Ratio of Balls in a Jar
Clash Royale CLAN TAG#URR8PPP
up vote
1
down vote
favorite
There are two jars with red balls and blue balls. Your goal is to estimate the ratio of red to blue for each jar, assuming some initial prior for each jar.
On each iteration, you are handed a ball. You can see its color, and are told which jar it came from. However, for some known fraction, f, of the iterations, the information about which jar the ball came from is false. Whether the jar information is true or false is determined independently for each iteration. The ball is then replaced into the jar from which it actually came.
What is the correct update rule for the ratios of each jar on each iteration?
probability bayesian bayes-theorem
add a comment |Â
up vote
1
down vote
favorite
There are two jars with red balls and blue balls. Your goal is to estimate the ratio of red to blue for each jar, assuming some initial prior for each jar.
On each iteration, you are handed a ball. You can see its color, and are told which jar it came from. However, for some known fraction, f, of the iterations, the information about which jar the ball came from is false. Whether the jar information is true or false is determined independently for each iteration. The ball is then replaced into the jar from which it actually came.
What is the correct update rule for the ratios of each jar on each iteration?
probability bayesian bayes-theorem
I think you also need a prior on where the balls come from. Surely the result will be different if you initially expect the source of the ball to be picked randomly or if you expect the balls to be taken from a particular one of the jars.
â joriki
2 days ago
Yes - that's true. Let's assume it's promised to be 50/50, iid.
â IMM
2 days ago
add a comment |Â
up vote
1
down vote
favorite
up vote
1
down vote
favorite
There are two jars with red balls and blue balls. Your goal is to estimate the ratio of red to blue for each jar, assuming some initial prior for each jar.
On each iteration, you are handed a ball. You can see its color, and are told which jar it came from. However, for some known fraction, f, of the iterations, the information about which jar the ball came from is false. Whether the jar information is true or false is determined independently for each iteration. The ball is then replaced into the jar from which it actually came.
What is the correct update rule for the ratios of each jar on each iteration?
probability bayesian bayes-theorem
There are two jars with red balls and blue balls. Your goal is to estimate the ratio of red to blue for each jar, assuming some initial prior for each jar.
On each iteration, you are handed a ball. You can see its color, and are told which jar it came from. However, for some known fraction, f, of the iterations, the information about which jar the ball came from is false. Whether the jar information is true or false is determined independently for each iteration. The ball is then replaced into the jar from which it actually came.
What is the correct update rule for the ratios of each jar on each iteration?
probability bayesian bayes-theorem
edited 21 hours ago
Royi
2,91012045
2,91012045
asked 2 days ago
IMM
62
62
I think you also need a prior on where the balls come from. Surely the result will be different if you initially expect the source of the ball to be picked randomly or if you expect the balls to be taken from a particular one of the jars.
â joriki
2 days ago
Yes - that's true. Let's assume it's promised to be 50/50, iid.
â IMM
2 days ago
add a comment |Â
I think you also need a prior on where the balls come from. Surely the result will be different if you initially expect the source of the ball to be picked randomly or if you expect the balls to be taken from a particular one of the jars.
â joriki
2 days ago
Yes - that's true. Let's assume it's promised to be 50/50, iid.
â IMM
2 days ago
I think you also need a prior on where the balls come from. Surely the result will be different if you initially expect the source of the ball to be picked randomly or if you expect the balls to be taken from a particular one of the jars.
â joriki
2 days ago
I think you also need a prior on where the balls come from. Surely the result will be different if you initially expect the source of the ball to be picked randomly or if you expect the balls to be taken from a particular one of the jars.
â joriki
2 days ago
Yes - that's true. Let's assume it's promised to be 50/50, iid.
â IMM
2 days ago
Yes - that's true. Let's assume it's promised to be 50/50, iid.
â IMM
2 days ago
add a comment |Â
1 Answer
1
active
oldest
votes
up vote
0
down vote
I'll assume that, as specified in a comment, the balls are known to come from either jar with equal probability, independently chosen for each ball.
I take your first paragraph to imply that your initial prior for the ratios factorizes into a product of marginal priors for the individual jars. This factorizability won't be preserved by the updates. For example, for $f=frac12$ and a prior that's indifferent between all-red and all-blue jars (and excludes all fractional proportions), if you get a red ball, your prior becomes $frac12$ for two all-red jars, $frac14$ for each combination of mixed jars and $0$ for two all-blue jars, which doesn't factor.
Thus we might as well start with a general joint prior $p(lambda_1,lambda_2)$ for the proportions of red balls in the jars. But then we can map the problem to the simpler problem of drawing directly from two jars. Consider two virtual jars, one for each possible announcement where a ball came from. Then the âannouncement $k$â jar has an effective proportion $(1-f)lambda_k+flambda_overline k$ of red balls (where $overline k$ is the jar other than $k$). The transformation matrix
$$
pmatrix1-f&f\f&1-f
$$
is invertible as long as $fnefrac12$, so you have a one-to-one map between the real ratios and the virtual ratios. You can transform your prior to the virtual ratios, perform standard updates for two jars on the virtual ratios, and transform back to the real ratios.
The case $f=frac12$ has to be treated separately, because you're not getting any information on which jar the balls are coming from. In this case, you should transform your prior to new variables $lambda_pm=fraclambda_1pmlambda_22$, treat the marginal prior for $lambda_+$ as the prior for a single jar, update it in the standard way with the balls you receive (ignoring the random information about the origin of the balls), and calculate the updated full prior as
$$
p(lambda_+,lambda_-midtextdata)=p(lambda_+,lambda_-)fracp(lambda_+midtextdata)p(lambda_+);.
$$
And that's how it's done. Thanks.
â IMM
2 days ago
add a comment |Â
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
0
down vote
I'll assume that, as specified in a comment, the balls are known to come from either jar with equal probability, independently chosen for each ball.
I take your first paragraph to imply that your initial prior for the ratios factorizes into a product of marginal priors for the individual jars. This factorizability won't be preserved by the updates. For example, for $f=frac12$ and a prior that's indifferent between all-red and all-blue jars (and excludes all fractional proportions), if you get a red ball, your prior becomes $frac12$ for two all-red jars, $frac14$ for each combination of mixed jars and $0$ for two all-blue jars, which doesn't factor.
Thus we might as well start with a general joint prior $p(lambda_1,lambda_2)$ for the proportions of red balls in the jars. But then we can map the problem to the simpler problem of drawing directly from two jars. Consider two virtual jars, one for each possible announcement where a ball came from. Then the âannouncement $k$â jar has an effective proportion $(1-f)lambda_k+flambda_overline k$ of red balls (where $overline k$ is the jar other than $k$). The transformation matrix
$$
pmatrix1-f&f\f&1-f
$$
is invertible as long as $fnefrac12$, so you have a one-to-one map between the real ratios and the virtual ratios. You can transform your prior to the virtual ratios, perform standard updates for two jars on the virtual ratios, and transform back to the real ratios.
The case $f=frac12$ has to be treated separately, because you're not getting any information on which jar the balls are coming from. In this case, you should transform your prior to new variables $lambda_pm=fraclambda_1pmlambda_22$, treat the marginal prior for $lambda_+$ as the prior for a single jar, update it in the standard way with the balls you receive (ignoring the random information about the origin of the balls), and calculate the updated full prior as
$$
p(lambda_+,lambda_-midtextdata)=p(lambda_+,lambda_-)fracp(lambda_+midtextdata)p(lambda_+);.
$$
And that's how it's done. Thanks.
â IMM
2 days ago
add a comment |Â
up vote
0
down vote
I'll assume that, as specified in a comment, the balls are known to come from either jar with equal probability, independently chosen for each ball.
I take your first paragraph to imply that your initial prior for the ratios factorizes into a product of marginal priors for the individual jars. This factorizability won't be preserved by the updates. For example, for $f=frac12$ and a prior that's indifferent between all-red and all-blue jars (and excludes all fractional proportions), if you get a red ball, your prior becomes $frac12$ for two all-red jars, $frac14$ for each combination of mixed jars and $0$ for two all-blue jars, which doesn't factor.
Thus we might as well start with a general joint prior $p(lambda_1,lambda_2)$ for the proportions of red balls in the jars. But then we can map the problem to the simpler problem of drawing directly from two jars. Consider two virtual jars, one for each possible announcement where a ball came from. Then the âannouncement $k$â jar has an effective proportion $(1-f)lambda_k+flambda_overline k$ of red balls (where $overline k$ is the jar other than $k$). The transformation matrix
$$
pmatrix1-f&f\f&1-f
$$
is invertible as long as $fnefrac12$, so you have a one-to-one map between the real ratios and the virtual ratios. You can transform your prior to the virtual ratios, perform standard updates for two jars on the virtual ratios, and transform back to the real ratios.
The case $f=frac12$ has to be treated separately, because you're not getting any information on which jar the balls are coming from. In this case, you should transform your prior to new variables $lambda_pm=fraclambda_1pmlambda_22$, treat the marginal prior for $lambda_+$ as the prior for a single jar, update it in the standard way with the balls you receive (ignoring the random information about the origin of the balls), and calculate the updated full prior as
$$
p(lambda_+,lambda_-midtextdata)=p(lambda_+,lambda_-)fracp(lambda_+midtextdata)p(lambda_+);.
$$
And that's how it's done. Thanks.
â IMM
2 days ago
add a comment |Â
up vote
0
down vote
up vote
0
down vote
I'll assume that, as specified in a comment, the balls are known to come from either jar with equal probability, independently chosen for each ball.
I take your first paragraph to imply that your initial prior for the ratios factorizes into a product of marginal priors for the individual jars. This factorizability won't be preserved by the updates. For example, for $f=frac12$ and a prior that's indifferent between all-red and all-blue jars (and excludes all fractional proportions), if you get a red ball, your prior becomes $frac12$ for two all-red jars, $frac14$ for each combination of mixed jars and $0$ for two all-blue jars, which doesn't factor.
Thus we might as well start with a general joint prior $p(lambda_1,lambda_2)$ for the proportions of red balls in the jars. But then we can map the problem to the simpler problem of drawing directly from two jars. Consider two virtual jars, one for each possible announcement where a ball came from. Then the âannouncement $k$â jar has an effective proportion $(1-f)lambda_k+flambda_overline k$ of red balls (where $overline k$ is the jar other than $k$). The transformation matrix
$$
pmatrix1-f&f\f&1-f
$$
is invertible as long as $fnefrac12$, so you have a one-to-one map between the real ratios and the virtual ratios. You can transform your prior to the virtual ratios, perform standard updates for two jars on the virtual ratios, and transform back to the real ratios.
The case $f=frac12$ has to be treated separately, because you're not getting any information on which jar the balls are coming from. In this case, you should transform your prior to new variables $lambda_pm=fraclambda_1pmlambda_22$, treat the marginal prior for $lambda_+$ as the prior for a single jar, update it in the standard way with the balls you receive (ignoring the random information about the origin of the balls), and calculate the updated full prior as
$$
p(lambda_+,lambda_-midtextdata)=p(lambda_+,lambda_-)fracp(lambda_+midtextdata)p(lambda_+);.
$$
I'll assume that, as specified in a comment, the balls are known to come from either jar with equal probability, independently chosen for each ball.
I take your first paragraph to imply that your initial prior for the ratios factorizes into a product of marginal priors for the individual jars. This factorizability won't be preserved by the updates. For example, for $f=frac12$ and a prior that's indifferent between all-red and all-blue jars (and excludes all fractional proportions), if you get a red ball, your prior becomes $frac12$ for two all-red jars, $frac14$ for each combination of mixed jars and $0$ for two all-blue jars, which doesn't factor.
Thus we might as well start with a general joint prior $p(lambda_1,lambda_2)$ for the proportions of red balls in the jars. But then we can map the problem to the simpler problem of drawing directly from two jars. Consider two virtual jars, one for each possible announcement where a ball came from. Then the âannouncement $k$â jar has an effective proportion $(1-f)lambda_k+flambda_overline k$ of red balls (where $overline k$ is the jar other than $k$). The transformation matrix
$$
pmatrix1-f&f\f&1-f
$$
is invertible as long as $fnefrac12$, so you have a one-to-one map between the real ratios and the virtual ratios. You can transform your prior to the virtual ratios, perform standard updates for two jars on the virtual ratios, and transform back to the real ratios.
The case $f=frac12$ has to be treated separately, because you're not getting any information on which jar the balls are coming from. In this case, you should transform your prior to new variables $lambda_pm=fraclambda_1pmlambda_22$, treat the marginal prior for $lambda_+$ as the prior for a single jar, update it in the standard way with the balls you receive (ignoring the random information about the origin of the balls), and calculate the updated full prior as
$$
p(lambda_+,lambda_-midtextdata)=p(lambda_+,lambda_-)fracp(lambda_+midtextdata)p(lambda_+);.
$$
answered 2 days ago
joriki
164k10179328
164k10179328
And that's how it's done. Thanks.
â IMM
2 days ago
add a comment |Â
And that's how it's done. Thanks.
â IMM
2 days ago
And that's how it's done. Thanks.
â IMM
2 days ago
And that's how it's done. Thanks.
â IMM
2 days ago
add a comment |Â
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f2871696%2fbayesian-update-in-the-presence-of-noise-estimating-the-ratio-of-balls-in-a-ja%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
I think you also need a prior on where the balls come from. Surely the result will be different if you initially expect the source of the ball to be picked randomly or if you expect the balls to be taken from a particular one of the jars.
â joriki
2 days ago
Yes - that's true. Let's assume it's promised to be 50/50, iid.
â IMM
2 days ago