pBin<-function(k,p,n) { newton<-factorial(n)/(factorial(k)*factorial(n-k)) return (newton*p^(k)*(1-p)^(n-k)); } pBin(1,0.5,10); normal<-function(left,right) { x<-seq(from=min(-3,left),to=max(3,right),length=100); y<-dnorm(x) plot(main="Rozkład normalny",x,y,type="l",lwd=1,col="red",xlab="Wartość",ylab="gęstość"); lines(x[x>left&xleft&x