ToolPythonBeginner
numpy.log
Python. Called in 2 tutorials; each line below leads to its place in the tutorial.
ToolPythonBeginner
scipy.stats from the ground up: is the difference between two samples real?
- a_ln = rng.lognormal(np.log(10), 1.0, (R, n)) # concentrations, µg/L, median 10
- b_ln = rng.lognormal(np.log(20), 1.0, (R, n)) # median 20: B is twice A
- "t-test on the logarithms": stats.ttest_ind(np.log(b_ln), np.log(a_ln), axis=1, equal_var=False).pvalue,
- log_res = stats.ttest_ind(np.log(b_ln[0]), np.log(a_ln[0]), equal_var=False)
- ratio = np.exp(np.log(b_ln[0]).mean() - np.log(a_ln[0]).mean())