Transforming and combining random variables