Bayesian Update in the Presence of Noise - Estimating the Ratio of Balls in a Jar

The name of the pictureThe name of the pictureThe name of the pictureClash 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?







share|cite|improve this question





















  • 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














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?







share|cite|improve this question





















  • 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












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?







share|cite|improve this question













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?









share|cite|improve this question












share|cite|improve this question




share|cite|improve this question








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
















  • 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










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_+);.
$$






share|cite|improve this answer





















  • And that's how it's done. Thanks.
    – IMM
    2 days ago










Your Answer




StackExchange.ifUsing("editor", function ()
return StackExchange.using("mathjaxEditing", function ()
StackExchange.MarkdownEditor.creationCallbacks.add(function (editor, postfix)
StackExchange.mathjaxEditing.prepareWmdForMathJax(editor, postfix, [["$", "$"], ["\\(","\\)"]]);
);
);
, "mathjax-editing");

StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "69"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
convertImagesToLinks: true,
noModals: false,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
noCode: true, onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);








 

draft saved


draft discarded


















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






























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_+);.
$$






share|cite|improve this answer





















  • And that's how it's done. Thanks.
    – IMM
    2 days ago














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_+);.
$$






share|cite|improve this answer





















  • And that's how it's done. Thanks.
    – IMM
    2 days ago












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_+);.
$$






share|cite|improve this answer













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_+);.
$$







share|cite|improve this answer













share|cite|improve this answer



share|cite|improve this answer











answered 2 days ago









joriki

164k10179328




164k10179328











  • 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




And that's how it's done. Thanks.
– IMM
2 days ago












 

draft saved


draft discarded


























 


draft saved


draft discarded














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













































































Comments

Popular posts from this blog

What is the equation of a 3D cone with generalised tilt?

Relationship between determinant of matrix and determinant of adjoint?

Color the edges and diagonals of a regular polygon