Data Science, Causal Inference, Linear Regression, Getting Started, Ab Testing.
std1**2 + (n2 - 1) * std2**2) / (n1 + n2 - 2)) degrees_of_freedom = n1 + n2 - 2 confidence_level = 0.95 # Calculate margin of error margin_of_error = stats.t.ppf((1 + confidence_level) / 2, degrees_of_freedom) * pooled_std * np.sqrt(1 / n1 + 1 / n2) # Calculate confidence interval mean_difference =