Q2. How do you calculate the expected value of a random variable?
A2. The expected value (mean) of a random variable is calculated as the sum of each possible value multiplied by its probability.