On which place should you stand in a line, to get a bonus.
$begingroup$
Customers are going inside a store, the first customer whose birthday matches the birthday of someone that has already entered the store will get a bonus discount. Where on the line to stand to get the biggest chance to win a bonus?
probability recreational-mathematics
$endgroup$
|
show 1 more comment
$begingroup$
Customers are going inside a store, the first customer whose birthday matches the birthday of someone that has already entered the store will get a bonus discount. Where on the line to stand to get the biggest chance to win a bonus?
probability recreational-mathematics
$endgroup$
$begingroup$
What we can say for sure that the first in the line has no chance for a bonus :)
$endgroup$
– Peter
Jan 16 at 23:11
$begingroup$
Did you try to calculate the probability that the first one, the second one and so one gets the bonus ?
$endgroup$
– Peter
Jan 16 at 23:13
$begingroup$
This question is very poorly specified. What does "first customer" mean? What "line" are you talking about? Please clarify,
$endgroup$
– Rob Arthan
Jan 16 at 23:51
$begingroup$
Also if you're in place number 367 or more, it's impossible to win the bonus (pigeonhole principle).
$endgroup$
– Daniel Schepler
Jan 17 at 0:07
$begingroup$
Intuitively, you don't want to be too near the front (else the chance of getting a duplicate will be too small) nor do you want to be too far back (else somebody will beat you to a match). The expressions for the probabilities are likely to be a bit unwieldy, so I'd just compute them numerically and search for the max.
$endgroup$
– lulu
Jan 17 at 0:17
|
show 1 more comment
$begingroup$
Customers are going inside a store, the first customer whose birthday matches the birthday of someone that has already entered the store will get a bonus discount. Where on the line to stand to get the biggest chance to win a bonus?
probability recreational-mathematics
$endgroup$
Customers are going inside a store, the first customer whose birthday matches the birthday of someone that has already entered the store will get a bonus discount. Where on the line to stand to get the biggest chance to win a bonus?
probability recreational-mathematics
probability recreational-mathematics
asked Jan 16 at 23:07
yuner.bekiryuner.bekir
204
204
$begingroup$
What we can say for sure that the first in the line has no chance for a bonus :)
$endgroup$
– Peter
Jan 16 at 23:11
$begingroup$
Did you try to calculate the probability that the first one, the second one and so one gets the bonus ?
$endgroup$
– Peter
Jan 16 at 23:13
$begingroup$
This question is very poorly specified. What does "first customer" mean? What "line" are you talking about? Please clarify,
$endgroup$
– Rob Arthan
Jan 16 at 23:51
$begingroup$
Also if you're in place number 367 or more, it's impossible to win the bonus (pigeonhole principle).
$endgroup$
– Daniel Schepler
Jan 17 at 0:07
$begingroup$
Intuitively, you don't want to be too near the front (else the chance of getting a duplicate will be too small) nor do you want to be too far back (else somebody will beat you to a match). The expressions for the probabilities are likely to be a bit unwieldy, so I'd just compute them numerically and search for the max.
$endgroup$
– lulu
Jan 17 at 0:17
|
show 1 more comment
$begingroup$
What we can say for sure that the first in the line has no chance for a bonus :)
$endgroup$
– Peter
Jan 16 at 23:11
$begingroup$
Did you try to calculate the probability that the first one, the second one and so one gets the bonus ?
$endgroup$
– Peter
Jan 16 at 23:13
$begingroup$
This question is very poorly specified. What does "first customer" mean? What "line" are you talking about? Please clarify,
$endgroup$
– Rob Arthan
Jan 16 at 23:51
$begingroup$
Also if you're in place number 367 or more, it's impossible to win the bonus (pigeonhole principle).
$endgroup$
– Daniel Schepler
Jan 17 at 0:07
$begingroup$
Intuitively, you don't want to be too near the front (else the chance of getting a duplicate will be too small) nor do you want to be too far back (else somebody will beat you to a match). The expressions for the probabilities are likely to be a bit unwieldy, so I'd just compute them numerically and search for the max.
$endgroup$
– lulu
Jan 17 at 0:17
$begingroup$
What we can say for sure that the first in the line has no chance for a bonus :)
$endgroup$
– Peter
Jan 16 at 23:11
$begingroup$
What we can say for sure that the first in the line has no chance for a bonus :)
$endgroup$
– Peter
Jan 16 at 23:11
$begingroup$
Did you try to calculate the probability that the first one, the second one and so one gets the bonus ?
$endgroup$
– Peter
Jan 16 at 23:13
$begingroup$
Did you try to calculate the probability that the first one, the second one and so one gets the bonus ?
$endgroup$
– Peter
Jan 16 at 23:13
$begingroup$
This question is very poorly specified. What does "first customer" mean? What "line" are you talking about? Please clarify,
$endgroup$
– Rob Arthan
Jan 16 at 23:51
$begingroup$
This question is very poorly specified. What does "first customer" mean? What "line" are you talking about? Please clarify,
$endgroup$
– Rob Arthan
Jan 16 at 23:51
$begingroup$
Also if you're in place number 367 or more, it's impossible to win the bonus (pigeonhole principle).
$endgroup$
– Daniel Schepler
Jan 17 at 0:07
$begingroup$
Also if you're in place number 367 or more, it's impossible to win the bonus (pigeonhole principle).
$endgroup$
– Daniel Schepler
Jan 17 at 0:07
$begingroup$
Intuitively, you don't want to be too near the front (else the chance of getting a duplicate will be too small) nor do you want to be too far back (else somebody will beat you to a match). The expressions for the probabilities are likely to be a bit unwieldy, so I'd just compute them numerically and search for the max.
$endgroup$
– lulu
Jan 17 at 0:17
$begingroup$
Intuitively, you don't want to be too near the front (else the chance of getting a duplicate will be too small) nor do you want to be too far back (else somebody will beat you to a match). The expressions for the probabilities are likely to be a bit unwieldy, so I'd just compute them numerically and search for the max.
$endgroup$
– lulu
Jan 17 at 0:17
|
show 1 more comment
1 Answer
1
active
oldest
votes
$begingroup$
I will use an year with $N=365$ days, every day being equally probable as a birthday for each of the customers in the line.
The $k$.th customer has a chance to get the price equal to $p_k$, say, as a matter of notation. Then $p_k$ is combinatorially obtained by
counting the day configurations $(d_1, dots,d_{k-1},d_k)$ with
different values on the first $(k-1)$ places, and with $d_k$ repeating
one of these $(k-1)$ places, and we divide by the number $N^k$ of all day configurations with $k$ places, so
Corrected version, thanks lulu and Daniel Schepler
$$
begin{aligned}
p_1 &=0 ,\
p_2 &=frac 1N ,\
&qquadtext{ and for }kge 3\
p_k &=
frac 1{N^k}cdot N(N-1)dots(N-k+2)cdot(k-1)
\
&=
left(1-frac 1Nright)
dots
left(1-frac {k-2}Nright)cdot frac {k-1}N .
end{aligned}
$$
The maximal value is in the script below obtained for $k=20$, p(20) ~ 0.0323198575
Here is numerically the list of the probabilities for the first customers:
sage: N = 365
sage: for k in [2..40]:
....: pk = binomial(N, k-1)*factorial(k-1)*(k-1) / N^k
....: print "p(%2s) ~ %.10f" % (k, pk.n())
....:
p( 2) ~ 0.0027397260
p( 3) ~ 0.0054644399
p( 4) ~ 0.0081517466
p( 5) ~ 0.0107796612
p( 6) ~ 0.0133269099
p( 7) ~ 0.0157732194
p( 8) ~ 0.0180995893
p( 9) ~ 0.0202885415
p(10) ~ 0.0223243438
p(11) ~ 0.0241932006
p(12) ~ 0.0258834105
p(13) ~ 0.0273854864
p(14) ~ 0.0286922368
p(15) ~ 0.0297988078
p(16) ~ 0.0307026855
p(17) ~ 0.0314036600
p(18) ~ 0.0319037526
p(19) ~ 0.0322071082
p(20) ~ 0.0323198575
p(21) ~ 0.0322499516
p(22) ~ 0.0320069725
p(23) ~ 0.0316019267
p(24) ~ 0.0310470236
p(25) ~ 0.0303554461
p(26) ~ 0.0295411162
p(27) ~ 0.0286184621
p(28) ~ 0.0276021901
p(29) ~ 0.0265070651
p(30) ~ 0.0253477052
p(31) ~ 0.0241383910
p(32) ~ 0.0228928941
p(33) ~ 0.0216243263
p(34) ~ 0.0203450104
p(35) ~ 0.0190663743
p(36) ~ 0.0177988675
p(37) ~ 0.0165519018
p(38) ~ 0.0153338129
p(39) ~ 0.0141518433
p(40) ~ 0.0130121455
sage code was used.
$endgroup$
1
$begingroup$
Not following. Let's take the third in line. For her to win, she needs numbers $1,2$ to be different (a $frac {364}{365}$ probability). Then she must match one of them, a $frac 2{365}$ probability). Thus she wins the prize with probability $frac {364}{365}times frac 2{365}=0.005479452$ which is much greater than your $p(2)$. No?
$endgroup$
– lulu
Jan 17 at 0:09
$begingroup$
Should you be using $N^{underline{k-1}} = (k-1)! binom{N}{k-1}$ instead of $binom{N}{k-1}$?
$endgroup$
– Daniel Schepler
Jan 17 at 0:11
$begingroup$
Note too that $sum p(i)=1$ since somebody has to win, but this is clearly not true for your numbers.
$endgroup$
– lulu
Jan 17 at 0:14
$begingroup$
Can you clarify or correct your post? Unless I am badly misreading the problem, the answer is pretty clearly not the second person in line. In fact, simple calculations show that optimal is $k=20$ for which the probability is $0.032319858$. That seems intuitively solid...as we know from the standard birthday problem, it's in the early 20's that you start to expect to see a duplicate.
$endgroup$
– lulu
Jan 17 at 0:27
1
$begingroup$
With my correction, I calculated $frac{p_{k+1}}{p_k} = frac{N-k}{N} cdot frac{k}{k-1}$ which is greater than 1 if and only if $k^2 < N$; so the maximum would happen at $k = lceil sqrt{N} rceil = 20$.
$endgroup$
– Daniel Schepler
Jan 17 at 0:33
|
show 2 more comments
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%2f3076401%2fon-which-place-should-you-stand-in-a-line-to-get-a-bonus%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$
I will use an year with $N=365$ days, every day being equally probable as a birthday for each of the customers in the line.
The $k$.th customer has a chance to get the price equal to $p_k$, say, as a matter of notation. Then $p_k$ is combinatorially obtained by
counting the day configurations $(d_1, dots,d_{k-1},d_k)$ with
different values on the first $(k-1)$ places, and with $d_k$ repeating
one of these $(k-1)$ places, and we divide by the number $N^k$ of all day configurations with $k$ places, so
Corrected version, thanks lulu and Daniel Schepler
$$
begin{aligned}
p_1 &=0 ,\
p_2 &=frac 1N ,\
&qquadtext{ and for }kge 3\
p_k &=
frac 1{N^k}cdot N(N-1)dots(N-k+2)cdot(k-1)
\
&=
left(1-frac 1Nright)
dots
left(1-frac {k-2}Nright)cdot frac {k-1}N .
end{aligned}
$$
The maximal value is in the script below obtained for $k=20$, p(20) ~ 0.0323198575
Here is numerically the list of the probabilities for the first customers:
sage: N = 365
sage: for k in [2..40]:
....: pk = binomial(N, k-1)*factorial(k-1)*(k-1) / N^k
....: print "p(%2s) ~ %.10f" % (k, pk.n())
....:
p( 2) ~ 0.0027397260
p( 3) ~ 0.0054644399
p( 4) ~ 0.0081517466
p( 5) ~ 0.0107796612
p( 6) ~ 0.0133269099
p( 7) ~ 0.0157732194
p( 8) ~ 0.0180995893
p( 9) ~ 0.0202885415
p(10) ~ 0.0223243438
p(11) ~ 0.0241932006
p(12) ~ 0.0258834105
p(13) ~ 0.0273854864
p(14) ~ 0.0286922368
p(15) ~ 0.0297988078
p(16) ~ 0.0307026855
p(17) ~ 0.0314036600
p(18) ~ 0.0319037526
p(19) ~ 0.0322071082
p(20) ~ 0.0323198575
p(21) ~ 0.0322499516
p(22) ~ 0.0320069725
p(23) ~ 0.0316019267
p(24) ~ 0.0310470236
p(25) ~ 0.0303554461
p(26) ~ 0.0295411162
p(27) ~ 0.0286184621
p(28) ~ 0.0276021901
p(29) ~ 0.0265070651
p(30) ~ 0.0253477052
p(31) ~ 0.0241383910
p(32) ~ 0.0228928941
p(33) ~ 0.0216243263
p(34) ~ 0.0203450104
p(35) ~ 0.0190663743
p(36) ~ 0.0177988675
p(37) ~ 0.0165519018
p(38) ~ 0.0153338129
p(39) ~ 0.0141518433
p(40) ~ 0.0130121455
sage code was used.
$endgroup$
1
$begingroup$
Not following. Let's take the third in line. For her to win, she needs numbers $1,2$ to be different (a $frac {364}{365}$ probability). Then she must match one of them, a $frac 2{365}$ probability). Thus she wins the prize with probability $frac {364}{365}times frac 2{365}=0.005479452$ which is much greater than your $p(2)$. No?
$endgroup$
– lulu
Jan 17 at 0:09
$begingroup$
Should you be using $N^{underline{k-1}} = (k-1)! binom{N}{k-1}$ instead of $binom{N}{k-1}$?
$endgroup$
– Daniel Schepler
Jan 17 at 0:11
$begingroup$
Note too that $sum p(i)=1$ since somebody has to win, but this is clearly not true for your numbers.
$endgroup$
– lulu
Jan 17 at 0:14
$begingroup$
Can you clarify or correct your post? Unless I am badly misreading the problem, the answer is pretty clearly not the second person in line. In fact, simple calculations show that optimal is $k=20$ for which the probability is $0.032319858$. That seems intuitively solid...as we know from the standard birthday problem, it's in the early 20's that you start to expect to see a duplicate.
$endgroup$
– lulu
Jan 17 at 0:27
1
$begingroup$
With my correction, I calculated $frac{p_{k+1}}{p_k} = frac{N-k}{N} cdot frac{k}{k-1}$ which is greater than 1 if and only if $k^2 < N$; so the maximum would happen at $k = lceil sqrt{N} rceil = 20$.
$endgroup$
– Daniel Schepler
Jan 17 at 0:33
|
show 2 more comments
$begingroup$
I will use an year with $N=365$ days, every day being equally probable as a birthday for each of the customers in the line.
The $k$.th customer has a chance to get the price equal to $p_k$, say, as a matter of notation. Then $p_k$ is combinatorially obtained by
counting the day configurations $(d_1, dots,d_{k-1},d_k)$ with
different values on the first $(k-1)$ places, and with $d_k$ repeating
one of these $(k-1)$ places, and we divide by the number $N^k$ of all day configurations with $k$ places, so
Corrected version, thanks lulu and Daniel Schepler
$$
begin{aligned}
p_1 &=0 ,\
p_2 &=frac 1N ,\
&qquadtext{ and for }kge 3\
p_k &=
frac 1{N^k}cdot N(N-1)dots(N-k+2)cdot(k-1)
\
&=
left(1-frac 1Nright)
dots
left(1-frac {k-2}Nright)cdot frac {k-1}N .
end{aligned}
$$
The maximal value is in the script below obtained for $k=20$, p(20) ~ 0.0323198575
Here is numerically the list of the probabilities for the first customers:
sage: N = 365
sage: for k in [2..40]:
....: pk = binomial(N, k-1)*factorial(k-1)*(k-1) / N^k
....: print "p(%2s) ~ %.10f" % (k, pk.n())
....:
p( 2) ~ 0.0027397260
p( 3) ~ 0.0054644399
p( 4) ~ 0.0081517466
p( 5) ~ 0.0107796612
p( 6) ~ 0.0133269099
p( 7) ~ 0.0157732194
p( 8) ~ 0.0180995893
p( 9) ~ 0.0202885415
p(10) ~ 0.0223243438
p(11) ~ 0.0241932006
p(12) ~ 0.0258834105
p(13) ~ 0.0273854864
p(14) ~ 0.0286922368
p(15) ~ 0.0297988078
p(16) ~ 0.0307026855
p(17) ~ 0.0314036600
p(18) ~ 0.0319037526
p(19) ~ 0.0322071082
p(20) ~ 0.0323198575
p(21) ~ 0.0322499516
p(22) ~ 0.0320069725
p(23) ~ 0.0316019267
p(24) ~ 0.0310470236
p(25) ~ 0.0303554461
p(26) ~ 0.0295411162
p(27) ~ 0.0286184621
p(28) ~ 0.0276021901
p(29) ~ 0.0265070651
p(30) ~ 0.0253477052
p(31) ~ 0.0241383910
p(32) ~ 0.0228928941
p(33) ~ 0.0216243263
p(34) ~ 0.0203450104
p(35) ~ 0.0190663743
p(36) ~ 0.0177988675
p(37) ~ 0.0165519018
p(38) ~ 0.0153338129
p(39) ~ 0.0141518433
p(40) ~ 0.0130121455
sage code was used.
$endgroup$
1
$begingroup$
Not following. Let's take the third in line. For her to win, she needs numbers $1,2$ to be different (a $frac {364}{365}$ probability). Then she must match one of them, a $frac 2{365}$ probability). Thus she wins the prize with probability $frac {364}{365}times frac 2{365}=0.005479452$ which is much greater than your $p(2)$. No?
$endgroup$
– lulu
Jan 17 at 0:09
$begingroup$
Should you be using $N^{underline{k-1}} = (k-1)! binom{N}{k-1}$ instead of $binom{N}{k-1}$?
$endgroup$
– Daniel Schepler
Jan 17 at 0:11
$begingroup$
Note too that $sum p(i)=1$ since somebody has to win, but this is clearly not true for your numbers.
$endgroup$
– lulu
Jan 17 at 0:14
$begingroup$
Can you clarify or correct your post? Unless I am badly misreading the problem, the answer is pretty clearly not the second person in line. In fact, simple calculations show that optimal is $k=20$ for which the probability is $0.032319858$. That seems intuitively solid...as we know from the standard birthday problem, it's in the early 20's that you start to expect to see a duplicate.
$endgroup$
– lulu
Jan 17 at 0:27
1
$begingroup$
With my correction, I calculated $frac{p_{k+1}}{p_k} = frac{N-k}{N} cdot frac{k}{k-1}$ which is greater than 1 if and only if $k^2 < N$; so the maximum would happen at $k = lceil sqrt{N} rceil = 20$.
$endgroup$
– Daniel Schepler
Jan 17 at 0:33
|
show 2 more comments
$begingroup$
I will use an year with $N=365$ days, every day being equally probable as a birthday for each of the customers in the line.
The $k$.th customer has a chance to get the price equal to $p_k$, say, as a matter of notation. Then $p_k$ is combinatorially obtained by
counting the day configurations $(d_1, dots,d_{k-1},d_k)$ with
different values on the first $(k-1)$ places, and with $d_k$ repeating
one of these $(k-1)$ places, and we divide by the number $N^k$ of all day configurations with $k$ places, so
Corrected version, thanks lulu and Daniel Schepler
$$
begin{aligned}
p_1 &=0 ,\
p_2 &=frac 1N ,\
&qquadtext{ and for }kge 3\
p_k &=
frac 1{N^k}cdot N(N-1)dots(N-k+2)cdot(k-1)
\
&=
left(1-frac 1Nright)
dots
left(1-frac {k-2}Nright)cdot frac {k-1}N .
end{aligned}
$$
The maximal value is in the script below obtained for $k=20$, p(20) ~ 0.0323198575
Here is numerically the list of the probabilities for the first customers:
sage: N = 365
sage: for k in [2..40]:
....: pk = binomial(N, k-1)*factorial(k-1)*(k-1) / N^k
....: print "p(%2s) ~ %.10f" % (k, pk.n())
....:
p( 2) ~ 0.0027397260
p( 3) ~ 0.0054644399
p( 4) ~ 0.0081517466
p( 5) ~ 0.0107796612
p( 6) ~ 0.0133269099
p( 7) ~ 0.0157732194
p( 8) ~ 0.0180995893
p( 9) ~ 0.0202885415
p(10) ~ 0.0223243438
p(11) ~ 0.0241932006
p(12) ~ 0.0258834105
p(13) ~ 0.0273854864
p(14) ~ 0.0286922368
p(15) ~ 0.0297988078
p(16) ~ 0.0307026855
p(17) ~ 0.0314036600
p(18) ~ 0.0319037526
p(19) ~ 0.0322071082
p(20) ~ 0.0323198575
p(21) ~ 0.0322499516
p(22) ~ 0.0320069725
p(23) ~ 0.0316019267
p(24) ~ 0.0310470236
p(25) ~ 0.0303554461
p(26) ~ 0.0295411162
p(27) ~ 0.0286184621
p(28) ~ 0.0276021901
p(29) ~ 0.0265070651
p(30) ~ 0.0253477052
p(31) ~ 0.0241383910
p(32) ~ 0.0228928941
p(33) ~ 0.0216243263
p(34) ~ 0.0203450104
p(35) ~ 0.0190663743
p(36) ~ 0.0177988675
p(37) ~ 0.0165519018
p(38) ~ 0.0153338129
p(39) ~ 0.0141518433
p(40) ~ 0.0130121455
sage code was used.
$endgroup$
I will use an year with $N=365$ days, every day being equally probable as a birthday for each of the customers in the line.
The $k$.th customer has a chance to get the price equal to $p_k$, say, as a matter of notation. Then $p_k$ is combinatorially obtained by
counting the day configurations $(d_1, dots,d_{k-1},d_k)$ with
different values on the first $(k-1)$ places, and with $d_k$ repeating
one of these $(k-1)$ places, and we divide by the number $N^k$ of all day configurations with $k$ places, so
Corrected version, thanks lulu and Daniel Schepler
$$
begin{aligned}
p_1 &=0 ,\
p_2 &=frac 1N ,\
&qquadtext{ and for }kge 3\
p_k &=
frac 1{N^k}cdot N(N-1)dots(N-k+2)cdot(k-1)
\
&=
left(1-frac 1Nright)
dots
left(1-frac {k-2}Nright)cdot frac {k-1}N .
end{aligned}
$$
The maximal value is in the script below obtained for $k=20$, p(20) ~ 0.0323198575
Here is numerically the list of the probabilities for the first customers:
sage: N = 365
sage: for k in [2..40]:
....: pk = binomial(N, k-1)*factorial(k-1)*(k-1) / N^k
....: print "p(%2s) ~ %.10f" % (k, pk.n())
....:
p( 2) ~ 0.0027397260
p( 3) ~ 0.0054644399
p( 4) ~ 0.0081517466
p( 5) ~ 0.0107796612
p( 6) ~ 0.0133269099
p( 7) ~ 0.0157732194
p( 8) ~ 0.0180995893
p( 9) ~ 0.0202885415
p(10) ~ 0.0223243438
p(11) ~ 0.0241932006
p(12) ~ 0.0258834105
p(13) ~ 0.0273854864
p(14) ~ 0.0286922368
p(15) ~ 0.0297988078
p(16) ~ 0.0307026855
p(17) ~ 0.0314036600
p(18) ~ 0.0319037526
p(19) ~ 0.0322071082
p(20) ~ 0.0323198575
p(21) ~ 0.0322499516
p(22) ~ 0.0320069725
p(23) ~ 0.0316019267
p(24) ~ 0.0310470236
p(25) ~ 0.0303554461
p(26) ~ 0.0295411162
p(27) ~ 0.0286184621
p(28) ~ 0.0276021901
p(29) ~ 0.0265070651
p(30) ~ 0.0253477052
p(31) ~ 0.0241383910
p(32) ~ 0.0228928941
p(33) ~ 0.0216243263
p(34) ~ 0.0203450104
p(35) ~ 0.0190663743
p(36) ~ 0.0177988675
p(37) ~ 0.0165519018
p(38) ~ 0.0153338129
p(39) ~ 0.0141518433
p(40) ~ 0.0130121455
sage code was used.
edited Jan 17 at 1:05
answered Jan 16 at 23:56
dan_fuleadan_fulea
7,1781513
7,1781513
1
$begingroup$
Not following. Let's take the third in line. For her to win, she needs numbers $1,2$ to be different (a $frac {364}{365}$ probability). Then she must match one of them, a $frac 2{365}$ probability). Thus she wins the prize with probability $frac {364}{365}times frac 2{365}=0.005479452$ which is much greater than your $p(2)$. No?
$endgroup$
– lulu
Jan 17 at 0:09
$begingroup$
Should you be using $N^{underline{k-1}} = (k-1)! binom{N}{k-1}$ instead of $binom{N}{k-1}$?
$endgroup$
– Daniel Schepler
Jan 17 at 0:11
$begingroup$
Note too that $sum p(i)=1$ since somebody has to win, but this is clearly not true for your numbers.
$endgroup$
– lulu
Jan 17 at 0:14
$begingroup$
Can you clarify or correct your post? Unless I am badly misreading the problem, the answer is pretty clearly not the second person in line. In fact, simple calculations show that optimal is $k=20$ for which the probability is $0.032319858$. That seems intuitively solid...as we know from the standard birthday problem, it's in the early 20's that you start to expect to see a duplicate.
$endgroup$
– lulu
Jan 17 at 0:27
1
$begingroup$
With my correction, I calculated $frac{p_{k+1}}{p_k} = frac{N-k}{N} cdot frac{k}{k-1}$ which is greater than 1 if and only if $k^2 < N$; so the maximum would happen at $k = lceil sqrt{N} rceil = 20$.
$endgroup$
– Daniel Schepler
Jan 17 at 0:33
|
show 2 more comments
1
$begingroup$
Not following. Let's take the third in line. For her to win, she needs numbers $1,2$ to be different (a $frac {364}{365}$ probability). Then she must match one of them, a $frac 2{365}$ probability). Thus she wins the prize with probability $frac {364}{365}times frac 2{365}=0.005479452$ which is much greater than your $p(2)$. No?
$endgroup$
– lulu
Jan 17 at 0:09
$begingroup$
Should you be using $N^{underline{k-1}} = (k-1)! binom{N}{k-1}$ instead of $binom{N}{k-1}$?
$endgroup$
– Daniel Schepler
Jan 17 at 0:11
$begingroup$
Note too that $sum p(i)=1$ since somebody has to win, but this is clearly not true for your numbers.
$endgroup$
– lulu
Jan 17 at 0:14
$begingroup$
Can you clarify or correct your post? Unless I am badly misreading the problem, the answer is pretty clearly not the second person in line. In fact, simple calculations show that optimal is $k=20$ for which the probability is $0.032319858$. That seems intuitively solid...as we know from the standard birthday problem, it's in the early 20's that you start to expect to see a duplicate.
$endgroup$
– lulu
Jan 17 at 0:27
1
$begingroup$
With my correction, I calculated $frac{p_{k+1}}{p_k} = frac{N-k}{N} cdot frac{k}{k-1}$ which is greater than 1 if and only if $k^2 < N$; so the maximum would happen at $k = lceil sqrt{N} rceil = 20$.
$endgroup$
– Daniel Schepler
Jan 17 at 0:33
1
1
$begingroup$
Not following. Let's take the third in line. For her to win, she needs numbers $1,2$ to be different (a $frac {364}{365}$ probability). Then she must match one of them, a $frac 2{365}$ probability). Thus she wins the prize with probability $frac {364}{365}times frac 2{365}=0.005479452$ which is much greater than your $p(2)$. No?
$endgroup$
– lulu
Jan 17 at 0:09
$begingroup$
Not following. Let's take the third in line. For her to win, she needs numbers $1,2$ to be different (a $frac {364}{365}$ probability). Then she must match one of them, a $frac 2{365}$ probability). Thus she wins the prize with probability $frac {364}{365}times frac 2{365}=0.005479452$ which is much greater than your $p(2)$. No?
$endgroup$
– lulu
Jan 17 at 0:09
$begingroup$
Should you be using $N^{underline{k-1}} = (k-1)! binom{N}{k-1}$ instead of $binom{N}{k-1}$?
$endgroup$
– Daniel Schepler
Jan 17 at 0:11
$begingroup$
Should you be using $N^{underline{k-1}} = (k-1)! binom{N}{k-1}$ instead of $binom{N}{k-1}$?
$endgroup$
– Daniel Schepler
Jan 17 at 0:11
$begingroup$
Note too that $sum p(i)=1$ since somebody has to win, but this is clearly not true for your numbers.
$endgroup$
– lulu
Jan 17 at 0:14
$begingroup$
Note too that $sum p(i)=1$ since somebody has to win, but this is clearly not true for your numbers.
$endgroup$
– lulu
Jan 17 at 0:14
$begingroup$
Can you clarify or correct your post? Unless I am badly misreading the problem, the answer is pretty clearly not the second person in line. In fact, simple calculations show that optimal is $k=20$ for which the probability is $0.032319858$. That seems intuitively solid...as we know from the standard birthday problem, it's in the early 20's that you start to expect to see a duplicate.
$endgroup$
– lulu
Jan 17 at 0:27
$begingroup$
Can you clarify or correct your post? Unless I am badly misreading the problem, the answer is pretty clearly not the second person in line. In fact, simple calculations show that optimal is $k=20$ for which the probability is $0.032319858$. That seems intuitively solid...as we know from the standard birthday problem, it's in the early 20's that you start to expect to see a duplicate.
$endgroup$
– lulu
Jan 17 at 0:27
1
1
$begingroup$
With my correction, I calculated $frac{p_{k+1}}{p_k} = frac{N-k}{N} cdot frac{k}{k-1}$ which is greater than 1 if and only if $k^2 < N$; so the maximum would happen at $k = lceil sqrt{N} rceil = 20$.
$endgroup$
– Daniel Schepler
Jan 17 at 0:33
$begingroup$
With my correction, I calculated $frac{p_{k+1}}{p_k} = frac{N-k}{N} cdot frac{k}{k-1}$ which is greater than 1 if and only if $k^2 < N$; so the maximum would happen at $k = lceil sqrt{N} rceil = 20$.
$endgroup$
– Daniel Schepler
Jan 17 at 0:33
|
show 2 more comments
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%2f3076401%2fon-which-place-should-you-stand-in-a-line-to-get-a-bonus%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$
What we can say for sure that the first in the line has no chance for a bonus :)
$endgroup$
– Peter
Jan 16 at 23:11
$begingroup$
Did you try to calculate the probability that the first one, the second one and so one gets the bonus ?
$endgroup$
– Peter
Jan 16 at 23:13
$begingroup$
This question is very poorly specified. What does "first customer" mean? What "line" are you talking about? Please clarify,
$endgroup$
– Rob Arthan
Jan 16 at 23:51
$begingroup$
Also if you're in place number 367 or more, it's impossible to win the bonus (pigeonhole principle).
$endgroup$
– Daniel Schepler
Jan 17 at 0:07
$begingroup$
Intuitively, you don't want to be too near the front (else the chance of getting a duplicate will be too small) nor do you want to be too far back (else somebody will beat you to a match). The expressions for the probabilities are likely to be a bit unwieldy, so I'd just compute them numerically and search for the max.
$endgroup$
– lulu
Jan 17 at 0:17