توضیح 1
Binary variables have two categories, such as Yes and No.
Loading
درس 2 از 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.
توضیح 1
Binary variables have two categories, such as Yes and No.
توضیح 2
A count such as modules completed is discrete.
توضیح 3
A measured amount such as study hours can be continuous.
فعالیت تعاملی
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 correctارتباط با R
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.
دستیار
Quiz me on categorical, binary, discrete, and continuous variables from this lesson without revealing answers.