Comparing two random variables with monte carlo sampling
$begingroup$
Suppose there are two numbers X1 and X2 that are from a random continuous probability distribution with unknown range. You are given the value of X1 and you need to determine whether X1 is less than or greater than X2.
Simply guessing would yield a 50% success rate.
How would you develop a method to improve the success rate?
One Possible Answer:
Apparently if you used Monte Carlo sampling, you can do better than 50%. If you compare X1 to a number from a probability distribution that covers the range of the unknown distribution (we can use any normal distribution since its range is -inf, +inf) and use that result to decide whether X1 is > or < X2.
Example:
Lets say we are given X1 and Y ~ N(u, sigma), where u can be any real number and sigma > 0. If X1 > Y, then we would make the guess that X1 > X2, else X1 < X2. If we do this for a large n, our accuracy for X1 would be > 50%.
I ran this simulation and the results are indeed better than 50%. However, I don't quite understand it intuitively and if anyone is familiar with this technique could you please break it down for me? Proofs of this method working for this problem would also be very helpful.
statistics probability-distributions sampling monte-carlo
$endgroup$
add a comment |
$begingroup$
Suppose there are two numbers X1 and X2 that are from a random continuous probability distribution with unknown range. You are given the value of X1 and you need to determine whether X1 is less than or greater than X2.
Simply guessing would yield a 50% success rate.
How would you develop a method to improve the success rate?
One Possible Answer:
Apparently if you used Monte Carlo sampling, you can do better than 50%. If you compare X1 to a number from a probability distribution that covers the range of the unknown distribution (we can use any normal distribution since its range is -inf, +inf) and use that result to decide whether X1 is > or < X2.
Example:
Lets say we are given X1 and Y ~ N(u, sigma), where u can be any real number and sigma > 0. If X1 > Y, then we would make the guess that X1 > X2, else X1 < X2. If we do this for a large n, our accuracy for X1 would be > 50%.
I ran this simulation and the results are indeed better than 50%. However, I don't quite understand it intuitively and if anyone is familiar with this technique could you please break it down for me? Proofs of this method working for this problem would also be very helpful.
statistics probability-distributions sampling monte-carlo
$endgroup$
$begingroup$
I suspect that it depends on what you used for the mean for $Y$.
$endgroup$
– herb steinberg
Dec 3 '18 at 3:21
$begingroup$
I was told that the mean of Y didn't matter. As long as the domain of X was a subset of the domain of Y, you could use it to sample X.
$endgroup$
– tiger88
Dec 5 '18 at 3:06
$begingroup$
It might make sense if $Y$ is within the (unknown) range of the $X's$. I'll have to give it more thought.
$endgroup$
– herb steinberg
Dec 5 '18 at 3:47
add a comment |
$begingroup$
Suppose there are two numbers X1 and X2 that are from a random continuous probability distribution with unknown range. You are given the value of X1 and you need to determine whether X1 is less than or greater than X2.
Simply guessing would yield a 50% success rate.
How would you develop a method to improve the success rate?
One Possible Answer:
Apparently if you used Monte Carlo sampling, you can do better than 50%. If you compare X1 to a number from a probability distribution that covers the range of the unknown distribution (we can use any normal distribution since its range is -inf, +inf) and use that result to decide whether X1 is > or < X2.
Example:
Lets say we are given X1 and Y ~ N(u, sigma), where u can be any real number and sigma > 0. If X1 > Y, then we would make the guess that X1 > X2, else X1 < X2. If we do this for a large n, our accuracy for X1 would be > 50%.
I ran this simulation and the results are indeed better than 50%. However, I don't quite understand it intuitively and if anyone is familiar with this technique could you please break it down for me? Proofs of this method working for this problem would also be very helpful.
statistics probability-distributions sampling monte-carlo
$endgroup$
Suppose there are two numbers X1 and X2 that are from a random continuous probability distribution with unknown range. You are given the value of X1 and you need to determine whether X1 is less than or greater than X2.
Simply guessing would yield a 50% success rate.
How would you develop a method to improve the success rate?
One Possible Answer:
Apparently if you used Monte Carlo sampling, you can do better than 50%. If you compare X1 to a number from a probability distribution that covers the range of the unknown distribution (we can use any normal distribution since its range is -inf, +inf) and use that result to decide whether X1 is > or < X2.
Example:
Lets say we are given X1 and Y ~ N(u, sigma), where u can be any real number and sigma > 0. If X1 > Y, then we would make the guess that X1 > X2, else X1 < X2. If we do this for a large n, our accuracy for X1 would be > 50%.
I ran this simulation and the results are indeed better than 50%. However, I don't quite understand it intuitively and if anyone is familiar with this technique could you please break it down for me? Proofs of this method working for this problem would also be very helpful.
statistics probability-distributions sampling monte-carlo
statistics probability-distributions sampling monte-carlo
asked Dec 3 '18 at 2:11
tiger88tiger88
365
365
$begingroup$
I suspect that it depends on what you used for the mean for $Y$.
$endgroup$
– herb steinberg
Dec 3 '18 at 3:21
$begingroup$
I was told that the mean of Y didn't matter. As long as the domain of X was a subset of the domain of Y, you could use it to sample X.
$endgroup$
– tiger88
Dec 5 '18 at 3:06
$begingroup$
It might make sense if $Y$ is within the (unknown) range of the $X's$. I'll have to give it more thought.
$endgroup$
– herb steinberg
Dec 5 '18 at 3:47
add a comment |
$begingroup$
I suspect that it depends on what you used for the mean for $Y$.
$endgroup$
– herb steinberg
Dec 3 '18 at 3:21
$begingroup$
I was told that the mean of Y didn't matter. As long as the domain of X was a subset of the domain of Y, you could use it to sample X.
$endgroup$
– tiger88
Dec 5 '18 at 3:06
$begingroup$
It might make sense if $Y$ is within the (unknown) range of the $X's$. I'll have to give it more thought.
$endgroup$
– herb steinberg
Dec 5 '18 at 3:47
$begingroup$
I suspect that it depends on what you used for the mean for $Y$.
$endgroup$
– herb steinberg
Dec 3 '18 at 3:21
$begingroup$
I suspect that it depends on what you used for the mean for $Y$.
$endgroup$
– herb steinberg
Dec 3 '18 at 3:21
$begingroup$
I was told that the mean of Y didn't matter. As long as the domain of X was a subset of the domain of Y, you could use it to sample X.
$endgroup$
– tiger88
Dec 5 '18 at 3:06
$begingroup$
I was told that the mean of Y didn't matter. As long as the domain of X was a subset of the domain of Y, you could use it to sample X.
$endgroup$
– tiger88
Dec 5 '18 at 3:06
$begingroup$
It might make sense if $Y$ is within the (unknown) range of the $X's$. I'll have to give it more thought.
$endgroup$
– herb steinberg
Dec 5 '18 at 3:47
$begingroup$
It might make sense if $Y$ is within the (unknown) range of the $X's$. I'll have to give it more thought.
$endgroup$
– herb steinberg
Dec 5 '18 at 3:47
add a comment |
1 Answer
1
active
oldest
votes
$begingroup$
Method works! Proof: Let $Y$ be in the interior of the range of $F_X$. Then if $Ylt X_1$ , there are two possibilities. If $X_2le Y$, $X_2lt X_1$ is correct. If $X_2gt Y$, then $X_2lt X_1$ half the time. Net result, the probability that $X_2lt X_1= F_X(Y)+0.5(1-F_X(Y))=0.5(1+F_X(Y))$. An analogous calculation gives a similar result for $Yge X_1, (1-0.5F_X(Y))$.
Note that the distribution for $Y$ doesn't matter as long as $Y$ is within the range of the $X's$. When $F_X(Y)=0 or =1$, it won't work.
$endgroup$
$begingroup$
If you happen to know the median of $F_X$, set $Y$=median and you will be right $75$% of the time. This is max.
$endgroup$
– herb steinberg
Dec 5 '18 at 5:03
add a comment |
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',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
noCode: true, onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
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
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f3023511%2fcomparing-two-random-variables-with-monte-carlo-sampling%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
$begingroup$
Method works! Proof: Let $Y$ be in the interior of the range of $F_X$. Then if $Ylt X_1$ , there are two possibilities. If $X_2le Y$, $X_2lt X_1$ is correct. If $X_2gt Y$, then $X_2lt X_1$ half the time. Net result, the probability that $X_2lt X_1= F_X(Y)+0.5(1-F_X(Y))=0.5(1+F_X(Y))$. An analogous calculation gives a similar result for $Yge X_1, (1-0.5F_X(Y))$.
Note that the distribution for $Y$ doesn't matter as long as $Y$ is within the range of the $X's$. When $F_X(Y)=0 or =1$, it won't work.
$endgroup$
$begingroup$
If you happen to know the median of $F_X$, set $Y$=median and you will be right $75$% of the time. This is max.
$endgroup$
– herb steinberg
Dec 5 '18 at 5:03
add a comment |
$begingroup$
Method works! Proof: Let $Y$ be in the interior of the range of $F_X$. Then if $Ylt X_1$ , there are two possibilities. If $X_2le Y$, $X_2lt X_1$ is correct. If $X_2gt Y$, then $X_2lt X_1$ half the time. Net result, the probability that $X_2lt X_1= F_X(Y)+0.5(1-F_X(Y))=0.5(1+F_X(Y))$. An analogous calculation gives a similar result for $Yge X_1, (1-0.5F_X(Y))$.
Note that the distribution for $Y$ doesn't matter as long as $Y$ is within the range of the $X's$. When $F_X(Y)=0 or =1$, it won't work.
$endgroup$
$begingroup$
If you happen to know the median of $F_X$, set $Y$=median and you will be right $75$% of the time. This is max.
$endgroup$
– herb steinberg
Dec 5 '18 at 5:03
add a comment |
$begingroup$
Method works! Proof: Let $Y$ be in the interior of the range of $F_X$. Then if $Ylt X_1$ , there are two possibilities. If $X_2le Y$, $X_2lt X_1$ is correct. If $X_2gt Y$, then $X_2lt X_1$ half the time. Net result, the probability that $X_2lt X_1= F_X(Y)+0.5(1-F_X(Y))=0.5(1+F_X(Y))$. An analogous calculation gives a similar result for $Yge X_1, (1-0.5F_X(Y))$.
Note that the distribution for $Y$ doesn't matter as long as $Y$ is within the range of the $X's$. When $F_X(Y)=0 or =1$, it won't work.
$endgroup$
Method works! Proof: Let $Y$ be in the interior of the range of $F_X$. Then if $Ylt X_1$ , there are two possibilities. If $X_2le Y$, $X_2lt X_1$ is correct. If $X_2gt Y$, then $X_2lt X_1$ half the time. Net result, the probability that $X_2lt X_1= F_X(Y)+0.5(1-F_X(Y))=0.5(1+F_X(Y))$. An analogous calculation gives a similar result for $Yge X_1, (1-0.5F_X(Y))$.
Note that the distribution for $Y$ doesn't matter as long as $Y$ is within the range of the $X's$. When $F_X(Y)=0 or =1$, it won't work.
edited Dec 5 '18 at 4:37
answered Dec 5 '18 at 4:30
herb steinbergherb steinberg
2,8032310
2,8032310
$begingroup$
If you happen to know the median of $F_X$, set $Y$=median and you will be right $75$% of the time. This is max.
$endgroup$
– herb steinberg
Dec 5 '18 at 5:03
add a comment |
$begingroup$
If you happen to know the median of $F_X$, set $Y$=median and you will be right $75$% of the time. This is max.
$endgroup$
– herb steinberg
Dec 5 '18 at 5:03
$begingroup$
If you happen to know the median of $F_X$, set $Y$=median and you will be right $75$% of the time. This is max.
$endgroup$
– herb steinberg
Dec 5 '18 at 5:03
$begingroup$
If you happen to know the median of $F_X$, set $Y$=median and you will be right $75$% of the time. This is max.
$endgroup$
– herb steinberg
Dec 5 '18 at 5:03
add a comment |
Thanks for contributing an answer to Mathematics Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
Use MathJax to format equations. MathJax reference.
To learn more, see our tips on writing great answers.
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
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f3023511%2fcomparing-two-random-variables-with-monte-carlo-sampling%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
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
Required, but never shown
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
Required, but never shown
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
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
$begingroup$
I suspect that it depends on what you used for the mean for $Y$.
$endgroup$
– herb steinberg
Dec 3 '18 at 3:21
$begingroup$
I was told that the mean of Y didn't matter. As long as the domain of X was a subset of the domain of Y, you could use it to sample X.
$endgroup$
– tiger88
Dec 5 '18 at 3:06
$begingroup$
It might make sense if $Y$ is within the (unknown) range of the $X's$. I'll have to give it more thought.
$endgroup$
– herb steinberg
Dec 5 '18 at 3:47