The two-proportion z-test compares the success proportions of two groups, such as the conversion rates of control and variant. It uses a z statistic based on the gap between proportions, divided by its standard error, and provides a p-value. It is appropriate when the samples are large enough.
Example
from statsmodels.stats.proportion import proportions_ztest
proportions_ztest([120, 150], [2000, 2000])