% ECE 111 Lecture #1 % Best of 5 series % Team A has a 55% chance of winning a given game tic WINS = 0; for i=1:1e5 A = 0; for j=1:5 if(rand < 0.55) A = A + 1; end end if(A >= 3) WINS = WINS + 1; end end WINS/1e5 toc