I'm not able to start solving this problem, can you help me?
N clients come in a shop in 1 hour. N ~ Poisson(q), but q~U(0,2).
How can I calculate the distribution of clients coming in the shop in an hour? And expection value and variance?
Thank you for help
$N|q\sim Poisson(q)$ so $E(N|q)=V(N|q)=q$ and $E(N^2|q)=q^2+q$
$E(N)=E(E(N|q))=E(q)=1$
from https://en.wikipedia.org/wiki/Law_of_total_expectation
$E(N^2)=E(E(N^2|q))=E(q+q^2)=1+V(q)+E(q)^2=1+4/12+1$
with the use of $V(X)=E(X^2)-E(X)^2$.
For the distribution of N: $f(N)=\int_0^2 f(N,q) dq =\int_0^2 f(N|q) f(q)dq$
$f(q)=1/2$ and $f(N|q)=q^Ne^{-q}/N!$