Types of Variables

  • Classifying Types of Variables
  • Software Activity
  • Why Does the Type of Variable Matter?

CO-4: Distinguish among different measurement scales, choose the appropriate descriptive and inferential statistical methods based on these distinctions, and interpret the results.

CO-7: Use statistical software to analyze public health data.

Classifying Types of Variables

LO iv.one: Determine the blazon (categorical or quantitative) of a given variable.

LO 4.2: Classify a given variable every bit nominal, ordinal, discrete, or continuous.

Variables can exist broadly classified into 1 of two types:

  • Quantitative
  • Categorical

Below nosotros define these two main types of variables and provide farther sub-classifications for each type.

Categorical variables take category or label values, and place an private into i of several groups.

Categorical variables are often farther classified equally either:

  • Nominal,  when there is no natural ordering amidst the categories .

Common examples would be gender, eye colour, or ethnicity.

  • Ordinal , when there is a natural lodge amidst the categories , such equally, ranking scales or letter grades.

However, ordinal variables are yet categorical and do non provide precise measurements.

Differences are non precisely meaningful, for example, if one student scores an A and another a B on an assignment, nosotros cannot say precisely the difference in their scores, only that an A is larger than a B.

Quantitative variables accept numerical values, and represent some kind of measurement.

Quantitative variables are often further classified as either:

  • Discrete , when the variable takes on a countable number of values.

Nigh frequently these variables indeed represent some kind of count such as the number of prescriptions an individual takes daily.

  • Continuous , when the variable can take on any value in some range of values .

Our precision in measuring these variables is often limited by our instruments.

Units should exist provided.

Common examples would be height (inches), weight (pounds), or time to recovery (days).

One special variable type occurs when a variable has just ii possible values.

A variable is said to be BinaryorDichotomous, when there are only two possible levels.

These variables can usually exist phrased in a "yes/no" question. Whether nor non someone is a smoker is an example of a binary variable.

Currently we are primarily concerned with classifying variables equally either categorical or quantitative.

Sometimes, however, we will need to consider further and sub-allocate these variables as defined above.

These concepts will be discussed and reviewed equally needed merely here is a quick practise on sub-classifying categorical and quantitative variables.

EXAMPLE: Medical Records

Let's revisit the dataset showing medical records for a sample of patients

A table in which the rows represent patients and each column represents a variable. For example, the third row is for Patient #3, and each cell in the row is in a particular column. The first column is Gender, and Patient #3's gender is female, so there is a 'F' in the first column of the third row.

In our instance of medical records, there are several variables of each type:

  • Historic period, Weight, and Height are quantitative variables.
  • Race, Gender, and Smoking are categorical variables.

 Comments:

  • Discover that the values of the categorical variable Smoking have been coded equally the numbers 0 or 1.

It is quite common to lawmaking the values of a categorical variable every bit numbers, but yous should recollect that these are simply codes.

They take no arithmetics meaning (i.e., information technology does not brand sense to add, subtract, multiply, divide, or compare the magnitude of such values).

Unremarkably, if such a coding is used, all categorical variables will be coded and we will tend to do this blazon of coding for datasets in this course.

  • Sometimes, quantitative variables are divided into groups for analysis, in such a situation, although the original variable was quantitative, the variable analyzed is categorical.

A common case is to provide information about an individual'due south Body Mass Index past stating whether the individual is underweight, normal, overweight, or obese.

This categorized BMI is an case of an ordinal categorical variable.

  • Chiselled variables are sometimes called qualitative variables, but in this course we'll utilise the term "categorical."

Software Activity

LO 7.1: View a dataset in EXCEL, text editor, or other spreadsheet or statistical software.

LO four.1: Determine the type (categorical or quantitative) of a given variable.

Why Does the Type of Variable Matter?

The types of variables you lot are analyzing directly relate to the available descriptive and inferential statistical methods.

It is of import to:

  • assess how you will measure the consequence of interest and
  • know how this determines the statistical methods you tin utilise.

As we go on in this form, we will continually emphasize the types of variables that are appropriate for each method we hash out.

For example:

EXAMPLE:

To compare the number of polio cases in the two treatment arms of the Salk Polio vaccine trial, you could utilize

  • Fisher's Exact Test
  • Chi-Square Examination

To compare blood pressures in a clinical trial evaluating two blood pressure-lowering medications, yous could utilize

  • Ii-sample t-Test
  • Wilcoxon Rank-Sum Test