i was solving an expected value problem but i got stuck in finding recursive relation?
recursive equation is... $$ E[n-i]=1+\frac{i}{n}E[n-i-1]+\frac{n-i}{n}E[n-i+1] $$
- $E[0]=0$
- $E[1]=1$
- $E[2]=4$
I know it a non homogeneous eqation so there will be perticular solution and general solution. i will appreciate if somebody help me out.