% Program to plot a family of curves for the probability of at least
% one success in a set of N trials, where p is the probability of success
% on each trial, and the trials are independent.
%
% ELEC 471, R. Kozick

Nmax = 10;
p = 0:.01:1;

for N = 1:Nmax

  PrSuccess(N, :) = 1 - (1-p).^N; 

end

figure(1)
plot(p, PrSuccess);
xlabel('PROBABILITY OF SUCCESS PER TRIAL, p')
ylabel('PROBABILITY')
title('PROBABILITY OF AT LEAST ONE SUCCESS IN N TRIALS, N = 1, ..., 10')
