What do you want to save?
Add Code snippet
New code examples
-
Python 2021-11-01 10:18:09
confidence intervals in python
import numpy as np import scipy.stats as st #define sample data data = [12, 12, 13, 13, 15, 16, 17, 22, 23, 25, 26, 27, 28, 28, 29] #create 95% confidence interval for population mean weight st.t.interval(alpha=0.95, df=len(data)-1, loc=np.mean(data), s... Add solution -
Python 2021-10-21 21:42:07
python anova
# load packages import scipy.stats as stats # stats f_oneway functions takes the groups as input and returns F and P-value fvalue, pvalue = stats.f_oneway(d['A'], d['B'], d['C'], d['D']) print(fvalue, pvalue) # 17.492810457516338 2.639241146210922e-05 # ... Add solution -
Python 2021-08-27 14:03:01
plot normal distribution python
import matplotlib.pyplot as plt import numpy as np import scipy.stats as stats import math mu = 0 variance = 1 sigma = math.sqrt(variance) x = np.linspace(mu - 3 * sigma, mu + 3 * sigma, 100) plt.plot(x, stats.norm.pdf(x, mu, sigma)) plt.show() Add solution