Book Image

Learning SciPy for Numerical and Scientific Computing Second Edition - Second Edition

Book Image

Learning SciPy for Numerical and Scientific Computing Second Edition - Second Edition

Overview of this book

This book targets programmers and scientists who have basic Python knowledge and who are keen to perform scientific and numerical computations with SciPy.
Table of Contents (10 chapters)
9
Index

Interval estimation, correlation measures, and statistical tests


We briefly covered interval estimation as an introductory example of SciPy: bayes_mvs, in Chapter 1, Introduction to SciPy, with very simple syntax, as follows:

bayes_mvs(data, alpha=0.9)

It returns a tuple of three arguments in which each argument has the form (center, (lower, upper)). The first argument refers to the mean; the second refers to the variance; and the third to the standard deviation. All intervals are computed according to the probability given by alpha, which is 0.9 by default.

We may use the linregress routine to compute the regression line of some two-dimensional data x, or two sets of one-dimensional data, x and y. We may compute different correlation coefficients, with their corresponding p-values, as well. We have the Pearson correlation coefficient (pearsonr), Spearman's rank-order correlation (spearmanr), point biserial correlation (pointbiserialr), and Kendall's tau for ordinal data (kendalltau). In all...