Let $(a_{i})_{i\in\{1,2,...,m\}}$ be a set of random variables. Each variable is equal to $1$ with probability $p$ or to $0$ with probability $q$. Of course $p+q=1$
Find $E[\max_{i\in \{1,2,...,m\}}(a_{i})]$ in terms of $E[a_{i}]$
Is it true generally, that for any nonegative random variables $X, Y$ we have $E[\max\{X,Y\}]=max\{E[X], E[Y]\}$? Regards
EDIT:
What if $X, Y$ are just independent random variables. How to express $E[\max\{X,Y\}]$ with $E[X]$, $E[Y]$? I know that $P(\max\{X, Y\}<y)=P(X<y)P(Y<y)$ How to use it?
These are all Bernoulli random variables, whose expectation equals their probability of being $1$.
The maximum is $0$ iff all the $a_i$ come out $0$, so the probability of the maximum being $0$ is $q^m$; it is $1$ otherwise. Then the probability/expectation of the maximum is $1-q^m=1-(1-p)^m$, and since $E(a_i)=p$ we have $E(\max)=1-(1-E(a_i))^m$.
This shows that your proposed formula for the expectation of the maximum is invalid.