I need to compute the expected value $E(X)$ of the expected value of $X$ for this game:
Consider a game of chance consisting of a single trial with exactly two outcomes, which from a player's perspective we will call win and lose. To play the game, a player must wager an amount, which we will denote by $a$. If the player loses the game, then they lose their wager. If the player wins the game, then they keep their wager and they win 1.00. Denote the probability of winning by $p$, where $0<p<1$. Let the random variable $X$ denote the amount won by the player
Given $p(win)=p$, I think $E(X)= 1*p + (-a)*(1-p)$ so $E(X)=ap-a+p$
Is this the solution? The exercise goes further asking for instance for what values of $a$ the game would be fair, namely $E(X)=0$, but because my solution doesn't lead me to a unique solution for $a$ I thought I did something wrong.