@@ -116,8 +116,8 @@ def run_sbc(N=N, S=S, D=D, bias=0):
116116 ranks = np .sum (posterior_draws < prior_draws , axis = 0 )
117117
118118 # this is the distribution of gamma under uniform ranks
119- gamma_null = bf .diagnostics .metrics .gamma_null_distribution (D , S , num_null_draws = 100 )
120- lower , upper = np .quantile (gamma_null , (0.05 , 0.995 ))
119+ gamma_null = bf .diagnostics .metrics .gamma_null_distribution (D , S , num_null_draws = 200 )
120+ lower , upper = np .quantile (gamma_null , (0.025 , 0.975 ))
121121
122122 # this is the empirical gamma
123123 observed_gamma = bf .diagnostics .metrics .gamma_discrepancy (ranks , num_post_draws = S )
@@ -132,7 +132,7 @@ def run_sbc(N=N, S=S, D=D, bias=0):
132132 # this test should fail with a probability of 0.1%
133133 assert lower_expected <= np .sum (sbc_calibration ) <= upper_expected
134134
135- # sbc should almost always fial for slightly biased posterior draws
135+ # sbc should almost always fail for slightly biased posterior draws
136136 sbc_calibration = [run_sbc (N = N , S = S , D = D , bias = 1 ) for _ in range (100 )]
137137 assert not lower_expected <= np .sum (sbc_calibration ) <= upper_expected
138138
0 commit comments