Consider five consecutive integers, for example: 1, 2, 3, 4, 5.
The random variable X represents the absolute difference between any two randomly chosen integers from this set.
Possible absolute differences between any two chosen numbers are:
All possible differences and their probabilities are determined by counting occurrences.
After computing the probability distribution of X, the expected value (mean) is found to be:
E(X) = 2
Using the variance formula:
Var(X) = E(XΒ²) - (E(X))Β²
After calculations, the variance of X is determined to be:
Var(X) = 1
| Year | Price of Apple | Quantity of Apple | Price of Banana | Quantity of Banana |
| 2010 | 1 | 100 | 2 | 50 |
| 2011 | 1 | 200 | 2 | 100 |
| 2012 | 2 | 200 | 4 | 100 |
, 0, π₯ β₯ 0 otherwise , 