A variable which assumes different numerical values as a result of random experiments or random occurrences is known as a random variable.
The rainfall measured in centimeters on each day of the monsoon season, the maximum temperature of each day for a city, the number of passengers traveling by train from Delhi to Mumbai everyday and the number of patients seen by a doctor each day are all examples of random variables. That is, the values assumed by these variables on each day would be random and cannot be accurately predicted. The prices of a share in a perfectly efficient market are supposed to follow a random walk in which the current price is totally independent of the price changes occurring in the past. Hence, previous price patterns cannot be used to predict the future prices.
If the random variable can assume any value within a given range, it is called a continuous random variable. On the other hand, if the random variable can assume only a limited number of values, it is called a discrete random variable. In examples cited in the previous para, rainfall and maximum temperature are examples of continuous random variables as they can register a wide variety of values within a given range. For instance, where the temperature is being measured in Celsius, within a range of 29oC to 30oC, the temperature could assume such values as 29.4oC, 29.75oC, 29.87oC. The number of persons traveling from Delhi to Mumbai everyday and the number of patients seen by a doctor each day are examples of discrete random variables as these values could only be whole numbers. You cannot have 353.5 persons traveling or 18.7 patients visiting the doctor.