Birthday Calendar Gaps
Multi tool use
$begingroup$
I work at a company that posts a birthday calendar. I noticed that there was a string of four consecutive days with no birthdays. What is the probability of that happening?
Problem Statement
Given $n$ people, what is the probability of a observing a birthday calendar with no gaps of length $g$ or greater.
In my case $n = 400$ and $g = 4$. I'm mostly interested in an analytical solution.
Partial Solution
We will count the number of birthday assignments that have gaps less than $g$.
To do this, we will count assignments which have exactly $d$ distinct birthdays ($d = 1, 2, 3, ..., 365$) and sum over $d$.
For a given $d$, we will require a counting of two things:
- Number of ways to partition $n$ birthdays among $d$ days.
- Number of ways to select $d$ days from the year with no gaps of $g$ or greater.
I found a solution to 1: $S(n,d) times d!$ where $S(n,d)$ is a Stirling Number Of Second Kind. See solution here:
Consecutive birthdays probability
I need help on 2.
probability combinatorics
$endgroup$
add a comment |
$begingroup$
I work at a company that posts a birthday calendar. I noticed that there was a string of four consecutive days with no birthdays. What is the probability of that happening?
Problem Statement
Given $n$ people, what is the probability of a observing a birthday calendar with no gaps of length $g$ or greater.
In my case $n = 400$ and $g = 4$. I'm mostly interested in an analytical solution.
Partial Solution
We will count the number of birthday assignments that have gaps less than $g$.
To do this, we will count assignments which have exactly $d$ distinct birthdays ($d = 1, 2, 3, ..., 365$) and sum over $d$.
For a given $d$, we will require a counting of two things:
- Number of ways to partition $n$ birthdays among $d$ days.
- Number of ways to select $d$ days from the year with no gaps of $g$ or greater.
I found a solution to 1: $S(n,d) times d!$ where $S(n,d)$ is a Stirling Number Of Second Kind. See solution here:
Consecutive birthdays probability
I need help on 2.
probability combinatorics
$endgroup$
$begingroup$
I see no reason to suppose that each possible partition of $n$ birthdays among $d$ days is equally probable.
$endgroup$
– Daniel Schepler
Jan 15 at 23:27
add a comment |
$begingroup$
I work at a company that posts a birthday calendar. I noticed that there was a string of four consecutive days with no birthdays. What is the probability of that happening?
Problem Statement
Given $n$ people, what is the probability of a observing a birthday calendar with no gaps of length $g$ or greater.
In my case $n = 400$ and $g = 4$. I'm mostly interested in an analytical solution.
Partial Solution
We will count the number of birthday assignments that have gaps less than $g$.
To do this, we will count assignments which have exactly $d$ distinct birthdays ($d = 1, 2, 3, ..., 365$) and sum over $d$.
For a given $d$, we will require a counting of two things:
- Number of ways to partition $n$ birthdays among $d$ days.
- Number of ways to select $d$ days from the year with no gaps of $g$ or greater.
I found a solution to 1: $S(n,d) times d!$ where $S(n,d)$ is a Stirling Number Of Second Kind. See solution here:
Consecutive birthdays probability
I need help on 2.
probability combinatorics
$endgroup$
I work at a company that posts a birthday calendar. I noticed that there was a string of four consecutive days with no birthdays. What is the probability of that happening?
Problem Statement
Given $n$ people, what is the probability of a observing a birthday calendar with no gaps of length $g$ or greater.
In my case $n = 400$ and $g = 4$. I'm mostly interested in an analytical solution.
Partial Solution
We will count the number of birthday assignments that have gaps less than $g$.
To do this, we will count assignments which have exactly $d$ distinct birthdays ($d = 1, 2, 3, ..., 365$) and sum over $d$.
For a given $d$, we will require a counting of two things:
- Number of ways to partition $n$ birthdays among $d$ days.
- Number of ways to select $d$ days from the year with no gaps of $g$ or greater.
I found a solution to 1: $S(n,d) times d!$ where $S(n,d)$ is a Stirling Number Of Second Kind. See solution here:
Consecutive birthdays probability
I need help on 2.
probability combinatorics
probability combinatorics
edited Jan 15 at 23:20
tinlyx
95021118
95021118
asked Jan 15 at 22:44
Vincent NguyenVincent Nguyen
313
313
$begingroup$
I see no reason to suppose that each possible partition of $n$ birthdays among $d$ days is equally probable.
$endgroup$
– Daniel Schepler
Jan 15 at 23:27
add a comment |
$begingroup$
I see no reason to suppose that each possible partition of $n$ birthdays among $d$ days is equally probable.
$endgroup$
– Daniel Schepler
Jan 15 at 23:27
$begingroup$
I see no reason to suppose that each possible partition of $n$ birthdays among $d$ days is equally probable.
$endgroup$
– Daniel Schepler
Jan 15 at 23:27
$begingroup$
I see no reason to suppose that each possible partition of $n$ birthdays among $d$ days is equally probable.
$endgroup$
– Daniel Schepler
Jan 15 at 23:27
add a comment |
2 Answers
2
active
oldest
votes
$begingroup$
For each day, $d$, let $E_d$ be the event that there is a birthday on day $d$, but there are not any birthdays on days $d+1,d+2,dots,d+g$. A gap of length $g$ occurs if and only if $E_d$ occurs for some $d$. That is,
$$
P(text{no gaps of length $g$})=P(E_1^ccap E_2^ccap dotscap E_{365}^c)
$$
To compute this, we use the principle of inclusion exclusion:
$$
P(text{no gaps of length $g$})=sum_S(-1)^{|S|}P(E_{d(1)}cap E_{d(2)}cap dots cap E_{d(k)})
$$
where $S={d(1),d(2),dots,d(k)}$ ranges over all $2^{365}$ subsets of days.
We must figure out the probabilities of the intersections $E_{d(1)}cap E_{d(2)}cap cdots cap E_{d(k)}$. If any of the intervals $[d(i),d(i)+g]$ and $[d(j),d(j)+g]$ overlap, then this probability of this intersection is zero; the $E_d$ were defined carefully so this would be true. Otherwise, we use the principle of inclusion exclusion on this smaller problem to compute
$$
p_k:= P(E_{d(1)}cap cdotscap E_{d(k)}) = sum_{j=0}^k(-1)^jbinom{k}jleft(1-frac{kg+j}{365}right)^n
$$
Finally, we must count for each $k$ the number of ways to choose ${n(1),dots,n(k)}subseteq {1,2,dots,365}$ so the intervals $[n(i),n(i)+g]$ are pairwise non-overlapping. I claim this number is
$$
n_k=binom{365-gk}{k}+gbinom{365-gk-1}{k-1}
$$
I leave it to you to verify this is correct. As a hint, the first summand counts choices where none of the gaps cross between two different years, and the second counts ones that do.
We finally get that
$$
P(text{no gaps of length $g$})=sum_{k=0}^{leftlfloor frac{365}{g+1}rightrfloor }(-1)^{k}n_kp_k
$$
$endgroup$
$begingroup$
Thank you for your answer. I understand almost all of it except for the second application of the inclusion-exclusion principle. It looks almost like what I found here: en.wikipedia.org/wiki/… But this expression is for the union of events. Can you explain how to get to your result? What does 'n' represent in your expression? How did you get the term that is raised to the power of n?
$endgroup$
– Vincent Nguyen
Jan 28 at 23:44
$begingroup$
$n$ is the number of people in your office. Look at the $j=0$ term. This is the probability that no one is born on any of the days $d(i)+j$ for $i=1,dots,k$ and $j=1,dots,g$. There are $kg$ days to be avoided, and $n$ people, so the probability is $(1-kg/365)^n$. But we also want someone to be born on each day $d(i)$, so we subtract out the events that someone is not born on each of those days. There is an extra day to avoid, so each of these is $(1-(kg+1)/365)^n$. Then we add back in the doubly subtracted events, etc. @VincentNguyen
$endgroup$
– Mike Earnest
Jan 29 at 0:38
add a comment |
$begingroup$
I'm thinking about it from another approach.
For any specific day (1.1 for example), the probability that none of the 400 people have that day as birthday is $p_1 = (364/365)^{400}$ (assuming each day has equal probability and there is no leap year...)
For a specific length $g$ or consecutive gap (1.1 ~ 1.4 for example). It would be $p_g = ((365-g)/365)^{400}$. (I know it does not work for small number of people, say 2 people and having a gap of 200, but it seems to be at least approximately correct when $n$ is large)
How many such gaps are there? 365.
In summary, my answer is
$approx 1 - 365 * ((365-g)/365)^n$
Update 1
for the probability of having a gap of $g$
$$
P(g) = 365 * ((365-g)/365)^n - sum_{i=1}^{g-1}P(g+i)
$$
It is conditional probability, but we are summing them up so what we should do is to substract the intersection. But this complicate the problem very quickly as you can see for $g>1$ this recursive expansion will eventually reach a gap of 180+ days, in which case our formula does not hold even approximately.
$endgroup$
1
$begingroup$
$p_g = ((365-g)/365)^{400}$ is true for any four days (does not have to be consecutive). Also I think two gaps are not independent (knowing 1/1 - 1/4 was empty changes the probability of 1/2 - 1/5), so you must include the conditional probability when you calculate the joint distribution via multiplication rule. Furthermore, I think you way of counting would include duplicates if your strategy is to compute $p_g$ for all possible g.
$endgroup$
– Vincent Nguyen
Jan 15 at 23:44
$begingroup$
Yes it is for any 4 days, the concept of consecutive is a tricky part. I have updated the solution regarding your valid concern. However, there is another tricky part from "consecutive g days" that I could not figure out. For example, if we have 2 people, the probability $p_{200} = p_{300} = p_{364} = 1/365$ and $p_{181} = 3/365, p_{180} = 5/365$. I could not generalize my formula into such large $g$.
$endgroup$
– MoonKnight
Jan 16 at 0:28
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%2f3075074%2fbirthday-calendar-gaps%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
$begingroup$
For each day, $d$, let $E_d$ be the event that there is a birthday on day $d$, but there are not any birthdays on days $d+1,d+2,dots,d+g$. A gap of length $g$ occurs if and only if $E_d$ occurs for some $d$. That is,
$$
P(text{no gaps of length $g$})=P(E_1^ccap E_2^ccap dotscap E_{365}^c)
$$
To compute this, we use the principle of inclusion exclusion:
$$
P(text{no gaps of length $g$})=sum_S(-1)^{|S|}P(E_{d(1)}cap E_{d(2)}cap dots cap E_{d(k)})
$$
where $S={d(1),d(2),dots,d(k)}$ ranges over all $2^{365}$ subsets of days.
We must figure out the probabilities of the intersections $E_{d(1)}cap E_{d(2)}cap cdots cap E_{d(k)}$. If any of the intervals $[d(i),d(i)+g]$ and $[d(j),d(j)+g]$ overlap, then this probability of this intersection is zero; the $E_d$ were defined carefully so this would be true. Otherwise, we use the principle of inclusion exclusion on this smaller problem to compute
$$
p_k:= P(E_{d(1)}cap cdotscap E_{d(k)}) = sum_{j=0}^k(-1)^jbinom{k}jleft(1-frac{kg+j}{365}right)^n
$$
Finally, we must count for each $k$ the number of ways to choose ${n(1),dots,n(k)}subseteq {1,2,dots,365}$ so the intervals $[n(i),n(i)+g]$ are pairwise non-overlapping. I claim this number is
$$
n_k=binom{365-gk}{k}+gbinom{365-gk-1}{k-1}
$$
I leave it to you to verify this is correct. As a hint, the first summand counts choices where none of the gaps cross between two different years, and the second counts ones that do.
We finally get that
$$
P(text{no gaps of length $g$})=sum_{k=0}^{leftlfloor frac{365}{g+1}rightrfloor }(-1)^{k}n_kp_k
$$
$endgroup$
$begingroup$
Thank you for your answer. I understand almost all of it except for the second application of the inclusion-exclusion principle. It looks almost like what I found here: en.wikipedia.org/wiki/… But this expression is for the union of events. Can you explain how to get to your result? What does 'n' represent in your expression? How did you get the term that is raised to the power of n?
$endgroup$
– Vincent Nguyen
Jan 28 at 23:44
$begingroup$
$n$ is the number of people in your office. Look at the $j=0$ term. This is the probability that no one is born on any of the days $d(i)+j$ for $i=1,dots,k$ and $j=1,dots,g$. There are $kg$ days to be avoided, and $n$ people, so the probability is $(1-kg/365)^n$. But we also want someone to be born on each day $d(i)$, so we subtract out the events that someone is not born on each of those days. There is an extra day to avoid, so each of these is $(1-(kg+1)/365)^n$. Then we add back in the doubly subtracted events, etc. @VincentNguyen
$endgroup$
– Mike Earnest
Jan 29 at 0:38
add a comment |
$begingroup$
For each day, $d$, let $E_d$ be the event that there is a birthday on day $d$, but there are not any birthdays on days $d+1,d+2,dots,d+g$. A gap of length $g$ occurs if and only if $E_d$ occurs for some $d$. That is,
$$
P(text{no gaps of length $g$})=P(E_1^ccap E_2^ccap dotscap E_{365}^c)
$$
To compute this, we use the principle of inclusion exclusion:
$$
P(text{no gaps of length $g$})=sum_S(-1)^{|S|}P(E_{d(1)}cap E_{d(2)}cap dots cap E_{d(k)})
$$
where $S={d(1),d(2),dots,d(k)}$ ranges over all $2^{365}$ subsets of days.
We must figure out the probabilities of the intersections $E_{d(1)}cap E_{d(2)}cap cdots cap E_{d(k)}$. If any of the intervals $[d(i),d(i)+g]$ and $[d(j),d(j)+g]$ overlap, then this probability of this intersection is zero; the $E_d$ were defined carefully so this would be true. Otherwise, we use the principle of inclusion exclusion on this smaller problem to compute
$$
p_k:= P(E_{d(1)}cap cdotscap E_{d(k)}) = sum_{j=0}^k(-1)^jbinom{k}jleft(1-frac{kg+j}{365}right)^n
$$
Finally, we must count for each $k$ the number of ways to choose ${n(1),dots,n(k)}subseteq {1,2,dots,365}$ so the intervals $[n(i),n(i)+g]$ are pairwise non-overlapping. I claim this number is
$$
n_k=binom{365-gk}{k}+gbinom{365-gk-1}{k-1}
$$
I leave it to you to verify this is correct. As a hint, the first summand counts choices where none of the gaps cross between two different years, and the second counts ones that do.
We finally get that
$$
P(text{no gaps of length $g$})=sum_{k=0}^{leftlfloor frac{365}{g+1}rightrfloor }(-1)^{k}n_kp_k
$$
$endgroup$
$begingroup$
Thank you for your answer. I understand almost all of it except for the second application of the inclusion-exclusion principle. It looks almost like what I found here: en.wikipedia.org/wiki/… But this expression is for the union of events. Can you explain how to get to your result? What does 'n' represent in your expression? How did you get the term that is raised to the power of n?
$endgroup$
– Vincent Nguyen
Jan 28 at 23:44
$begingroup$
$n$ is the number of people in your office. Look at the $j=0$ term. This is the probability that no one is born on any of the days $d(i)+j$ for $i=1,dots,k$ and $j=1,dots,g$. There are $kg$ days to be avoided, and $n$ people, so the probability is $(1-kg/365)^n$. But we also want someone to be born on each day $d(i)$, so we subtract out the events that someone is not born on each of those days. There is an extra day to avoid, so each of these is $(1-(kg+1)/365)^n$. Then we add back in the doubly subtracted events, etc. @VincentNguyen
$endgroup$
– Mike Earnest
Jan 29 at 0:38
add a comment |
$begingroup$
For each day, $d$, let $E_d$ be the event that there is a birthday on day $d$, but there are not any birthdays on days $d+1,d+2,dots,d+g$. A gap of length $g$ occurs if and only if $E_d$ occurs for some $d$. That is,
$$
P(text{no gaps of length $g$})=P(E_1^ccap E_2^ccap dotscap E_{365}^c)
$$
To compute this, we use the principle of inclusion exclusion:
$$
P(text{no gaps of length $g$})=sum_S(-1)^{|S|}P(E_{d(1)}cap E_{d(2)}cap dots cap E_{d(k)})
$$
where $S={d(1),d(2),dots,d(k)}$ ranges over all $2^{365}$ subsets of days.
We must figure out the probabilities of the intersections $E_{d(1)}cap E_{d(2)}cap cdots cap E_{d(k)}$. If any of the intervals $[d(i),d(i)+g]$ and $[d(j),d(j)+g]$ overlap, then this probability of this intersection is zero; the $E_d$ were defined carefully so this would be true. Otherwise, we use the principle of inclusion exclusion on this smaller problem to compute
$$
p_k:= P(E_{d(1)}cap cdotscap E_{d(k)}) = sum_{j=0}^k(-1)^jbinom{k}jleft(1-frac{kg+j}{365}right)^n
$$
Finally, we must count for each $k$ the number of ways to choose ${n(1),dots,n(k)}subseteq {1,2,dots,365}$ so the intervals $[n(i),n(i)+g]$ are pairwise non-overlapping. I claim this number is
$$
n_k=binom{365-gk}{k}+gbinom{365-gk-1}{k-1}
$$
I leave it to you to verify this is correct. As a hint, the first summand counts choices where none of the gaps cross between two different years, and the second counts ones that do.
We finally get that
$$
P(text{no gaps of length $g$})=sum_{k=0}^{leftlfloor frac{365}{g+1}rightrfloor }(-1)^{k}n_kp_k
$$
$endgroup$
For each day, $d$, let $E_d$ be the event that there is a birthday on day $d$, but there are not any birthdays on days $d+1,d+2,dots,d+g$. A gap of length $g$ occurs if and only if $E_d$ occurs for some $d$. That is,
$$
P(text{no gaps of length $g$})=P(E_1^ccap E_2^ccap dotscap E_{365}^c)
$$
To compute this, we use the principle of inclusion exclusion:
$$
P(text{no gaps of length $g$})=sum_S(-1)^{|S|}P(E_{d(1)}cap E_{d(2)}cap dots cap E_{d(k)})
$$
where $S={d(1),d(2),dots,d(k)}$ ranges over all $2^{365}$ subsets of days.
We must figure out the probabilities of the intersections $E_{d(1)}cap E_{d(2)}cap cdots cap E_{d(k)}$. If any of the intervals $[d(i),d(i)+g]$ and $[d(j),d(j)+g]$ overlap, then this probability of this intersection is zero; the $E_d$ were defined carefully so this would be true. Otherwise, we use the principle of inclusion exclusion on this smaller problem to compute
$$
p_k:= P(E_{d(1)}cap cdotscap E_{d(k)}) = sum_{j=0}^k(-1)^jbinom{k}jleft(1-frac{kg+j}{365}right)^n
$$
Finally, we must count for each $k$ the number of ways to choose ${n(1),dots,n(k)}subseteq {1,2,dots,365}$ so the intervals $[n(i),n(i)+g]$ are pairwise non-overlapping. I claim this number is
$$
n_k=binom{365-gk}{k}+gbinom{365-gk-1}{k-1}
$$
I leave it to you to verify this is correct. As a hint, the first summand counts choices where none of the gaps cross between two different years, and the second counts ones that do.
We finally get that
$$
P(text{no gaps of length $g$})=sum_{k=0}^{leftlfloor frac{365}{g+1}rightrfloor }(-1)^{k}n_kp_k
$$
answered Jan 16 at 0:34
Mike EarnestMike Earnest
22.3k12051
22.3k12051
$begingroup$
Thank you for your answer. I understand almost all of it except for the second application of the inclusion-exclusion principle. It looks almost like what I found here: en.wikipedia.org/wiki/… But this expression is for the union of events. Can you explain how to get to your result? What does 'n' represent in your expression? How did you get the term that is raised to the power of n?
$endgroup$
– Vincent Nguyen
Jan 28 at 23:44
$begingroup$
$n$ is the number of people in your office. Look at the $j=0$ term. This is the probability that no one is born on any of the days $d(i)+j$ for $i=1,dots,k$ and $j=1,dots,g$. There are $kg$ days to be avoided, and $n$ people, so the probability is $(1-kg/365)^n$. But we also want someone to be born on each day $d(i)$, so we subtract out the events that someone is not born on each of those days. There is an extra day to avoid, so each of these is $(1-(kg+1)/365)^n$. Then we add back in the doubly subtracted events, etc. @VincentNguyen
$endgroup$
– Mike Earnest
Jan 29 at 0:38
add a comment |
$begingroup$
Thank you for your answer. I understand almost all of it except for the second application of the inclusion-exclusion principle. It looks almost like what I found here: en.wikipedia.org/wiki/… But this expression is for the union of events. Can you explain how to get to your result? What does 'n' represent in your expression? How did you get the term that is raised to the power of n?
$endgroup$
– Vincent Nguyen
Jan 28 at 23:44
$begingroup$
$n$ is the number of people in your office. Look at the $j=0$ term. This is the probability that no one is born on any of the days $d(i)+j$ for $i=1,dots,k$ and $j=1,dots,g$. There are $kg$ days to be avoided, and $n$ people, so the probability is $(1-kg/365)^n$. But we also want someone to be born on each day $d(i)$, so we subtract out the events that someone is not born on each of those days. There is an extra day to avoid, so each of these is $(1-(kg+1)/365)^n$. Then we add back in the doubly subtracted events, etc. @VincentNguyen
$endgroup$
– Mike Earnest
Jan 29 at 0:38
$begingroup$
Thank you for your answer. I understand almost all of it except for the second application of the inclusion-exclusion principle. It looks almost like what I found here: en.wikipedia.org/wiki/… But this expression is for the union of events. Can you explain how to get to your result? What does 'n' represent in your expression? How did you get the term that is raised to the power of n?
$endgroup$
– Vincent Nguyen
Jan 28 at 23:44
$begingroup$
Thank you for your answer. I understand almost all of it except for the second application of the inclusion-exclusion principle. It looks almost like what I found here: en.wikipedia.org/wiki/… But this expression is for the union of events. Can you explain how to get to your result? What does 'n' represent in your expression? How did you get the term that is raised to the power of n?
$endgroup$
– Vincent Nguyen
Jan 28 at 23:44
$begingroup$
$n$ is the number of people in your office. Look at the $j=0$ term. This is the probability that no one is born on any of the days $d(i)+j$ for $i=1,dots,k$ and $j=1,dots,g$. There are $kg$ days to be avoided, and $n$ people, so the probability is $(1-kg/365)^n$. But we also want someone to be born on each day $d(i)$, so we subtract out the events that someone is not born on each of those days. There is an extra day to avoid, so each of these is $(1-(kg+1)/365)^n$. Then we add back in the doubly subtracted events, etc. @VincentNguyen
$endgroup$
– Mike Earnest
Jan 29 at 0:38
$begingroup$
$n$ is the number of people in your office. Look at the $j=0$ term. This is the probability that no one is born on any of the days $d(i)+j$ for $i=1,dots,k$ and $j=1,dots,g$. There are $kg$ days to be avoided, and $n$ people, so the probability is $(1-kg/365)^n$. But we also want someone to be born on each day $d(i)$, so we subtract out the events that someone is not born on each of those days. There is an extra day to avoid, so each of these is $(1-(kg+1)/365)^n$. Then we add back in the doubly subtracted events, etc. @VincentNguyen
$endgroup$
– Mike Earnest
Jan 29 at 0:38
add a comment |
$begingroup$
I'm thinking about it from another approach.
For any specific day (1.1 for example), the probability that none of the 400 people have that day as birthday is $p_1 = (364/365)^{400}$ (assuming each day has equal probability and there is no leap year...)
For a specific length $g$ or consecutive gap (1.1 ~ 1.4 for example). It would be $p_g = ((365-g)/365)^{400}$. (I know it does not work for small number of people, say 2 people and having a gap of 200, but it seems to be at least approximately correct when $n$ is large)
How many such gaps are there? 365.
In summary, my answer is
$approx 1 - 365 * ((365-g)/365)^n$
Update 1
for the probability of having a gap of $g$
$$
P(g) = 365 * ((365-g)/365)^n - sum_{i=1}^{g-1}P(g+i)
$$
It is conditional probability, but we are summing them up so what we should do is to substract the intersection. But this complicate the problem very quickly as you can see for $g>1$ this recursive expansion will eventually reach a gap of 180+ days, in which case our formula does not hold even approximately.
$endgroup$
1
$begingroup$
$p_g = ((365-g)/365)^{400}$ is true for any four days (does not have to be consecutive). Also I think two gaps are not independent (knowing 1/1 - 1/4 was empty changes the probability of 1/2 - 1/5), so you must include the conditional probability when you calculate the joint distribution via multiplication rule. Furthermore, I think you way of counting would include duplicates if your strategy is to compute $p_g$ for all possible g.
$endgroup$
– Vincent Nguyen
Jan 15 at 23:44
$begingroup$
Yes it is for any 4 days, the concept of consecutive is a tricky part. I have updated the solution regarding your valid concern. However, there is another tricky part from "consecutive g days" that I could not figure out. For example, if we have 2 people, the probability $p_{200} = p_{300} = p_{364} = 1/365$ and $p_{181} = 3/365, p_{180} = 5/365$. I could not generalize my formula into such large $g$.
$endgroup$
– MoonKnight
Jan 16 at 0:28
add a comment |
$begingroup$
I'm thinking about it from another approach.
For any specific day (1.1 for example), the probability that none of the 400 people have that day as birthday is $p_1 = (364/365)^{400}$ (assuming each day has equal probability and there is no leap year...)
For a specific length $g$ or consecutive gap (1.1 ~ 1.4 for example). It would be $p_g = ((365-g)/365)^{400}$. (I know it does not work for small number of people, say 2 people and having a gap of 200, but it seems to be at least approximately correct when $n$ is large)
How many such gaps are there? 365.
In summary, my answer is
$approx 1 - 365 * ((365-g)/365)^n$
Update 1
for the probability of having a gap of $g$
$$
P(g) = 365 * ((365-g)/365)^n - sum_{i=1}^{g-1}P(g+i)
$$
It is conditional probability, but we are summing them up so what we should do is to substract the intersection. But this complicate the problem very quickly as you can see for $g>1$ this recursive expansion will eventually reach a gap of 180+ days, in which case our formula does not hold even approximately.
$endgroup$
1
$begingroup$
$p_g = ((365-g)/365)^{400}$ is true for any four days (does not have to be consecutive). Also I think two gaps are not independent (knowing 1/1 - 1/4 was empty changes the probability of 1/2 - 1/5), so you must include the conditional probability when you calculate the joint distribution via multiplication rule. Furthermore, I think you way of counting would include duplicates if your strategy is to compute $p_g$ for all possible g.
$endgroup$
– Vincent Nguyen
Jan 15 at 23:44
$begingroup$
Yes it is for any 4 days, the concept of consecutive is a tricky part. I have updated the solution regarding your valid concern. However, there is another tricky part from "consecutive g days" that I could not figure out. For example, if we have 2 people, the probability $p_{200} = p_{300} = p_{364} = 1/365$ and $p_{181} = 3/365, p_{180} = 5/365$. I could not generalize my formula into such large $g$.
$endgroup$
– MoonKnight
Jan 16 at 0:28
add a comment |
$begingroup$
I'm thinking about it from another approach.
For any specific day (1.1 for example), the probability that none of the 400 people have that day as birthday is $p_1 = (364/365)^{400}$ (assuming each day has equal probability and there is no leap year...)
For a specific length $g$ or consecutive gap (1.1 ~ 1.4 for example). It would be $p_g = ((365-g)/365)^{400}$. (I know it does not work for small number of people, say 2 people and having a gap of 200, but it seems to be at least approximately correct when $n$ is large)
How many such gaps are there? 365.
In summary, my answer is
$approx 1 - 365 * ((365-g)/365)^n$
Update 1
for the probability of having a gap of $g$
$$
P(g) = 365 * ((365-g)/365)^n - sum_{i=1}^{g-1}P(g+i)
$$
It is conditional probability, but we are summing them up so what we should do is to substract the intersection. But this complicate the problem very quickly as you can see for $g>1$ this recursive expansion will eventually reach a gap of 180+ days, in which case our formula does not hold even approximately.
$endgroup$
I'm thinking about it from another approach.
For any specific day (1.1 for example), the probability that none of the 400 people have that day as birthday is $p_1 = (364/365)^{400}$ (assuming each day has equal probability and there is no leap year...)
For a specific length $g$ or consecutive gap (1.1 ~ 1.4 for example). It would be $p_g = ((365-g)/365)^{400}$. (I know it does not work for small number of people, say 2 people and having a gap of 200, but it seems to be at least approximately correct when $n$ is large)
How many such gaps are there? 365.
In summary, my answer is
$approx 1 - 365 * ((365-g)/365)^n$
Update 1
for the probability of having a gap of $g$
$$
P(g) = 365 * ((365-g)/365)^n - sum_{i=1}^{g-1}P(g+i)
$$
It is conditional probability, but we are summing them up so what we should do is to substract the intersection. But this complicate the problem very quickly as you can see for $g>1$ this recursive expansion will eventually reach a gap of 180+ days, in which case our formula does not hold even approximately.
edited Jan 16 at 0:23
answered Jan 15 at 23:33
MoonKnightMoonKnight
1,359611
1,359611
1
$begingroup$
$p_g = ((365-g)/365)^{400}$ is true for any four days (does not have to be consecutive). Also I think two gaps are not independent (knowing 1/1 - 1/4 was empty changes the probability of 1/2 - 1/5), so you must include the conditional probability when you calculate the joint distribution via multiplication rule. Furthermore, I think you way of counting would include duplicates if your strategy is to compute $p_g$ for all possible g.
$endgroup$
– Vincent Nguyen
Jan 15 at 23:44
$begingroup$
Yes it is for any 4 days, the concept of consecutive is a tricky part. I have updated the solution regarding your valid concern. However, there is another tricky part from "consecutive g days" that I could not figure out. For example, if we have 2 people, the probability $p_{200} = p_{300} = p_{364} = 1/365$ and $p_{181} = 3/365, p_{180} = 5/365$. I could not generalize my formula into such large $g$.
$endgroup$
– MoonKnight
Jan 16 at 0:28
add a comment |
1
$begingroup$
$p_g = ((365-g)/365)^{400}$ is true for any four days (does not have to be consecutive). Also I think two gaps are not independent (knowing 1/1 - 1/4 was empty changes the probability of 1/2 - 1/5), so you must include the conditional probability when you calculate the joint distribution via multiplication rule. Furthermore, I think you way of counting would include duplicates if your strategy is to compute $p_g$ for all possible g.
$endgroup$
– Vincent Nguyen
Jan 15 at 23:44
$begingroup$
Yes it is for any 4 days, the concept of consecutive is a tricky part. I have updated the solution regarding your valid concern. However, there is another tricky part from "consecutive g days" that I could not figure out. For example, if we have 2 people, the probability $p_{200} = p_{300} = p_{364} = 1/365$ and $p_{181} = 3/365, p_{180} = 5/365$. I could not generalize my formula into such large $g$.
$endgroup$
– MoonKnight
Jan 16 at 0:28
1
1
$begingroup$
$p_g = ((365-g)/365)^{400}$ is true for any four days (does not have to be consecutive). Also I think two gaps are not independent (knowing 1/1 - 1/4 was empty changes the probability of 1/2 - 1/5), so you must include the conditional probability when you calculate the joint distribution via multiplication rule. Furthermore, I think you way of counting would include duplicates if your strategy is to compute $p_g$ for all possible g.
$endgroup$
– Vincent Nguyen
Jan 15 at 23:44
$begingroup$
$p_g = ((365-g)/365)^{400}$ is true for any four days (does not have to be consecutive). Also I think two gaps are not independent (knowing 1/1 - 1/4 was empty changes the probability of 1/2 - 1/5), so you must include the conditional probability when you calculate the joint distribution via multiplication rule. Furthermore, I think you way of counting would include duplicates if your strategy is to compute $p_g$ for all possible g.
$endgroup$
– Vincent Nguyen
Jan 15 at 23:44
$begingroup$
Yes it is for any 4 days, the concept of consecutive is a tricky part. I have updated the solution regarding your valid concern. However, there is another tricky part from "consecutive g days" that I could not figure out. For example, if we have 2 people, the probability $p_{200} = p_{300} = p_{364} = 1/365$ and $p_{181} = 3/365, p_{180} = 5/365$. I could not generalize my formula into such large $g$.
$endgroup$
– MoonKnight
Jan 16 at 0:28
$begingroup$
Yes it is for any 4 days, the concept of consecutive is a tricky part. I have updated the solution regarding your valid concern. However, there is another tricky part from "consecutive g days" that I could not figure out. For example, if we have 2 people, the probability $p_{200} = p_{300} = p_{364} = 1/365$ and $p_{181} = 3/365, p_{180} = 5/365$. I could not generalize my formula into such large $g$.
$endgroup$
– MoonKnight
Jan 16 at 0:28
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%2f3075074%2fbirthday-calendar-gaps%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
P4enN065AA1lJFoljR pg FhrMyUheY p9TggBEfzcoSrMt5ppQzhO,2ogqu r9XiqDQ sz
$begingroup$
I see no reason to suppose that each possible partition of $n$ birthdays among $d$ days is equally probable.
$endgroup$
– Daniel Schepler
Jan 15 at 23:27