Chapter 3. Analyzing Data Statistically

In this chapter, we will cover the following recipes:

  • Generating descriptive statistics
  • Generating summary statistics
  • Generating summary statistics from multiple distributions
  • Computing frequency distribution
  • Counting word frequency in a string
  • Counting word frequency in a string using Java 8
  • Computing simple regression
  • Computing ordinary least squares regression
  • Computing generalized least squares regression
  • Calculating covariance of two sets of data points
  • Calculating Pearson's correlation of two sets of data points
  • Conducting a paired t-test
  • Conducting a Chi-square test
  • Conducting one-way ANOVA test
  • Conducting a Kolmogorov-Smirnov test


Statistical analysis is one of the regular activities of a data scientist. ...

Get Java Data Science Cookbook now with the O’Reilly learning platform.

O’Reilly members experience live online training, plus books, videos, and digital content from nearly 200 publishers.