第86行: |
第86行: |
| | | |
| <math> | | <math> |
− | P(Y=y|do(X=1)) = \sum_Z P(Y=y|X=x, Z=z) | + | P(Y=1|do(X=1)) & = \sum_Z P(Y=1|X=1, Z=z)P(Z) = P(Y=1|X=1, Z=1)P(Z=1) + P(Y=1|X=1, Z=0)P(Z=0) |
| + | & = \frac{0.93*(87+270)}{700} + \frac{0.73*(263+80)}{700} = 0.832 |
| + | </math> |
| + | |
| + | 同理, |
| + | |
| + | <math> |
| + | P(Y=1|do(X=0)) & = \sum_Z P(Y=1|X=0, Z=z)P(Z) = P(Y=1|X=0, Z=1)P(Z=1) + P(Y=1|X=0, Z=0)P(Z=0) |
| + | & = \frac{0.87*(87+270)}{700} + \frac{0.69*(263+80)}{700} = 0.781 |
| + | </math> |
| + | |
| + | 因此,服用药物的效果和不服用药物的效果的差异为: |
| + | <math> |
| + | P(Y=y|do(X=1)) - P(Y=y|do(X=0)) = 0.832 - 0.781 = 0.0502 |
| </math> | | </math> |
| | | |