There are two balls may be selected as BR,RB,BR,BB,where R represents red ball and B represents black ball.
Variable X has the value 0,1,2 i.e.,there may be no black ball,may be one black ball or both the balls are black.
Since,X is a number whose values are defined on the outcomes of a random experiment,therefore,X is a random variable.
A random variable is a variable whose value is unknown or a function that assigns values to each of an experiment's results. Random variables are often deputed by letters and can be classified as discrete, which are variables that have particular values, or continuous, which are variables that can have any values within a continuous range.
Random variables are often used in econometric or regression analysis to ascertain statistical relationships among one another.
There are two types of random variables, such as: