Python Quiz on Binomial Distribution
There are 20 questions based on Binomial Distribution.
Sign in to Google to save your progress. Learn more
Q1. What is the output of the following code?
from scipy.stats import binom
print(binom.pmf(2, 4, 0.5))
*
4 points
Q2. What is the output of the following code?
from scipy.stats import binom
print(binom.cdf(2, 4, 0.5))
*
4 points
Q3.  What is the output of the following code?
from scipy.stats import binom
n, p = 5, 0.5
print(binom.mean(n, p))
*
4 points
Q4.  What is the output of the following code?
from scipy.stats import binom
print(binom.rvs(n=10, p=0.5, size=3))
*
4 points
Q5.  What is the output of the following code?
from scipy.stats import binom
print(binom.var(6, 0.5))
*
4 points
Q6. What is the output of the following code?   
from scipy.stats import binom
print(binom.pmf(0, 5, 0.2))
*
4 points
Q7. What is the output of the following code?   
from scipy.stats import binom
print(binom.cdf(3, 3, 1.0))
*
4 points
Q8. What is the output of the following code?
from scipy.stats import binom
print(binom.sf(2, 5, 0.5)) 
*
4 points
Q9. What is the output of the following code?
from scipy.stats import binom
print(binom.pmf(2, 5, 0))
*
4 points
Q10. What is the output of the following code?
from scipy.stats import binom
print(binom.pmf(5, 5, 1.0))
*
4 points
Q11. What is the output of the following code?
from scipy.stats import binom
print(binom.pmf(2, 3, 1.5))
*
4 points
Q12. What is the output of the following code?   
import numpy as np
np.random.seed(0)
print(np.random.binomial(4, 0.6, 1)[0])
*
4 points
Q13. What is the output of the following code?
from scipy.stats import binom
print(binom.pmf(4, 6, 0.5))
*
4 points
Q14. What is the output of the following code?
from scipy.stats import binom
print(binom.cdf(0, 5, 0.3))
*
4 points
Q15.  What is the output of the following code?   
from scipy.stats import binom
print(binom.ppf(0.9, 10, 0.5))
*
4 points
Q16.  What is the output of the following code?   
from scipy.stats import binom
print(binom.pmf(10, 10, 0.8))
*
4 points
Q17. What is the output of the following code?
from scipy.stats import binom
print(binom.std(100, 0.25))
*
4 points
Q18.  What is the output of the following code?   
from scipy.stats import binom
print(binom.mean(100, 0.25))
*
4 points
Q19. What is the output of the following code?   
from scipy.stats import binom
k = list(range(6))
probs = binom.pmf(k, 5, 0.5)
print(round(sum(probs), 2))
*
4 points
Q20.  What is the output of the following code?
from scipy.stats import binom
print(binom.pmf(1, 1, 0.75))
*
4 points
Submit
Clear form
This content is neither created nor endorsed by Google.