Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- x=2; % Num of pollutant
- n=18; % Num of samples
- p=0.1; % P(sample contains pollutant)
- Px1 = binopdf(x,n,p); % P(exactly 2 samples contain pollutant)
- plot(0:18,binopdf(0:18,n,p));
- title("BINOMIAL PROBABILITY DISTRIBUTION");
- xlabel('Number of Pollutants --->');
- ylabel('Probability --->')
- Px2 = binocdf(3,n,p);
- r = 1-Px2; % P(at least 4 samples contain pollutant)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement