Definition of

Random variable

Dice

The function that maps possible events to real numbers is called a random variable.

A variable is a symbol that acts in the functions, formulas, algorithms and propositions of mathematics and statistics. Depending on their characteristics, the variables are classified differently.

A random (or stochastic ) variable is the function that assigns possible events to real numbers (figures), whose values ​​are measured in random experiments. These possible values ​​represent the results of experiments that have not yet been carried out or uncertain quantities.

It should be noted that randomized experiments are those that, carried out under the same conditions, can offer different results . Tossing a coin into the air to see if it comes up heads or tails is such an experiment.

About random variables

The random variable, in short, allows us to offer a description of the probability that certain values ​​are adopted. It is not known precisely what value the variable will adopt when it is determined or measured, but it is possible to know how the probabilities linked to the possible values ​​are distributed. Chance affects this distribution.

A function that gives each of the events defined on a random variable a value that denotes how likely it is that the event it represents will take place is known as a probability distribution , within the scope of probability and statistics . . To define it, we start from the set of all events, each of them being the range of the variable in question.

Random

Random variables are defined from a probability space.

The probability space

From a formal theoretical perspective, random variables are functions that are defined on a probability space (also called probabilistic space ), a concept in mathematics that models a given random experiment. Typically, a probability space has the following three components:

* firstly, a set called sample space , which brings together all the possible results of the experiment, which are known as elementary events ;

* the group of all random events. The pair composed of this component and the previous one is called the measurement space ;

* finally, a probability measure that determines the probability that each event will take place and that serves to verify that the Kolmogorov axioms are fulfilled.

Kolmogorov's axioms are summarized below: the certainty that the sample space occurs in the randomized experiment; To determine the probability of an event, a number between 0 and 1 is assigned; If we are faced with mutually exclusive events, then the sum of their probabilities is equal to the probability that one of them occurs. Mutually exclusive events or events, on the other hand, are those that cannot take place contemporaneously.

Different types of random variables

Discrete random variables are those whose range is made up of a finite number of elements or whose elements can be enumerated sequentially. Suppose a person rolls a die three times: the results are discrete random variables, since values ​​from 1 to 6 can be obtained.

On the other hand, the continuous random variable is linked to a range or range that covers, in theory , all real numbers, although only a certain number of values ​​are accessible (such as the height of a group of people).

This concept is also used in programming, where there is a clear limitation to the range of possible elements, since this depends on memory, which is finite. The greater the space available for the probability distribution and the complexity that the events may have, the more realistic the simulation will be. One of the areas in which the random variable can be useful is the animation of characters in real time, where a three-dimensional model is intended to react and relate to the environment in a realistic way while being controlled by a human being.