Book Image

Mastering Python for Data Science

By : Samir Madhavan
Book Image

Mastering Python for Data Science

By: Samir Madhavan

Overview of this book

Table of Contents (19 chapters)
Mastering Python for Data Science
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
7
Estimating the Likelihood of Events
Index

ANOVA


Analysis of Variance (ANOVA) is a statistical method used to test differences between two or more means.

This test basically compares the means between groups and determines whether any of these means are significantly different from each other:

ANOVA is a test that can tell you which group is significantly different from each other. Let's take the height of men who are from three different countries and see if their heights are significantly different from others:

>>> country1 = np.array([ 176.,  179.,  180.,  188.,  187.,  184.,  171.,  201.,  172.,
        181.,  192.,  187.,  178.,  178.,  180.,  199.,  185.,  176.,
        207.,  177.,  160.,  174.,  176.,  192.,  189.,  187.,  183.,
        180.,  181.,  200.,  190.,  187.,  175.,  179.,  181.,  183.,
        171.,  181.,  190.,  186.,  185.,  188.,  201.,  192.,  188.,
        181.,  172.,  191.,  201.,  170.,  170.,  192.,  185.,  167.,
        178.,  179.,  167.,  183.,  200.,  185.])

>>> country2 = np.array...