Task: A basketball player shoots two freethrows. The probability for hitting the first short is $0.8$. If he makes the first short, he becomes confident and hits the second one with probability $0.9$. If he in turn misses the first shot, he becomes insecure and only hits the second shot with probability $0.5$. Let $X$ denote the number of successful shots.
I need to determine $E[X]$ and $Var[X]$.
What I have done so far was to calculate all probabilities for $P(X=0), P(X=1), P(X=2)$ using a tree.
Can you give me an ansatz on calculating $E[X]$ and $E[X^2]$?