Register to reply

Bayesian inference

by zli034
Tags: bayesian, inference
Share this thread:
zli034
#1
Feb25-10, 02:54 PM
P: 103
(Moderator's note: thread moved from "Set Theory, Logic, Probability, Statistics")

Hi guys,

Say outside of my house, there are 20% chance of rain, and 40% chance the sprinker is on.

When it is rain the pavement outside of house must be wet. And if the sprinkler is on, it also wet my pavement. If there is no rain and the sprinkler is off, my pavement is just dry.

How do I calculate the probability of my pavement is dry?

And I got the answer 52% from Netica. I think you all know netica is for bayesian network.
Phys.Org News Partner Science news on Phys.org
Experts defend operational earthquake forecasting, counter critiques
EU urged to convert TV frequencies to mobile broadband
Sierra Nevada freshwater runoff could drop 26 percent by 2100
Kittel Knight
#2
Feb25-10, 05:36 PM
P: 106
Let's consider the chance of rain and no rain:

--- 20% chance of rain ---
20% chance of pavement wet (it doesn't matter if the sprinkler is on or off)

--- 80% chance of no rain ---
80% * 40% chance of pavement wet due the sprinkler
80% * 60% chance of pavement dry (cause there is no rain, and the sprinkler is off)

So, the chance of pavement wet is
20% + 80% * 40% = 52%
SW VandeCarr
#3
Feb25-10, 06:18 PM
P: 2,501
Quote Quote by Kittel Knight View Post
Let's consider the chance of rain and no rain:

--- 20% chance of rain ---
20% chance of pavement wet (it doesn't matter if the sprinkler is on or off)

--- 80% chance of no rain ---
80% * 40% chance of pavement wet due the sprinkler
80% * 60% chance of pavement dry (cause there is no rain, and the sprinkler is off)

So, the chance of pavement wet is
20% + 80% * 40% = 52%
The answer is correct, but it's a straight (frequentist) probability calculation if the probabilities of rain (R) and sprinkler use (S) are independent. If so, then the probability the pavement is wet (W) is: P(R)+P(S)-P(R)P(S)= P(W)=0.2+0.4-(0.2)(0.4)= 0.52.

Realistically P(R) and P(S) should not be independent and you would need some additional information on this such as P(R|S) or P(S|R).

zli034
#4
Feb25-10, 06:31 PM
P: 103
Bayesian inference

Thanks guys. I should worked it out. I was just spent whole afternoon working til brain damaged. :p
SW VandeCarr
#5
Mar3-10, 12:31 PM
P: 2,501
Quote Quote by zli034 View Post
Thanks guys. I should worked it out. I was just spent whole afternoon working til brain damaged. :p
I hope your brain has recovered by now. Since your question was entitled "Bayesian Inference", I 'm wondering if you understand why it is Bayesian. The result P(W)=0.52 is just one of an infinite number of results under a continuum of prior assumptions with fixed P(S) and P(R).

What is the maximum value that P(W) can have? Set P(S|R)= 0 and use Bayes' Theorem to calculate the max P(W).

What is the minimum value that P(W) can have? Set P(S|R) = 1 and repeat the calculation for min P(W).

Hint: Note the role of the "interaction" term P(S)P(R) in the original calculation under the assumption of independence.
skeptic2
#6
Mar3-10, 02:58 PM
P: 1,815
Quote Quote by zli034 View Post
(Moderator's note: thread moved from "Set Theory, Logic, Probability, Statistics")

Hi guys,

Say outside of my house, there are 20% chance of rain, and 40% chance the sprinker is on.

When it is rain the pavement outside of house must be wet. And if the sprinkler is on, it also wet my pavement. If there is no rain and the sprinkler is off, my pavement is just dry.

How do I calculate the probability of my pavement is dry?

And I got the answer 52% from Netica. I think you all know netica is for bayesian network.
While I agree the probability of the pavement being wet is 52%, the question as asked (see above) was for the probability of the pavement being dry. I hope the OP doesn't go away thinking 52% is the right answer.
SW VandeCarr
#7
Mar3-10, 09:10 PM
P: 2,501
Quote Quote by skeptic2 View Post
While I agree the probability of the pavement being wet is 52%, the question as asked (see above) was for the probability of the pavement being dry. I hope the OP doesn't go away thinking 52% is the right answer.
You're right. I responded to Kittel Knight's somewhat round-about approach and simply assumed P(W) was the OP's question. I think I made clear that P(W) was the object of my calculation.


Register to reply

Related Discussions
Bayesian or not Bayesian,this is my problem... Set Theory, Logic, Probability, Statistics 3
Derivation of bayesian inference in Hidden Markov model Set Theory, Logic, Probability, Statistics 19
Bayesian statistics question Set Theory, Logic, Probability, Statistics 8
Bayesian Inference Set Theory, Logic, Probability, Statistics 2
Multiple Bayesian probability Calculus & Beyond Homework 0