Summary Statistics - Variable Types Cheatsheet - Codecademy
Summary Statistics - Variable Types Cheatsheet - Codecademy
Variable Types
Quantitative Vs. Categorical Variables
Variables can be either quantitative or categorical. Quantitative variables
are amounts or counts; for example, age, number of children, and income
are all quantitative variables. Categorical variables represent groupings; for
example, type of pet, agreement rating, and brand of shoes are all
categorical variables.
Quantitative Variables
Quantitative variables are numeric in nature and can be either continuous
or discrete. Continuous variables contain measurements with decimal
precision, for example the height or weight of a person. Discrete variables
contain counts that must be whole integer values, such as the number of
members in a person’s family, or the number of goals a basketball team
scored in a game.
Categorical Variables
Categorical variables consist of data that can be grouped into distinct
categories, and are ordinal or nominal. Ordinal categorical variables which
are groups that contain an inherent ranking, such as ratings of plays or
responses to a survey question with a point scale e.g., on a scale from 1-7,
how happy are you right now? Nominal categorical variables are made of
categories without an inherent order, examples of nominal variables are
species of ants, or people’s hair color.