Bird
0
0

What will be the output of this code?

medium📝 Predict Output Q5 of 15
SciPy - Basics and Scientific Computing
What will be the output of this code?
from scipy import stats
result = stats.norm.cdf(0)
print(round(result, 3))
A0.000
B0.500
C1.000
DError: norm not found
Step-by-Step Solution
Solution:
  1. Step 1: Understand stats.norm.cdf(0)

    This calculates the cumulative distribution function of standard normal at 0.
  2. Step 2: Know that CDF at 0 for standard normal is 0.5

    So, result is 0.5, rounded to 0.500.
  3. Final Answer:

    0.500 -> Option B
  4. Quick Check:

    Normal CDF at 0 = 0.5 = A [OK]
Quick Trick: Normal CDF at zero mean is 0.5 [OK]
Common Mistakes:
MISTAKES
  • Confusing PDF with CDF
  • Expecting zero or one instead of 0.5
  • Not rounding output

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More SciPy Quizzes