I dont understand why in col 2 the formula if(rand()<p,payout,0) is used. I am unable to understand what is being done there. Why should rand() be less than 0.4? why are we doing this? How is this an answer for (i)