11- bayesian networks and causality Flashcards
Bayesian Network defintion
- A graphical model that encodes probabilistic relationships among variables of interest
How are Bayesian networks represented?
Direct acyclic graph (DAG)
Bayesian network example in medicine
Vars:
- F (whether patient has flu)
- T (fever whether they have it)
- C (Cough)
Probabilities:
- P(T) probability of having fever
- P(T|F) prob of having fever given flu
- P(T|¬F) prob of fever without flu
- P(C|F): of cough given flu
- P(C|¬F) of cough without flu
BAyesian student example
Vars:
- Difficulty D
- Ability A
- Grade G
Prob:
- P(D) test being difficult
- P(A) of student being prepared
- P(G|D,A) of getting a grade given the difficulty and ability
DAG:
D->G and A->G
What can we do with Bayesian networks
- Joe Bob got a bad grade but good student. Exam hard
- Jane got top marks from uni. talented
These are used to say
- difficult exam, wont choose
- talented, get hired
Are they valid/trustworthy conclusions.
With the student performance model, what do we assume?
- Grade G depends on difficulty D and ability A
- D and A are independent of each other i.e P(D|A) = P(D), P(A|D) = P(A)
Student example, what do we know?
- Prior probabilites from previous years.
Student example, what are we trying to find?
Posterior probabilites
- P(D|G) how difficult is the exame based on grade.
- P(A|G) what is the student’s capability based on grade
Student example, how d we find the probabillity that the student has a high ability given a certain mark?
Bayes Theorem.
- P(A|G)=P(G|A)P(A)/P(G)
- Note that the probability increases as P(G) decreases and P(A) increases)
In Bayesian net A -> B -> C is equivalent to…
C -> B -> A
Not speculating on whether one thing is causing another to happen
Causal network
Like a bayesian network, but the edges represent “causation”
Confounders
Variable that indluences both independent variable (exposure) and the dependent variable (outcome.
Can create a spurious association between exposure and outcome, making it difficult to discern the true causal relationship
Confounders in exam results
Family support is a confounding factor as it effects both motivation and grade.
Same with Study Habits as it affects both class participation and grade
Colliders
Multiple variables go into one
Colliders problem in relation to the exam results problem (consider Sleep Quality and Study Habits)
grade is a collider with SQ and SH
- Partition students by grades
- It is possible that students with good grades have both high sleep qual and study habits, and in reverse.
- It might appear that there is a correlation but there is no causal link between the two (SQ and SH)