# Categorical vs. Quantitative Data

## Distinguish between quantitative and categorical variables in context.

### Learning Outcomes

• Distinguish between quantitative and categorical variables in context.

Data consist of individuals and variables that give us information about those individuals. An individual can be an object or a person. A variable is an attribute, such as a measurement or a label.

## Medical Records

This dataset is from a medical study. In this study, researchers wanted to identify variables connected to low birth weights.

Age at delivery Weight prior to pregnancy (pounds) Smoker Doctor visits during 1st trimester Race Birth Weight (grams)
Patient 1 29 140 Yes 2 Caucasian 2977
Patient 2 32 132 No 4 Caucasian 3080
Patient 3 36 175 No 0 African-American 3600
* * * * * * *
* * * * * * *
Patient 189 30 95 Yes 2 Asian 3147
In this example, the individuals are the patients (the mothers). There are six variables in this dataset:

• Mother’s age at delivery (years)
• Mother’s weight prior to pregnancy (pounds)
• Whether mother smoked during pregnancy (yes, no)
• Number of doctor visits during first trimester of pregnancy
• Mother’s race (Caucasian, African American, Asian, etc.)
• Baby’s birth weight (grams)

There are two types of variables: quantitative and categorical.

• Categorical variables take category or label values and place an individual into one of several groups. Each observation can be placed in only one category, and the categories are mutually exclusive. In our example of medical records, smoking is a categorical variable, with two groups, since each participant can be categorized only as either a nonsmoker or a smoker. Gender and race are the two other categorical variables in our medical records example.
• Quantitative variables take numerical values and represent some kind of measurement. In our medical example, age is an example of a quantitative variable because it can take on multiple numerical values. It also makes sense to think about it in numerical form; that is, a person can be 18 years old or 80 years old. Weight and height are also examples of quantitative variables.

### Try It

We took a random sample from the 2000 US Census. Here is part of the dataset.

### Try It

Consumer Reports analyzed a dataset of 77 breakfast cereals. Here is a part of the dataset.

(Note: Consumer Reports is an non-profit organization that rates products in an effort to help consumers make informed decisions.)