Many random number generators allow users to specify the range of the random numbers to be produced. suppose that you specify that the random number y can take any value between 0 and 2. then the density curve of the outcomes has constant height between 0 and 2, and height 0 elsewhere. (a) is the random variable y discrete or continuous? why?
a) This is a continuous random variable because the set of possible values is an interval.
b) Height = 0.5
c) P(Y≤1) = 0.5
a) If the density curve of the outcomes has a constant height, we have a uniform distribution for values between 0 and 2 (outside this range, the density function has a value of 0).
This function is continous and has a value for each real number. The set of possible values has a is an interval between 0 and 2, all with equal probability (the ones that are otuside this interval have 0 probability, so they are not possible values).
b) The height is calculated so that the total area under the density curve has to be equal to 1.
Then, we have to calculate the integral between 0 and 2 of the density function:
The height is H=0.5
c) The probability can be calculated by integrating the density function (which is equal to the area under the curve) between 0 and 1, or using the graph.
With the graph, we see that the area is equal to the height (0.5) by the width of the interval (1), so the total area is 0.5 x 1 = 0.5.
The probability P(Y≤1) is equal to 0.5.