A **discrete variable** is that numerical variable that can only assume certain values. Their distinctive feature is that they are countable, for example the number of children and cars in a family, the petals of a flower, the money in an account, and the pages of a book.

The goal of defining variables is to obtain information about a system whose characteristics can change. And since the number of variables is enormous, establishing what type of variables you are dealing with allows you to extract this information in an optimal way.

Let’s analyze a typical example of a discrete variable, among those already mentioned: the number of children in a family. It is a variable that can assume values such as 0, 1, 2, 3, and so on.

Note that between each of these values, for example between 1 and 2, or between 2 and 3, the variable admits none, since the number of children is a natural number. You cannot have 2.25 children, therefore between the value 2 and the value 3, the variable called «number of children» does not assume any value.

[toc]

**Examples of discrete variables**

The list of discrete variables is quite long, both in different branches of Science and in everyday life. Here are a few examples that illustrate this fact:

-Number of goals scored by a certain player throughout the season.

-Money saved in 1 cent coins.

-The energy levels in an atom.

-How many customers are served in a pharmacy.

-How many copper wires does an electric cable have?

—The rings in a tree.

-Number of students in a classroom.

-Number of cows on a farm.

-How many planets does a solar system have?

-The number of light bulbs produced by a factory during a given hour.

How many pets does a family own?

**Discrete variables and continuous variables**

The concept of discrete variables becomes much clearer when compared to that of *continuous variables*, which are the opposite since they can assume countless values. An example of a continuous variable is the height of the students in a Physics class. Or your weight.

Suppose that in a college the shortest student measures 1.6345 m and the tallest 1.8567 m. Surely between the heights of all the other students, values will be obtained that fall anywhere in this interval. And since there is no restriction in this regard, the variable «height» is considered continuous in said interval.

Given the nature of discrete variables, one might think that they can only take their values in the set of natural numbers or at most in the set of integers.

Many discrete variables frequently take integer values, hence the belief that decimal values are not allowed. However, there are discrete variables whose value is decimal, the important thing is that the values assumed by the variable are countable or countable (see solved exercise 2)

Both discrete and continuous variables belong to the category of *quantitative variables*which are necessarily expressed by numerical values with which to perform various arithmetic operations.

**Solved exercises of discrete variables**

**-Exercise solved 1**

Two unloaded dice are thrown and the values obtained on the upper faces are added. Is the result a discrete variable? Justify the answer.

**Solution**

When two dice are added, the following results are possible:

*2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12*

In total there are 11 possible outcomes. Since these can only take the specified values and no others, the sum of the roll of two dice is a discrete variable.

**-Exercise solved 2**

For quality control in a screw factory, an inspection is carried out and 100 screws are randomly selected from a batch. variable is defined *F* as the fraction of defective bolts found, being *F* the values it is taking *F*. Is it a discrete or continuous variable? Justify the answer.

**Solution**

To answer it is necessary to examine all the possible values that *F* may have, let’s see what they are:

*–*No defective screw: *f1* = 0 /100 = 0

*–*Out of 100 screws, 1 defective was found: *f2* = 1 /100 = 0.01

*–*2 defective screws were found:* f3 *= 2/ 100 = 0.02

*–*There were 3 defective screws: *f4 *= 3 / 100 = 0.03

.

.

.

And so it continues until finally finding the last possibility:

– All screws were defective: *f101 *= 100 /100 = 1

In total there are 101 possible outcomes. Since they are countable, it is concluded that the variable *F* so defined is discrete. And it also has decimal values between 0 and 1.

**Discrete Random Variables and Distributions of** **probability**

If, in addition to being discrete, the values that the variable takes are associated with a certain probability of occurrence, then it is a *discrete random variable*.

In statistics it is very important to distinguish whether the variable is discrete or continuous, since the probabilistic models applicable to one and the other are different.

A discrete random variable is completely specified when the values that it can assume are known, and the probability that each of them has.

**Examples of Discrete Random Variables**

The roll of an unloaded die is a very illustrative example of a discrete random variable:

Possible launch results: *X = **{1, 2, 3, 4, 5, 6**}*

Probabilities of each are: *p(X= xi) = **{1/6, 1/6, 1/6, 1/6, 1/6, 1/6**}*

The variables of the solved exercises 1 and 2 are discrete random variables. In the case of the sum of the two dice, it is possible to calculate the probability of each of the numbered events. Defective screws require more information.

**probability distributions**

A probability distribution is any:

-Board

-Expression

-Formula

-Graph

That shows the values that the random variable takes (either discrete or continuous) and its respective probability. In any case, it must be fulfilled that:

*Σpi = 1*

Where pi is the probability that the i-th event occurs and is always greater than or equal to 0. Well, the sum of the probabilities of all the events must be equal to 1. In the case of rolling the dice, it can be added all values in the set *p(X= xi)* and easily verify that this is true.

**References**

Dinov, Ivo. Discrete Random Variables and Probability Distributions. Retrieved from: stat.ucla.edu

Discrete and Continuous Random Variables. Retrieved from: ocw.mit.edu

Discrete Random Variables and Probability Distributions. Retrieved from: ****://homepage.divms.uiowa.edu

Mendenhall, W. 1978. Statistics for Management and Economics. Iberoamerican Publishing Group. 103-106.

Random Variables Problems and Probability Models. Retrieved from: ugr.es.