Advertisement
Guest User

ps1

a guest
Oct 22nd, 2014
126
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.27 KB | None | 0 0
  1. n=3;
  2. p=1/2;
  3. x=0:n;
  4. p1=pdf('bino',x,n,p)
  5. p1;
  6. subplot(1,3,1); plot(x,p1,'o');
  7. title('pdf');
  8.  
  9. subplot(1,3,2);bar(x,p1);
  10. title('PDF');
  11.  
  12. x1=0:0.01:n;
  13. fx=cdf('bino',x1,n,p);
  14. subplot(1,3,3);plot(x1,fx);
  15. title('CDF');
  16.  
  17. fx=binocdf(x,n,p)
  18. binocdf(2,n,p)
  19. binocdf(1,n,p)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement