A variable is a value that subjects to vary. A variable is a characteristic that can assign different values. Age, salary, occupation, name, income tax etc. are few examples of variables. These can have values that are varying according to situation and from person to person.
Variables can either be discrete or continuous.
Discrete variables are the variables which cannot take any value. Discrete variables usually include counting numbers and finite number of values. They can include categories such as sex: male or female, eye color: black, brown, blue, green, grey or hazel. These variables can have finite number of categories. Discrete variables are not flexible enough to take any kind of value. On the other hand, continuous variable can assign any value.

Few examples of discrete variables are listed below:
  • In a shopping center, if the number of cars parked in parking lot are recorded every hour, then that will be a discrete variable. This is because, it can only be a whole number.
  • Record of skin colors of a group of people is a discrete variable, as it can have one of the categories: black, brown and white.
  • Marital status is a discrete variable. It can have only limited values like: married, unmarried, divorcee and widowed.
  • Population census records number of members in a family.
  • Grades assigned in an exam which can have only selected values such as: A, B, C, D etc.
  • Logical operator is also a discrete variable. It can have only true or false as its answer.