I have the following problem:
Suppose Z = $Y^X$ is a random variable, where Y is a generic random variable and X is a binary random variable which takes value 1 with probability p and value 2 with probability 1 - p.
I need to find the expected value E[Z], but I don't even understand from where to start!