JavaScript isn't enabled in your browser, so this file can't be opened. Enable and reload.
Python Quiz on Binomial Distribution
There are
20 questions based on Binomial Distribution.
Sign in to Google
to save your progress.
Learn more
* Indicates required question
Q1. What is the output of the following code?
from scipy.stats import binom
print(binom.pmf(2, 4, 0.5))
*
4 points
0.25
0.375
0.5
0.125
Q2. What is the output of the following code?
from scipy.stats import binom
print(binom.cdf(2, 4, 0.5))
*
4 points
0.375
0.5
0.6875
0.8125
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
2.5
AttributeError
0.5
5
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
Error
Array of 3 random binomial samples
Always [5, 5, 5]
0
Q5. What is the output of the following code?
from scipy.stats import binom
print(binom.var(6, 0.5))
*
4 points
1.0
2.5
3.0
1.5
Q6. What is the output of the following code?
from scipy.stats import binom
print(binom.pmf(0, 5, 0.2))
*
4 points
0.32768
0.0
1.0
0.8
Q7. What is the output of the following code?
from scipy.stats import binom
print(binom.cdf(3, 3, 1.0))
*
4 points
0
1.0
1
Error
Q8. What is the output of the following code?
from scipy.stats import binom
print(binom.sf(2, 5, 0.5))
*
4 points
0.5
0.01
0.25
0.00
Q9. What is the output of the following code?
from scipy.stats import binom
print(binom.pmf(2, 5, 0))
*
4 points
0.0
1
1.5
Error
Q10. What is the output of the following code?
from scipy.stats import binom
print(binom.pmf(5, 5, 1.0))
*
4 points
1.0
1.5
0
2
Q11. What is the output of the following code?
from scipy.stats import binom
print(binom.pmf(2, 3, 1.5))
*
4 points
0
1
2
nan
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
0
1
2
3
Q13. What is the output of the following code?
from scipy.stats import binom
print(binom.pmf(4, 6, 0.5))
*
4 points
0.234
0.3125
0.375
0.5
Q14. What is the output of the following code?
from scipy.stats import binom
print(binom.cdf(0, 5, 0.3))
*
4 points
0.16807
0.5
0.7
0.0
Q15. What is the output of the following code?
from scipy.stats import binom
print(binom.ppf(0.9, 10, 0.5))
*
4 points
5
6
7
8
Q16. What is the output of the following code?
from scipy.stats import binom
print(binom.pmf(10, 10, 0.8))
*
4 points
0.8
1.0
0.107
0.5
Q17. What is the output of the following code?
from scipy.stats import binom
print(binom.std(100, 0.25))
*
4 points
5
4.33
6.12
8.66
Q18. What is the output of the following code?
from scipy.stats import binom
print(binom.mean(100, 0.25))
*
4 points
20
22
25
30
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
0
1.0
2
5
Q20. What is the output of the following code?
from scipy.stats import binom
print(binom.pmf(1, 1, 0.75))
*
4 points
0.5
0.75
0.12
0.10
Submit
Clear form
Forms
This content is neither created nor endorsed by Google.
Report Abuse
Terms of Service
Privacy Policy
Help and feedback
Contact form owner
Help Forms improve
Report