when no of toss n=2 , then probability{HT,TH}={1/2.1/2 , 1/2 .1/2}
when n=3 , then probability {TTH,HHT}={1/2.1/2.1/2 , 1/2 .1/2.1/2}
when n=4 , then probability {TTTH,HHHT} ={1/2.1/2.1/2.1/2 , 1/2 .1/2.1/2.1/2}
So no of tosses = (1/2 .1/2).2 +(1/2 .1/2.1/2).2 +..........................
=2(1/4+1/8+1/16............)
=1/2+1/4+1/8........................
=(1/2)/(1-1/2)=1
So, avg. no of tosses =(total tosses)/2 =1/2