Data Science, Product Analytics, Ab Testing, Simulation, Deep Dives.
sample_std / np.sqrt(n) # Calculate the confidence interval lower_bound = sample_mean - margin_of_error upper_bound = sample_mean + margin_of_error return lower_bound, upper_bound get_normal_confidence_interval(df.kms_during_program.values) # (111.86, 260.55) The other option often used with