Well, Nice question. I believe, IIT just provides a platform which gives an opportunity to apply for some famous companies and rest depend on the candidates. If a candidate has enough potential or ability to crack all the interviews. then, he can easily get placed in some good companies.
But its true, CSE department always has been the highest pay package earning branch among all departments in IITs. I am not sure about new IITs like Patna, Mandi etc. But if u belong to a GOOD IITs like Bombay, Delhi, Kanpur, Madras etc, Definitely you will get placed in some good companies. Yes, Trust me on my words even if you are an average student. you just have some patience and Never Give up attitude.
The Average package also depends upon all the students who are studying there. But Average package would lie in between 15 to 20 LPA. The Highest package might be 40-50 LPA or above. Remember,