Classifying variables worksheet with answer key
8 problems on classifying variables, ready to print for class or homework. The answer key prints on its own page, so hand out everything before it.
Name: ______________________________ Date: ______________ Period: ______
Problem 1
Classify each variable as categorical or quantitative. For every quantitative variable, also say whether it is discrete or continuous.
(a) The zip code of a customer's home address. (b) The number of siblings a student has. (c) A patient's height in centimeters. (d) A donor's blood type. (e) The time in seconds a runner takes to finish 400 meters. (f) The number of items in a shopper's basket at checkout. (g) A student's letter grade in a course (A, B, C, D, or F). (h) The rainfall recorded at a weather station in one day, in millimeters.
Problem 2
A youth soccer league records two numbers for each of the six players on a team: the jersey number and the goals scored this season.
| Player | 1 | 2 | 3 | 4 | 5 | 6 |
|---|---|---|---|---|---|---|
| Jersey number | 4 | 7 | 9 | 12 | 18 | 22 |
| Goals scored | 0 | 1 | 1 | 2 | 3 | 5 |
(a) Classify each of the two variables. (b) Compute the mean of each row and say which one is a legitimate summary. (c) Over the winter the league reissues jerseys as 1 through 6, with no change to the roster or to anyone's goals. Recompute both means. (d) What does the comparison in (c) prove?
Problem 3
All six variables below are quantitative. Label each one discrete or continuous, and give the test that produced your label.
(a) A person's age, recorded in whole years on a form. (b) The proportion of 20 free throws a player makes. (c) The volume of juice in a carton, in milliliters. (d) The number of defective bulbs in a box of 24. (e) The price of a sandwich, in dollars and cents. (f) The length of a leaf, recorded to the nearest whole centimeter.
Problem 4
A cafe asks 40 customers to rate service on a 5-point scale, where 1 is poor and 5 is excellent, and compares this year with last year. Both samples have 40 customers.
| Rating | 1 | 2 | 3 | 4 | 5 |
|---|---|---|---|---|---|
| This year | 6 | 4 | 5 | 10 | 15 |
| Last year | 2 | 8 | 12 | 11 | 7 |
(a) Classify the rating variable. (b) The manager treats the ratings as the numbers 1 through 5 and reports that mean satisfaction rose from 3.325 to 3.60, "an improvement of 0.275 points." Verify the arithmetic. (c) Recompute both means using the codes 1, 2, 3, 4, 10, which put the categories in the same order, and say what happens to the size of the improvement. (d) Give two summaries that do not depend on the coding, and compute them for both years. (e) What should the manager report?
Problem 5
A veterinary clinic pulls its records for last year. For each of the 800 dogs seen it has the breed, the weight in kilograms at that dog's first visit, the number of visits during the year, and whether the dog was vaccinated for rabies (yes or no). The clinic's newsletter says: "Our dogs average 18.4 kg, and 584 of them, or 73%, are vaccinated."
(a) Name the observational unit and give . (b) Classify all four variables. (c) The newsletter's 73% is not a variable. Say what it is and which variable it came from. (d) Describe exactly what the 18.4 kg figure measured, and on whom. (e) A student says the number of visits is continuous "because a dog could come in any number of times." Correct the reasoning.
Problem 6
A school nurse studies screen time. The same 300 students answer two questions on one form. Question A asks for the number of minutes they spent on a screen yesterday. Question B asks "did you spend more than 2 hours on a screen yesterday? yes or no." In the results, 189 students reported more than 120 minutes on question A, while 216 students answered yes to question B.
(a) Classify the variable each question produces. (b) Give the summary and the graph that fit each. (c) Can the answers to question A be converted into the answers to question B? Can it be done the other way? (d) Both questions were answered by the same 300 students, so what does the difference between 189 and 216 tell you?
Problem 7
A class of 120 students reports a favorite lunch and a commute time. The lunch counts are pizza 48, salad 24, sandwich 36, and other 12, and the mean commute is 23.4 minutes. Four students each write one sentence about these data. Evaluate each sentence, correcting it where it is wrong.
(i) "The mean favorite lunch is pizza." (ii) "The counts 48, 24, 36, and 12 are numbers, so favorite lunch is a quantitative variable." (iii) "A histogram of favorite lunch shows that pizza is the most common." (iv) "The mean commute is 23.4 minutes, which is a decimal, so commute time is continuous."
Problem 8
A city parks department studies its 5 public pools. On one Saturday, staff at every pool record, for each swimmer who enters: age in whole years, the size of the party the swimmer arrived with, membership status (member or day pass), which pool was entered, and the number of minutes the swimmer stayed. In all, 1,800 swimmers are recorded. The department reports a mean stay of 74.6 minutes, a mean party size of 2.3 people, and that 1,116 swimmers, or 62%, held day passes.
(a) Name the observational unit and give . (b) Classify all five variables. (c) Match each of the three reported numbers to its variable and name the kind of summary it is. (d) A staffer says "pool is quantitative, because we numbered the pools 1 through 5 and the mean pool number is 3.1." Evaluate that. (e) Is the 62% a parameter or a statistic?
From statslearn.org/worksheets/variables-and-data-types-worksheet. Free to print and copy for classroom use.
Classifying variables: answer key
Categorical: (a) zip code, (d) blood type, (g) letter grade. Quantitative and discrete: (b) number of siblings, (f) number of items in a basket. Quantitative and continuous: (c) height, (e) 400 meter time, (h) daily rainfall.
(a) Jersey number is categorical; goals scored is quantitative and discrete. (b) Mean jersey number , mean goals ; only the mean goals summarizes anything. (c) After renumbering, mean jersey number and mean goals still 2. (d) Relabeling the categories moved the jersey mean by 8.5 without changing any player, which is why the jersey mean is not a summary of the data.
Discrete: (b) the free throw proportion, which can only be one of the 21 values , and (d) the defect count, a finite list 0 through 24. Continuous: (a) age, (c) volume, (f) leaf length, since each measures a quantity that fills an interval and is merely recorded coarsely. (e) Price is strictly discrete in whole cents and is usually modeled as continuous; say which convention you are using.
(a) Categorical with ordered categories. (b) Correct: against , a gap of 0.275. (c) Under the order-preserving codes 1, 2, 3, 4, 10 the means are and , an improvement of 1.275, so the size of the gain is a property of the coding. (d) Median category 4 this year against 3 last year, and the share rating 4 or 5 rose from to . (e) Report the median category and the 4-or-5 share, and state the equal-spacing assumption if a mean of the codes is reported at all.
(a) The unit is one dog seen last year, . (b) Breed categorical; weight quantitative and continuous; number of visits quantitative and discrete; vaccination status categorical. (c) It is a summary statistic, , the proportion in the yes category of the vaccination variable, not a variable itself. (d) It is the mean of each dog's weight at its first visit of the year, for the 800 dogs this clinic saw. (e) Having endlessly many possible values does not make a variable continuous; visits are listable as 1, 2, 3, and onward with nothing in between, so the variable is discrete.
(a) Question A produces a quantitative continuous variable; question B produces a categorical variable with two categories. (b) A: center and spread, with a dotplot, stemplot, histogram, or boxplot. B: counts and a proportion, with a bar graph or pie chart. (c) A converts to B by cutting at 120 minutes, giving ; B cannot be converted back, since a yes hides the actual number of minutes. (d) With the same 300 students answering both, the gap of students, or 9%, is a measurement discrepancy from the two wordings, not sampling variability, and it does not say which figure is right.
(i) Wrong: a categorical variable has no mean; pizza is the mode, at . (ii) Wrong: 48, 24, 36, and 12 are frequencies, and the type belongs to what is counted, so favorite lunch is categorical. (iii) Wrong graph: use a bar graph or pie chart, since the four lunches are labels rather than intervals on a number line. (iv) Right conclusion, wrong reason: time is continuous because it fills an interval, and a decimal mean proves nothing, since 0, 1, 1, 2, 3 siblings averages and siblings is discrete.
(a) The unit is one swimmer entry on that Saturday, . (b) Age quantitative and continuous; party size quantitative and discrete; membership status categorical; pool entered categorical; minutes stayed quantitative and continuous. (c) 74.6 minutes is a mean of the minutes column, 2.3 people is a mean of the party size column, and 62% is a proportion from the membership column, . (d) Wrong: numbering the pools makes digits into labels, a mean pool number of 3.1 names no pool and changes under renumbering, so pool entered is categorical. (e) It depends on the population named: a parameter for the 1,800 swimmers of that Saturday, who were all measured, and a statistic if the target is all swimmers across the season, where one convenience-chosen Saturday may overstate the day pass share.
Every step is worked at statslearn.org/practice/variables-and-data-types-practice. Free to print and copy for classroom use.
The key gives final answers only. The full worked solution for each problem is on the matching practice set, and every other sheet is on the worksheets page.
More worksheets from this unit
- Identifying bias worksheet with answer key
- Boxplot and five-number summary worksheet with answer key
- Categorical data worksheet with answer key
- Comparing two distributions worksheet with answer key
- Describing and comparing distributions worksheet
- Experimental design worksheet with answer key
- Investigative question worksheet with answer key
- Dotplot, stemplot, and histogram worksheet with answer key
- Quartiles, IQR, and outliers worksheet with answer key
- Sampling methods worksheet with answer key
- Scope of inference worksheet with answer key
- Standard deviation and variance worksheet with answer key
- Choosing mean vs median and SD vs IQR worksheet with answers