Determining probability of a rainy day
up vote
3
down vote
favorite
I have the following problem:
- If today is a sunny day, a probability that it will rain tomorrow is $0.2$.
- If today is a rainy day, a probability that it will be sunny tomorrow is $0.4$.
I need to find the probability that if it's rainy on the third of May, it will also rain on the third of June.
My initial idea was to write a program that will create the binary tree with all possible combinations and then I just traverse through all of them and sum the probabilities accordingly, but unfortunately, I have to do this by hand, so any help is very welcome.
probability probability-theory
add a comment |
up vote
3
down vote
favorite
I have the following problem:
- If today is a sunny day, a probability that it will rain tomorrow is $0.2$.
- If today is a rainy day, a probability that it will be sunny tomorrow is $0.4$.
I need to find the probability that if it's rainy on the third of May, it will also rain on the third of June.
My initial idea was to write a program that will create the binary tree with all possible combinations and then I just traverse through all of them and sum the probabilities accordingly, but unfortunately, I have to do this by hand, so any help is very welcome.
probability probability-theory
2
You can diagonalize the transition matrix and raise it to the desired power.
– SmileyCraft
7 hours ago
1
It is easy to compute the limiting probabilities...you might imagine that $30$ days (or whatever) is long enough for the probabilities to be in their limiting state. Running it quickly on a spreadsheet, it looks like they get to the limit much quicker than that.
– lulu
7 hours ago
add a comment |
up vote
3
down vote
favorite
up vote
3
down vote
favorite
I have the following problem:
- If today is a sunny day, a probability that it will rain tomorrow is $0.2$.
- If today is a rainy day, a probability that it will be sunny tomorrow is $0.4$.
I need to find the probability that if it's rainy on the third of May, it will also rain on the third of June.
My initial idea was to write a program that will create the binary tree with all possible combinations and then I just traverse through all of them and sum the probabilities accordingly, but unfortunately, I have to do this by hand, so any help is very welcome.
probability probability-theory
I have the following problem:
- If today is a sunny day, a probability that it will rain tomorrow is $0.2$.
- If today is a rainy day, a probability that it will be sunny tomorrow is $0.4$.
I need to find the probability that if it's rainy on the third of May, it will also rain on the third of June.
My initial idea was to write a program that will create the binary tree with all possible combinations and then I just traverse through all of them and sum the probabilities accordingly, but unfortunately, I have to do this by hand, so any help is very welcome.
probability probability-theory
probability probability-theory
edited 2 hours ago
JYelton
1226
1226
asked 7 hours ago
smiljanic997
1798
1798
2
You can diagonalize the transition matrix and raise it to the desired power.
– SmileyCraft
7 hours ago
1
It is easy to compute the limiting probabilities...you might imagine that $30$ days (or whatever) is long enough for the probabilities to be in their limiting state. Running it quickly on a spreadsheet, it looks like they get to the limit much quicker than that.
– lulu
7 hours ago
add a comment |
2
You can diagonalize the transition matrix and raise it to the desired power.
– SmileyCraft
7 hours ago
1
It is easy to compute the limiting probabilities...you might imagine that $30$ days (or whatever) is long enough for the probabilities to be in their limiting state. Running it quickly on a spreadsheet, it looks like they get to the limit much quicker than that.
– lulu
7 hours ago
2
2
You can diagonalize the transition matrix and raise it to the desired power.
– SmileyCraft
7 hours ago
You can diagonalize the transition matrix and raise it to the desired power.
– SmileyCraft
7 hours ago
1
1
It is easy to compute the limiting probabilities...you might imagine that $30$ days (or whatever) is long enough for the probabilities to be in their limiting state. Running it quickly on a spreadsheet, it looks like they get to the limit much quicker than that.
– lulu
7 hours ago
It is easy to compute the limiting probabilities...you might imagine that $30$ days (or whatever) is long enough for the probabilities to be in their limiting state. Running it quickly on a spreadsheet, it looks like they get to the limit much quicker than that.
– lulu
7 hours ago
add a comment |
2 Answers
2
active
oldest
votes
up vote
6
down vote
A binary tree is definitely a possible way to solve this problem.
Another way to think about it though is maybe in the language or linear algebra.
We can represent day as the vector: $begin{pmatrix} s \ rend{pmatrix}$ where $s$ is the probability of sun on that day and $r$ represents the chance of rain, and then the matrix:
$$begin{pmatrix} 0.8 & 0.4 \ 0.2 & 0.6 end{pmatrix}$$
would represent the transition function from one day to another.
So if we have rain on the 3rd of May, the probability vector for the 4th of May will be $begin{pmatrix} 0.8 & 0.4 \ 0.2 & 0.6 end{pmatrix} begin{pmatrix} 0 \ 1end{pmatrix}$.
More generally,
$$begin{pmatrix} 0.8 & 0.4 \ 0.2 & 0.6 end{pmatrix}^n begin{pmatrix} 0 \ 1end{pmatrix}$$
the probability vector for the nth day after the 3rd of May. For your problem, I think $n = 31$.
edit
I notice now that SmileyCraft makes a good point to diagonize this transition matrix and this makes the power easier to work with.
New contributor
add a comment |
up vote
4
down vote
$newcommand{bbx}[1]{,bbox[15px,border:1px groove navy]{displaystyle{#1}},}
newcommand{braces}[1]{leftlbrace,{#1},rightrbrace}
newcommand{bracks}[1]{leftlbrack,{#1},rightrbrack}
newcommand{dd}{mathrm{d}}
newcommand{ds}[1]{displaystyle{#1}}
newcommand{expo}[1]{,mathrm{e}^{#1},}
newcommand{ic}{mathrm{i}}
newcommand{mc}[1]{mathcal{#1}}
newcommand{mrm}[1]{mathrm{#1}}
newcommand{pars}[1]{left(,{#1},right)}
newcommand{partiald}[3]{frac{partial^{#1} #2}{partial #3^{#1}}}
newcommand{root}[2]{,sqrt[#1]{,{#2},},}
newcommand{totald}[3]{frac{mathrm{d}^{#1} #2}{mathrm{d} #3^{#1}}}
newcommand{verts}[1]{leftvert,{#1},rightvert}$
$$
left{begin{array}{rcl}
ds{P_{n}} & ds{equiv} & Rainy Probability mbox{at the} n_{th} mbox{Day}
\
ds{P_{1}} & ds{=} & ds{1}
\
ds{P_{31}} & ds{=} & ds{large ?}
end{array}right.
$$
$ds{P_{n}}$ is given by
begin{align}
&P_{n} = pars{1 - P_{n - 1}}0.2 + P_{n - 1}pars{1 - 0.4},,qquad P_{1} = 1
\[5mm]
implies &pars{P_{n} - {1 over 3}} - {2 over 5}pars{P_{n - 1} - {1 over 3}} = 0
\[5mm]
implies &
bbx{P_{n} = {1 over 3} + {5 over 3}pars{2 over 5}^{n}}
\[5mm] implies &
P_{31} =
{310440858205875333091 over 931322574615478515625} approx
bbox[#ffd,10px,border:1px groove navy]{0.3333}
end{align}
I think there are more than four $3$s at the start of the final decimal. Perhaps $11$?
– Henry
2 hours ago
@Henry That's true.
– Felix Marin
31 mins ago
add a comment |
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
6
down vote
A binary tree is definitely a possible way to solve this problem.
Another way to think about it though is maybe in the language or linear algebra.
We can represent day as the vector: $begin{pmatrix} s \ rend{pmatrix}$ where $s$ is the probability of sun on that day and $r$ represents the chance of rain, and then the matrix:
$$begin{pmatrix} 0.8 & 0.4 \ 0.2 & 0.6 end{pmatrix}$$
would represent the transition function from one day to another.
So if we have rain on the 3rd of May, the probability vector for the 4th of May will be $begin{pmatrix} 0.8 & 0.4 \ 0.2 & 0.6 end{pmatrix} begin{pmatrix} 0 \ 1end{pmatrix}$.
More generally,
$$begin{pmatrix} 0.8 & 0.4 \ 0.2 & 0.6 end{pmatrix}^n begin{pmatrix} 0 \ 1end{pmatrix}$$
the probability vector for the nth day after the 3rd of May. For your problem, I think $n = 31$.
edit
I notice now that SmileyCraft makes a good point to diagonize this transition matrix and this makes the power easier to work with.
New contributor
add a comment |
up vote
6
down vote
A binary tree is definitely a possible way to solve this problem.
Another way to think about it though is maybe in the language or linear algebra.
We can represent day as the vector: $begin{pmatrix} s \ rend{pmatrix}$ where $s$ is the probability of sun on that day and $r$ represents the chance of rain, and then the matrix:
$$begin{pmatrix} 0.8 & 0.4 \ 0.2 & 0.6 end{pmatrix}$$
would represent the transition function from one day to another.
So if we have rain on the 3rd of May, the probability vector for the 4th of May will be $begin{pmatrix} 0.8 & 0.4 \ 0.2 & 0.6 end{pmatrix} begin{pmatrix} 0 \ 1end{pmatrix}$.
More generally,
$$begin{pmatrix} 0.8 & 0.4 \ 0.2 & 0.6 end{pmatrix}^n begin{pmatrix} 0 \ 1end{pmatrix}$$
the probability vector for the nth day after the 3rd of May. For your problem, I think $n = 31$.
edit
I notice now that SmileyCraft makes a good point to diagonize this transition matrix and this makes the power easier to work with.
New contributor
add a comment |
up vote
6
down vote
up vote
6
down vote
A binary tree is definitely a possible way to solve this problem.
Another way to think about it though is maybe in the language or linear algebra.
We can represent day as the vector: $begin{pmatrix} s \ rend{pmatrix}$ where $s$ is the probability of sun on that day and $r$ represents the chance of rain, and then the matrix:
$$begin{pmatrix} 0.8 & 0.4 \ 0.2 & 0.6 end{pmatrix}$$
would represent the transition function from one day to another.
So if we have rain on the 3rd of May, the probability vector for the 4th of May will be $begin{pmatrix} 0.8 & 0.4 \ 0.2 & 0.6 end{pmatrix} begin{pmatrix} 0 \ 1end{pmatrix}$.
More generally,
$$begin{pmatrix} 0.8 & 0.4 \ 0.2 & 0.6 end{pmatrix}^n begin{pmatrix} 0 \ 1end{pmatrix}$$
the probability vector for the nth day after the 3rd of May. For your problem, I think $n = 31$.
edit
I notice now that SmileyCraft makes a good point to diagonize this transition matrix and this makes the power easier to work with.
New contributor
A binary tree is definitely a possible way to solve this problem.
Another way to think about it though is maybe in the language or linear algebra.
We can represent day as the vector: $begin{pmatrix} s \ rend{pmatrix}$ where $s$ is the probability of sun on that day and $r$ represents the chance of rain, and then the matrix:
$$begin{pmatrix} 0.8 & 0.4 \ 0.2 & 0.6 end{pmatrix}$$
would represent the transition function from one day to another.
So if we have rain on the 3rd of May, the probability vector for the 4th of May will be $begin{pmatrix} 0.8 & 0.4 \ 0.2 & 0.6 end{pmatrix} begin{pmatrix} 0 \ 1end{pmatrix}$.
More generally,
$$begin{pmatrix} 0.8 & 0.4 \ 0.2 & 0.6 end{pmatrix}^n begin{pmatrix} 0 \ 1end{pmatrix}$$
the probability vector for the nth day after the 3rd of May. For your problem, I think $n = 31$.
edit
I notice now that SmileyCraft makes a good point to diagonize this transition matrix and this makes the power easier to work with.
New contributor
New contributor
answered 6 hours ago
8910
962
962
New contributor
New contributor
add a comment |
add a comment |
up vote
4
down vote
$newcommand{bbx}[1]{,bbox[15px,border:1px groove navy]{displaystyle{#1}},}
newcommand{braces}[1]{leftlbrace,{#1},rightrbrace}
newcommand{bracks}[1]{leftlbrack,{#1},rightrbrack}
newcommand{dd}{mathrm{d}}
newcommand{ds}[1]{displaystyle{#1}}
newcommand{expo}[1]{,mathrm{e}^{#1},}
newcommand{ic}{mathrm{i}}
newcommand{mc}[1]{mathcal{#1}}
newcommand{mrm}[1]{mathrm{#1}}
newcommand{pars}[1]{left(,{#1},right)}
newcommand{partiald}[3]{frac{partial^{#1} #2}{partial #3^{#1}}}
newcommand{root}[2]{,sqrt[#1]{,{#2},},}
newcommand{totald}[3]{frac{mathrm{d}^{#1} #2}{mathrm{d} #3^{#1}}}
newcommand{verts}[1]{leftvert,{#1},rightvert}$
$$
left{begin{array}{rcl}
ds{P_{n}} & ds{equiv} & Rainy Probability mbox{at the} n_{th} mbox{Day}
\
ds{P_{1}} & ds{=} & ds{1}
\
ds{P_{31}} & ds{=} & ds{large ?}
end{array}right.
$$
$ds{P_{n}}$ is given by
begin{align}
&P_{n} = pars{1 - P_{n - 1}}0.2 + P_{n - 1}pars{1 - 0.4},,qquad P_{1} = 1
\[5mm]
implies &pars{P_{n} - {1 over 3}} - {2 over 5}pars{P_{n - 1} - {1 over 3}} = 0
\[5mm]
implies &
bbx{P_{n} = {1 over 3} + {5 over 3}pars{2 over 5}^{n}}
\[5mm] implies &
P_{31} =
{310440858205875333091 over 931322574615478515625} approx
bbox[#ffd,10px,border:1px groove navy]{0.3333}
end{align}
I think there are more than four $3$s at the start of the final decimal. Perhaps $11$?
– Henry
2 hours ago
@Henry That's true.
– Felix Marin
31 mins ago
add a comment |
up vote
4
down vote
$newcommand{bbx}[1]{,bbox[15px,border:1px groove navy]{displaystyle{#1}},}
newcommand{braces}[1]{leftlbrace,{#1},rightrbrace}
newcommand{bracks}[1]{leftlbrack,{#1},rightrbrack}
newcommand{dd}{mathrm{d}}
newcommand{ds}[1]{displaystyle{#1}}
newcommand{expo}[1]{,mathrm{e}^{#1},}
newcommand{ic}{mathrm{i}}
newcommand{mc}[1]{mathcal{#1}}
newcommand{mrm}[1]{mathrm{#1}}
newcommand{pars}[1]{left(,{#1},right)}
newcommand{partiald}[3]{frac{partial^{#1} #2}{partial #3^{#1}}}
newcommand{root}[2]{,sqrt[#1]{,{#2},},}
newcommand{totald}[3]{frac{mathrm{d}^{#1} #2}{mathrm{d} #3^{#1}}}
newcommand{verts}[1]{leftvert,{#1},rightvert}$
$$
left{begin{array}{rcl}
ds{P_{n}} & ds{equiv} & Rainy Probability mbox{at the} n_{th} mbox{Day}
\
ds{P_{1}} & ds{=} & ds{1}
\
ds{P_{31}} & ds{=} & ds{large ?}
end{array}right.
$$
$ds{P_{n}}$ is given by
begin{align}
&P_{n} = pars{1 - P_{n - 1}}0.2 + P_{n - 1}pars{1 - 0.4},,qquad P_{1} = 1
\[5mm]
implies &pars{P_{n} - {1 over 3}} - {2 over 5}pars{P_{n - 1} - {1 over 3}} = 0
\[5mm]
implies &
bbx{P_{n} = {1 over 3} + {5 over 3}pars{2 over 5}^{n}}
\[5mm] implies &
P_{31} =
{310440858205875333091 over 931322574615478515625} approx
bbox[#ffd,10px,border:1px groove navy]{0.3333}
end{align}
I think there are more than four $3$s at the start of the final decimal. Perhaps $11$?
– Henry
2 hours ago
@Henry That's true.
– Felix Marin
31 mins ago
add a comment |
up vote
4
down vote
up vote
4
down vote
$newcommand{bbx}[1]{,bbox[15px,border:1px groove navy]{displaystyle{#1}},}
newcommand{braces}[1]{leftlbrace,{#1},rightrbrace}
newcommand{bracks}[1]{leftlbrack,{#1},rightrbrack}
newcommand{dd}{mathrm{d}}
newcommand{ds}[1]{displaystyle{#1}}
newcommand{expo}[1]{,mathrm{e}^{#1},}
newcommand{ic}{mathrm{i}}
newcommand{mc}[1]{mathcal{#1}}
newcommand{mrm}[1]{mathrm{#1}}
newcommand{pars}[1]{left(,{#1},right)}
newcommand{partiald}[3]{frac{partial^{#1} #2}{partial #3^{#1}}}
newcommand{root}[2]{,sqrt[#1]{,{#2},},}
newcommand{totald}[3]{frac{mathrm{d}^{#1} #2}{mathrm{d} #3^{#1}}}
newcommand{verts}[1]{leftvert,{#1},rightvert}$
$$
left{begin{array}{rcl}
ds{P_{n}} & ds{equiv} & Rainy Probability mbox{at the} n_{th} mbox{Day}
\
ds{P_{1}} & ds{=} & ds{1}
\
ds{P_{31}} & ds{=} & ds{large ?}
end{array}right.
$$
$ds{P_{n}}$ is given by
begin{align}
&P_{n} = pars{1 - P_{n - 1}}0.2 + P_{n - 1}pars{1 - 0.4},,qquad P_{1} = 1
\[5mm]
implies &pars{P_{n} - {1 over 3}} - {2 over 5}pars{P_{n - 1} - {1 over 3}} = 0
\[5mm]
implies &
bbx{P_{n} = {1 over 3} + {5 over 3}pars{2 over 5}^{n}}
\[5mm] implies &
P_{31} =
{310440858205875333091 over 931322574615478515625} approx
bbox[#ffd,10px,border:1px groove navy]{0.3333}
end{align}
$newcommand{bbx}[1]{,bbox[15px,border:1px groove navy]{displaystyle{#1}},}
newcommand{braces}[1]{leftlbrace,{#1},rightrbrace}
newcommand{bracks}[1]{leftlbrack,{#1},rightrbrack}
newcommand{dd}{mathrm{d}}
newcommand{ds}[1]{displaystyle{#1}}
newcommand{expo}[1]{,mathrm{e}^{#1},}
newcommand{ic}{mathrm{i}}
newcommand{mc}[1]{mathcal{#1}}
newcommand{mrm}[1]{mathrm{#1}}
newcommand{pars}[1]{left(,{#1},right)}
newcommand{partiald}[3]{frac{partial^{#1} #2}{partial #3^{#1}}}
newcommand{root}[2]{,sqrt[#1]{,{#2},},}
newcommand{totald}[3]{frac{mathrm{d}^{#1} #2}{mathrm{d} #3^{#1}}}
newcommand{verts}[1]{leftvert,{#1},rightvert}$
$$
left{begin{array}{rcl}
ds{P_{n}} & ds{equiv} & Rainy Probability mbox{at the} n_{th} mbox{Day}
\
ds{P_{1}} & ds{=} & ds{1}
\
ds{P_{31}} & ds{=} & ds{large ?}
end{array}right.
$$
$ds{P_{n}}$ is given by
begin{align}
&P_{n} = pars{1 - P_{n - 1}}0.2 + P_{n - 1}pars{1 - 0.4},,qquad P_{1} = 1
\[5mm]
implies &pars{P_{n} - {1 over 3}} - {2 over 5}pars{P_{n - 1} - {1 over 3}} = 0
\[5mm]
implies &
bbx{P_{n} = {1 over 3} + {5 over 3}pars{2 over 5}^{n}}
\[5mm] implies &
P_{31} =
{310440858205875333091 over 931322574615478515625} approx
bbox[#ffd,10px,border:1px groove navy]{0.3333}
end{align}
edited 4 hours ago
answered 6 hours ago
Felix Marin
66.6k7107139
66.6k7107139
I think there are more than four $3$s at the start of the final decimal. Perhaps $11$?
– Henry
2 hours ago
@Henry That's true.
– Felix Marin
31 mins ago
add a comment |
I think there are more than four $3$s at the start of the final decimal. Perhaps $11$?
– Henry
2 hours ago
@Henry That's true.
– Felix Marin
31 mins ago
I think there are more than four $3$s at the start of the final decimal. Perhaps $11$?
– Henry
2 hours ago
I think there are more than four $3$s at the start of the final decimal. Perhaps $11$?
– Henry
2 hours ago
@Henry That's true.
– Felix Marin
31 mins ago
@Henry That's true.
– Felix Marin
31 mins ago
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.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- 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.
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%2f3037052%2fdetermining-probability-of-a-rainy-day%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
2
You can diagonalize the transition matrix and raise it to the desired power.
– SmileyCraft
7 hours ago
1
It is easy to compute the limiting probabilities...you might imagine that $30$ days (or whatever) is long enough for the probabilities to be in their limiting state. Running it quickly on a spreadsheet, it looks like they get to the limit much quicker than that.
– lulu
7 hours ago