Search⌘ K

Statistics

Explore how to perform fundamental statistical analysis with NumPy. Learn to calculate min, max, mean, median, and variance on arrays and understand data trends and outliers.

Chapter Goals:

  • Learn about basic statistical analysis in NumPy
  • Write code to obtain statistics for NumPy arrays

A. Analysis

It is often useful to analyze data for its main characteristics and interesting trends. There are few techniques in NumPy that allow us to quickly inspect data arrays.

For example, we can obtain minimum and maximum values of a NumPy array using its inherent min and max functions. This gives us an initial sense of the data's range, and can alert us to extreme ...