A continuous random variable X is a random variable whose sample space 𝕏 is an interval or a collection of intervals. In general 𝕏 may coincide with the set of real numbers ℝ or some subset of it. Examples of continuous random variables:
- the pressure of a tire of a car: it can be any positive real number;
- the current temperature in the city of Madrid: it can be any real number;
- the height of the students of Simulation and Modeling to understand change;
Whilst for discrete random variables we considered summations over the elements of 𝕏, for continuous random variables we need to consider integrals over the appropriate intervals.
This is because a discrete variable can assume a countable number of values within a set (which can be finite or infinite), but not all of them. For example, the number of children in a family, the number of animals in a farm, the number of employees in a company…
Whereas, a continuous variable is one that can assume an uncountable number of values within an interval (infinite). For example, the volume of water in a swimming pool, the weight or height of a person, the speed at which a train travels…
A variable that can take any of the values between two given numbers is a continuous variable, otherwise it is a discrete variable.
In the case of continuous variables, we measure the probability that X takes a value within an interval by integrating to get the area under the curve.