# data[].attributes.headline
Sonya recorded the number of gallons of gas, rounded to the nearest tenth, that the first 20 customers at a gas station purchased.19.3, 10.4, 22.2, 18.6, 20.5, 8.8, 21.3, 16.3, 14.4, 2.8,  23.0, 21.3, 24.8, 15.0, 13.5, 4.8, 23.0, 14.7, 13.2, 20.7She plans to make a histogram of the data. Which classes could she use?

# data[].attributes.subject
Sonya recorded the number of gallons of gas, rounded to the nearest tenth, that the first 20 customers at a gas station purchased.19.3, 10.4, 22.2, 18.6, 20.5, 8.8, 21.3, 16.3, 14.4, 2.8,  23.0, 21.3, 24.8, 15.0, 13.5, 4.8, 23.0, 14.7, 13.2, 20.7She plans to make a histogram of the data. Which classes could she use?

# data[].attributes.body
0.0–2.9, 3.0–5.9, 6.0–8.9, 9.0–11.9, 12.0–14.9, 15.0–17.9, 18.0–20.9, 21.0–23.9, 24.0–26.9

# data[].attributes.body
Find the classes that have these characteristics:

don't have gaps

are equal sizes

fit the smallest and largest data values

The first set of classes has different widths, some 5.9 and some 4.9.

The second set of classes has gaps. Notice that the value of 21.3 doesn't fit into any class.

The third data set doesn't start low enough. The value 2.8 doesn't fit.

# data[].attributes.body
Some studies consider only one variable, or unknown. The data collected are called univariate data. A list of the ages of the entrants in a singing competition is an example of univariate data. Other studies consider two variables and the data are called bivariate data. The lists of ages and years of musical training of the entrants in a singing competition is an example of bivariate data. These are both examples of quantitative data, because the data are numerical; they are quantities.

On the other hand, qualitative data, also called categorical data, are usually not numeric. There are categories to choose from, such as gender (male, female), type of vehicle (car, truck, SUV), and pet ownership (have a pet, do not have a pet).

A Venn diagram displays categorical data. Here, people were surveyed and asked whether they played the piano and whether they had a pet.

# data[].attributes.body
Six people play the piano and have a pet, 14 people play the piano but don’t have a pet, 9 people have a pet but don’t play the piano, and 3 people neither play the piano nor have a pet. You can display this information in a  two-way table

# data[].attributes.body
a frequency table for two categorical variables

# data[].attributes.body
A two-way table can include totals for each row, totals for each column, and a grand total of the rows and columns.

# data[].attributes.body
The total of the row totals (20 + 12) equals the total of the column totals (15 + 17). The sum of 32 is the number of people surveyed.

To construct a two-way table:

List the choices for one of the categories vertically.

List the choices for the other category horizontally.

Fill in the table cells with the given information.

If needed, use addition and subtraction to fill in any remaining cells.

Think About It: The number of choices for the categories of either variable can be more than two.

# data[].attributes.body
What type of data are categorical data?

Describe how to create a two-way table from a Venn diagram that has two intersecting loops.

How can you check that you created a two-way table correctly?

# data[].attributes.body
The American Society for the Prevention of Cruelty to Animals (ASPCA) estimates that 7.6 million animals are taken to animal shelters every year.

It is tough to get an exact figure because some shelters don’t keep records, often because they don’t have the time or staffing to do so. Shelters that do keep records often find that it is well worth the time and cost of doing so. For example, they can use the data to back up claims about their current needs, which encourages supporters to donate the types of supplies that will help the shelters the most. They may also report numbers to the media about how many animals were adopted, sent to animal sanctuaries, or sent to foster care homes over a given period of time. More positive media attention yields more donors and volunteers.

# data[].attributes.body
Aside from tracking how many animals are brought in and how many leave, a shelter may also track how many of the animals that came in had microchips, how many were already spayed or neutered upon arrival, and how many were spayed or neutered by veterinarians working in conjunction with the shelter. Shelters may also track and report on their numbers of employees, volunteers, and donations.

There’s a lot of data to collect and report, and two-way tables can make it easier to interpret.