@@ -196,15 +196,15 @@ def two_sample(x, y, reps=10**5, stat='mean', alternative="greater",
196196 approximating the permutation distribution.
197197 The t-statistic is computed using scipy.stats.ttest_ind
198198 (c) If stat is a function (a callable object), the test statistic is
199- that function. The function should take two arguments:
199+ that function. The function should take two arguments:
200200 given a permutation of the pooled data, the first argument is the
201201 "new" x and the second argument is the "new" y.
202202 For instance, if the test statistic is the Kolmogorov-Smirnov distance
203203 between the empirical distributions of the two samples,
204204 $\max_t |F_x(t) - F_y(t)|$, the test statistic could be written:
205205
206206 f = lambda u, v: np.max( \
207- [abs(sum(u<=v )/len(u)-sum(v<=val)/len(v)) for val in np.concatenate([u, v])]\
207+ [abs(sum(u<=val )/len(u)-sum(v<=val)/len(v)) for val in np.concatenate([u, v])]\
208208 )
209209
210210 alternative : {'greater', 'less', 'two-sided'}
@@ -298,15 +298,15 @@ def two_sample_shift(x, y, reps=10**5, stat='mean', alternative="greater",
298298 approximating the permutation distribution.
299299 The t-statistic is computed using scipy.stats.ttest_ind
300300 (c) If stat is a function (a callable object), the test statistic is
301- that function.The function should take two arguments:
301+ that function. The function should take two arguments:
302302 given a permutation of the pooled data, the first argument is the
303303 "new" x and the second argument is the "new" y.
304304 For instance, if the test statistic is the Kolmogorov-Smirnov distance
305305 between the empirical distributions of the two samples,
306306 $\max_t |F_x(t) - F_y(t)|$, the test statistic could be written:
307307
308308 f = lambda u, v: np.max( \
309- [abs(sum(u<=v )/len(u)-sum(v<=val)/len(v)) for val in np.concatenate([u, v])]\
309+ [abs(sum(u<=val )/len(u)-sum(v<=val)/len(v)) for val in np.concatenate([u, v])]\
310310 )
311311
312312 alternative : {'greater', 'less', 'two-sided'}
@@ -414,15 +414,15 @@ def two_sample_conf_int(x, y, cl=0.95, alternative="two-sided", seed=None,
414414 approximating the permutation distribution.
415415 The t-statistic is computed using scipy.stats.ttest_ind
416416 (c) If stat is a function (a callable object), the test statistic is
417- that function.The function should take two arguments:
417+ that function. The function should take two arguments:
418418 given a permutation of the pooled data, the first argument is the
419419 "new" x and the second argument is the "new" y.
420420 For instance, if the test statistic is the Kolmogorov-Smirnov distance
421421 between the empirical distributions of the two samples,
422422 $\max_t |F_x(t) - F_y(t)|$, the test statistic could be written:
423423
424424 f = lambda u, v: np.max( \
425- [abs(sum(u<=v )/len(u)-sum(v<=val)/len(v)) for val in np.concatenate([u, v])]\
425+ [abs(sum(u<=val )/len(u)-sum(v<=val)/len(v)) for val in np.concatenate([u, v])]\
426426 )
427427
428428 shift : float
0 commit comments