School Commit Init

This commit is contained in:
2024-08-31 12:07:21 +03:00
commit 0b130ee18c
2801 changed files with 4720552 additions and 0 deletions
@@ -0,0 +1,14 @@
# We are solving ex 2
# We plot the pdf and cdf of the binomial
n = input("Give the number of trials n=");
p = input("Give the probability of success p=");
x=0:1:n;
px=binopdf(x,n,p);
plot(x,px,'*r');
hold on
xx=0:0.0001:n;
cx=binocdf(xx,n,p);
plot(xx,cx,'g');