Calculates whether the difference in test results between two samples is statistically significant.
For example, assume we have a poll of respondents in which 27/40 people agreed, and another poll in which 42/80 agreed. This test will determine if the difference is statistically significant for the given sample sizes at the specified confidence level.
- sample_1_trials (int) – The number of trials in the first sample.
- sample_1_successes (int) – The number of successes in the first sample.
- sample_2_trials (int) – The number of trials in the second sample.
- sample_2_successes (int) – The number of successes in the second sample.
- CI (float, optional) – The desired confidence interval. Must be between 0 and 1. Default = 0.95 for 95% CI.
- print_results (bool, optional) – If True the results will be printed to the console. Default = True.
lower,upper,result (tuple) – The lower and upper are bounds on the difference. The result is either ‘significant’ or ‘non-significant’. If the bounds do not include 0 then it is a statistically significant difference.