Created
March 28, 2021 07:49
-
-
Save grahamharrison68/0ef84ab237e87cc389b9806316c6bd54 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def normal_distribution_ci_pop_min(confidence, x_bar, sigma, n): | |
return normal_distribution_ci(confidence, x_bar, sigma, n)[0] | |
def normal_distribution_ci_pop_max(confidence, x_bar, sigma, n): | |
return normal_distribution_ci(confidence, x_bar, sigma, n)[1] | |
def normal_distribution_ci_text(confidence, x_bar, sigma, n): | |
ci = normal_distribution_ci(confidence, x_bar, sigma, n) | |
return f"The population mean lies between {ci[0]:.2f} and {ci[1]:.2f} with {confidence:.0%} confidence" | |
def binomial_distribution_ci_pop_min(confidence, p_hat, n): | |
return binomial_distribution_ci(confidence, p_hat, n)[0] | |
def binomial_distribution_ci_pop_max(confidence, p_hat, n): | |
return binomial_distribution_ci(confidence, p_hat, n)[1] | |
def binomial_distribution_ci_text(confidence, p_hat, n): | |
ci = binomial_distribution_ci(confidence, p_hat, n) | |
return f"The population mean lies between {ci[0]:.1%} and {ci[1]:.1%} with {confidence:.0%} confidence" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment