Reputation: 9
Count the probability of succeed once at most in 10 times at a Bernoulli which P=0.1 I've tried by myself:
pbinom(0,10,.1)
I don't know it is right or not, as I don't know if "at most" here is the same the "at least".
Upvotes: 0
Views: 408
Reputation: 3875
Having at most one success means that you can have either zero success or one success.
If X is the number of successes, then the probability of having at most 1 success is p(X<=1)=p(X=0)+p(X=1).
In R, the function giving the probability p(X=x) is the density function dbinom
.
So you want to do dbinom(0,10,0.1)+dbinom(1,10,0.1)
Upvotes: 1