n : number of trials (5)
k : number of successes (4)
p : probability of success on each trial (1/2)
q : probability of failure on each trial (1 - p = 1/2)
P.S. You can also think that there are 32 outcomes of the 5 tosses (2^5 = 32) and of these 5 of them (HHHHT, HHHTH, HHTHH, HTHHH, THHHH) will have an outcome with exactly 4 heads (and 1 tail).