True or false: If a variable is stored as an integer, its meaning must be quantitative.
3 Data Types and Data Structures Online Quiz Questions
Use this free practice quiz with 20 questions to review 3 Data Types and Data Structures, test your knowledge, and prepare for your next test or exam.
A clinic records the number of visits made by each patient. What type of quantitative variable is the visit count?
In a common tidy table, each column represents a , and each row represents one .
A dataset has text labels in one column and numbers in another. Which description best fits a pandas DataFrame?
- A
A structure that requires every column to have the same data type
- B
A structure with labeled rows and columns that can contain different data types
- C
A single Boolean value that represents an entire table
- D
A collection that can store only one observation
A database stores a postal code as an integer. Based on what the value means, how should the postal code be classified?
- A
A categorical label
- B
A continuous quantitative measurement
- C
A ratio-scale quantity
- D
An ordinal measurement with equal intervals
A table has one row for each student-course result. True or false: Counting its rows gives the number of unique students.
- A
True
- B
False
A table has columns for student ID, course, and score, with one row for each student's result in a course. What is the unit of observation?
- A
A student
- B
A course
- C
A student-course result
- D
A distinct student ID across the whole table
A survey records satisfaction as low, medium, or high. What measurement scale applies when the categories are ordered but equal spacing is not established?
Select all variables for which a statement such as “twice as much” is meaningful based on the measurement scale.
- A
Mass
- B
Temperature in °C
- C
Satisfaction rank
- D
Duration
A report compares temperatures of 10°C and 20°C. Which interpretation is justified by the measurement scale?
- A
20°C is twice as warm as 10°C because 20 is twice 10.
- B
Neither differences nor ratios are meaningful for Celsius temperatures.
- C
The difference between 20°C and 10°C is meaningful, but 20°C is not twice as warm as 10°C.
- D
Celsius temperatures have a meaningful zero, so ratios are meaningful.
A table places repeated measurements on separate rows in format, and in separate columns in format.
Select all statements that correctly describe useful comparisons or summaries for the stated measurement scales.
- A
For nominal categories, counts and proportions are useful summaries.
- B
For nominal categories, calculating differences between category labels is meaningful.
- C
For interval values, differences are meaningful even though zero is not an absolute absence.
- D
For interval values, ratios such as “twice as much” are always meaningful.
A table contains student IDs 101, 101, and 102 in three rows. How many distinct students are represented?
Two tables are joined, but an identifier needed to match their records is omitted. Explain one way this can affect the resulting data and one practice that helps prevent the problem.
A system must preserve the leading zero in the code 02139. Which representation is appropriate?
- A
Store it as the string "02139".
- B
Store it as the integer 2139.
- C
Store it as the floating-point number 2139.0.
- D
Store it as the Boolean value True.
A dataset stores postal codes as integers. Which conclusion about how to analyze this variable is justified?
- A
It is a quantitative measurement because it is stored as an integer.
- B
It is a categorical label, so arithmetic such as averaging it is not meaningful.
- C
It is a continuous variable because postal codes can have many values.
- D
It is an ordinal variable because larger codes indicate a higher rank.
A survey records satisfaction as low, medium, or high. Which measurement scale best describes this variable?
- A
Nominal, because the categories have no order.
- B
Ordinal, because the categories are ordered but their spacing is not established as equal.
- C
Interval, because the categories have equal spacing and no absolute zero.
- D
Ratio, because the categories have a meaningful zero.
A health dataset records the number of clinic visits and each patient's height. Which classification is appropriate?
- A
Visits are continuous; height is discrete.
- B
Both are continuous because both can be recorded numerically.
- C
Visits are discrete; height is continuous.
- D
Both are discrete because observations are recorded individually.
True or false: A pandas DataFrame can contain a text-label column and a numeric column.
- A
True
- B
False
Elapsed duration has equal intervals and a meaningful zero. What measurement scale describes duration?