예제 #1
0
def TestIntervention():
    """Tests whether reported changes are statistically significant.

    Results:
    -1.66 4.73095323208e-05
    -0.26 0.125267987207
     1.4 0.00182694836898

    Conclusions:

    1) Gender gap before intervention was 1.66 points (p-value 5e-5)

    2) Genger gap after was 0.26 points (p-value 0.13, no significant)

    3) Change in gender gap was 1.4 points (p-value 0.002, significant).
    """
    male_before = normal.Normal(3.57, 0.28**2)
    male_after = normal.Normal(3.44, 0.16**2)

    female_before = normal.Normal(1.91, 0.32**2)
    female_after = normal.Normal(3.18, 0.16**2)

    diff_before = female_before - male_before
    print(diff_before.mu, 1-diff_before.Prob(0))

    diff_after = female_after - male_after
    print(diff_after.mu, 1-diff_after.Prob(0))

    diff = diff_after - diff_before
    print(diff.mu, diff.Prob(0))
 def Normal(self):
     import normal
     nueva_escena = normal.Normal(self.pilas)
     return self.definir_escena(nueva_escena)