# One-Dimensional Continuous Random Variables

### From MM*Stat International

English |

Português |

Français |

Español |

Italiano |

Nederlands |

Definition:
A continuous random variable takes values on the real line from either a finite or infinite interval.

**Density function**

If a function has the following properties: The function is the density of the continuous random variable .

**Distribution function**

The distribution function can be obtained from the density:

The distribution function is equal to the area under the density for .

The density function, if it exists, can be computed as the first derivative of the distribution function: The waiting time (in minutes) of supermarket customers were collected, which resulted in the following frequency distribution:

Waiting time | Relative frequency | Cumulative relative frequency |
---|---|---|

8.0 - 8.5 | 0.002 | 0.002 |

8.5 - 9.0 | 0.004 | 0.006 |

9.0 - 9.5 | 0.009 | 0.015 |

9.5 - 10.0 | 0.013 | 0.028 |

10.0 - 10.5 | 0.020 | 0.048 |

10.5 - 11.0 | 0.043 | 0.091 |

11.0 - 11.5 | 0.094 | 0.185 |

11.5 - 12.0 | 0.135 | 0.320 |

12.0 - 12.5 | 0.169 | 0.489 |

12.5 - 13.0 | 0.158 | 0.647 |

13.0 - 13.5 | 0.139 | 0.786 |

13.5 - 14.0 | 0.078 | 0.864 |

14.0 - 14.5 | 0.065 | 0.929 |

14.5 - 15.0 | 0.030 | 0.959 |

15.0 - 15.5 | 0.010 | 0.969 |

15.5 - 16.0 | 0.014 | 0.983 |

16.0 - 16.5 | 0.006 | 0.989 |

16.5 - 17.0 | 0.004 | 0.993 |

16.0 - 17.5 | 0.003 | 0.996 |

17.5 - 18.0 | 0.004 | 1.000 |

The relative frequencies are used to construct the histogram and the frequency polygon. Fig. 1: Histogram of the waiting time

Fig. 2: Polygon of waiting time

The continuous random variable defines the groups (bins) with constant bin width min. The probabilities are approximated by relative frequencies (statistical definition of the probability).*Note:* In Fig. 1, the probabilities are given as the height of the boxes (and not the areas of the boxes). This implies that the sum of the areas of all of the boxes is equal to 0.5 (and not to 1). Similarly, the polygon on Fig. 2 cannot be a density because it does not satisfy the condition In order to obtain the density of , we need to compute the relative frequency density, which is obtained as the ratio of the relative frequencies and the widths of the corresponding groups.

Waiting time | Relative frequency density |
---|---|

8.0 - 8.5 | 0.004 |

8.5 - 9.0 | 0.008 |

9.0 - 9.5 | 0.018 |

9.5 - 10.0 | 0.026 |

10.0 - 10.5 | 0.040 |

10.5 - 11.0 | 0.086 |

11.0 - 11.5 | 0.188 |

11.5 - 12.0 | 0.270 |

12.0 - 12.5 | 0.338 |

12.5 - 13.0 | 0.316 |

13.0 - 13.5 | 0.278 |

13.5 - 14.0 | 0.156 |

14.0 - 14.5 | 0.130 |

14.5 - 15.0 | 0.060 |

15.0 - 15.5 | 0.020 |

15.5 - 16.0 | 0.028 |

16.0 - 16.5 | 0.012 |

16.5 - 17.0 | 0.008 |

16.0 - 17.5 | 0.006 |

17.5 - 18.0 | 0.008 |

Using this relative frequency density we obtain another histogram and smoothed density function. Fig. 3: Histogram of the waiting time using relative frequency density

Fig. 4: Density of

In Fig. 3 the probabilities of the groups are given by the area. This implies that the sum of these areas is equal to one. The density in Fig. 4 is (an approximate) density function of the (continuous) random variable . The corresponding distribution function is given in Fig. 5. Fig. 5: Distribution function of

Let us consider the function Is this function a density? We need to verify whether This means that is a density. In particular, it is the density of the triangular distribution (named after the shape of the density in the following figure).

The density function of a continuous random variable has the following properties:

- it cannot be negative
- the area under the curve is equal to one
- probability that the random variable lies between and is equal to the area between the density and the -axis on the interval

The density function computes the probability that a random variable lies in the interval .The probability that a continuous random variable will be equal to a specific real number is always equal to zero, since the area under a specific point is equal to zero: This implies as a corollary: the probability that continuous random variable falls into an interval does not depend on the closedness or openness of the interval.

The diagram illustrates that a histogram can be smoothed by increasing the number of observations. in the limit (i.e., as N the histogram can be approximated by a continuous function.The area between the points and corresponds to the probability that a random variable will fall in the interval . This probability can be computed using integrals. A distribution function, is the probability that the random variable is less than or equal to . Its properties follow:

- is nondecreasing, i.e., implies that
- is continuous

A distribution function cannot be decreasing because this would imply negative probabilities. In general, the distribution function is defined for real numbers. Limits on the sample space are necessary for the complete description of the distribution function.