fairlens.metrics.binominal_proportion_p_value#
- binominal_proportion_p_value(p_obs, p_null, n, alternative='two-sided')[source]#
Calculate an exact p-value for an observed binomial proportion of a sample.
- Parameters
p_obs (float) – Observed proportion of successes.
p_null (float) – Expected proportion of sucesses under null hypothesis.
n (int) – Sample size.
alternative (str, optional) – Indicates the alternative hypothesis. One of “two-sided”, “greater”, “less”. Defaults to “two-sided”.
- Returns
The p-value under the null hypothesis.
- Return type
float