% How many rolls until we get a double-six.

reps=27000
rec=NaN(1,reps); % where we'll keep the record
 
p=1/36 % prob of success on a given roll

for k=1:reps
    
n=1;
while rand>p
    n=n+1; % one more try
end

rec(k)=n;

end

plot(sort(rec))
length(find(rec<=25))/reps          