Explanation 1
Binary variables have two categories, such as Yes and No.
Loading
Lesson 2 of 12
Classify variables by the kind of information they contain and avoid treating numeric labels as measured quantities.
Theory
Categorical variables place observations into groups. Numerical variables measure or count amounts. Discrete numerical variables are countable whole values; continuous variables are measured on a scale where decimals are meaningful. Coding a category with a number does not make it quantitative.
Explanation 1
Binary variables have two categories, such as Yes and No.
Explanation 2
A count such as modules completed is discrete.
Explanation 3
A measured amount such as study hours can be continuous.
Interactive Mission
Labels groups.
Measured amount with decimals possible.
Counted whole modules.
Two categories, not arithmetic.
Numeric codes can still be categorical: 1 = first year and 2 = second year are labels unless arithmetic has meaning.
0/4 correctR connection
Use is.numeric(), is.character(), as.factor(), table(), and summary() to match summaries to variable types.
Live R Lab
Use R functions to inspect numeric, character, factor, binary, discrete, and continuous-style variables.
Ready to run
Numeric codes are not always numeric data
A program code of 1, 2, or 3 identifies groups. Averaging those codes would not answer a meaningful question.
Assistant
Quiz me on categorical, binary, discrete, and continuous variables from this lesson without revealing answers.
Exit check
Use the hint button if you need coaching before answering. Explanations appear after you check or submit.
Checkpoint
Question 1 of 2. Answered 0/2. Passing score: 70%.