if I have the following dataset and I'm interested to find the probability of it raining today given the last 2 days were raining. It seems like I could use Bayesian model to get the probability to forecast that.

I'm not sure how do I start.

1) the event that A|B --> 3 occurrences, day 3, day 4 and day 15. Does that mean that, $P(A|B) = \frac{3}{20}$? If it is, given the dataset that I have do I still need the following Bayes formula to obtain $P(A|B) $?

$$P(A|B) =\frac{P(B| A)\cdot P(A)}{P(B)}$$

A = rain on 3rd day

B = rain previous 2 days

P(A|B) = probability of 3rd day raining given the last 2 days raining

P(B|A) = probability of the last 2 days raining given the 3rd day raining, (this doesn't make intuitive sense) If I'm to obtain this probability from the dataset, how do I do that?

P(A) = probability of 1 day raining

P(B) = probability of 2 consecutive days raining

2) I don't know if the above approach is the right way to forecast the chances of 3rd day raining given that the previous 2 days were raining. Having said that, is there any other stochastic models that I could use?

Note: I'm currently studying Kai Lai Chung's A Course in Probability Theory, and bought the book, Probability and Stochastic Modeling by Vladimir Rotar to self-study

$$\begin{array}{|c|c|} \hline Day & Rain \\ \hline 1&rain\\ \hline 2&rain\\ \hline 3&rain\\ \hline 4&rain\\ \hline 5&no\\ \hline 6&rain\\ \hline 7&no\\ \hline 8&no\\ \hline 9&no\\ \hline 10&rain\\ \hline 11&rain\\ \hline 12&no\\ \hline 13&rain\\ \hline 14&rain\\ \hline 15&rain\\ \hline 16&no\\ \hline 17&no\\ \hline 18&rain\\ \hline 19&rain\\ \hline 20&no\\ \hline \end{array}$$

  • 2
    $\begingroup$ I think the simplest approach is to consider the fact that that there were 7 instances of rain 2 days in a row and that 3 of those instances were followed by a third day of rain while the other 4 did not. I would say $P(A|B)=3/7$. $\endgroup$ – Laars Helenius Mar 13 '18 at 23:41

The Bayes' approach of finding $\mathsf P(A\mid B)$ by calculating it as $\mathsf P(B\mid A)\mathsf P(A)/\mathsf P(B)$ is only helpful if you have ways to evaluate $\mathsf P(B\mid A)$, $\mathsf P(A)$, and $\mathsf P(B)$ that are easier than just evaluating $\mathsf P(A\mid B)$ directly.

All you have is the data.   You can use a frequentist approximation to evaluate $\mathsf P(B\mid A)$, $\mathsf P(A)$, and $\mathsf P(B)$, but you may as well just use it to evaluate $\mathsf P(A\mid B)$.

There are 19 blocks of three consecutive days.   10 of these have rain on their third day (event $A$).   7 of them have rain on the first and second days (event $B$).   3 of them have rain on all three days (event $A\cap B$).


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.