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.
- 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.
- Interval: A quantitative variable can be in interval form. For example, if marks of students are recorded, marks of few students will fall into interval 10 to 20, few marks will fall into interval 20 to 30 and so on.
- Ordinal: An ordinal variable consists of set of values which are assigned to particular ordinal scale. For example, performance of employees of a firm can be categorized as poor, good, very good, excellent, outstanding and numbers 1, 2, 3, 4, 5 are assigned to them.
- Ratio: This is a type of quantitative data which is in the form of ratio. This is a kind of comparison of all the values with a particular value. For example, molecular weights of various elements. If we take molecular weight of one selected element (say A), then take the ratio of other elements with it, like: molecular weight of B is twice as much as molecular weight of A and molecular weight of C is 1.5 times of molecular weight of A.
- Nominal: Nominal measurement is the easiest type of the measurement of data. In this case, we just have to identify the category. Nominal data is also known as qualitative data, categorical data or attribute. It reflects the qualitative differences.
Qualitative data is also called categorical data.
On the other hand, discrete variable cannot define any value. It can only take a finite number of data. It cannot assign a rational number or a number with decimal point. The outcomes of a coin can either be head or tail. So, this is a discrete variable. The shoe size of a group of people is a discrete variable, because shoe size can be few selected numbers. It cannot take any value. Therefore, discrete data has restrictions of having only finite values.