## With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

No credit card required

# Chapter 10. Statistics

You can't write a book about data analysis and not talk about statistics. Statistics is the science of collecting and analyzing data. When combined with probability theory, you can use statistics to make guesses about the future.

Access is a good tool for collecting data, and it offers a number of features that can help you analyze that data. In this chapter, you'll learn how to compute statistics using aggregate functions and how to build custom tools to analyze your data. You'll also learn how to display useful types of charts that will give you new insights into your data.

# Creating a Histogram

## Problem

I'd like to understand how the values of a data element I'm collecting are distributed.

## Solution

You can use a frequency table and a histogram to identify how the data values are distributed.

A frequency table begins by defining a set of "buckets," and associating a range of data values with each bucket. Each row is then read from the database, and each element is placed in the appropriate bucket based on its value. Once all of the rows have been processed, the frequency table can be constructed by counting the number of data elements in each bucket.

For example, consider the following list of values:

`	43, 45, 17, 38, 88, 22, 55, 105, 48, 24, 11, 18, 20, 91, 9, 19`

Table 10-1 contains the number of data elements for each given set of ranges.

Table 10-1. A simple frequency table

Below 25

25 to 50

50 to 75

75 to 100

Above 100

8

4

1

2

1

While you may think that ...

## With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

No credit card required