Question: 1. A quantity x is distributed with density function p(x) = 0.5(2 - x) for 0 ≤ x ≤ 2 and p(x) = 0 otherwise. Find the mean and median of x.
2. A quantity x has cumulative distribution function P(x) = x - x2/4 for 0 ≤ x ≤ 2 and P(x) = 0 for x < 0 and P(x) = 1 for x > 2. Find the mean and median of x.