Bird
0
0

How would you calculate the probability that a variable from a normal distribution with mean 5 and std deviation 1 is between 4 and 6 using scipy?

hard📝 Application Q9 of 15
SciPy - Statistical Functions (scipy.stats) Basics
How would you calculate the probability that a variable from a normal distribution with mean 5 and std deviation 1 is between 4 and 6 using scipy?
Anorm.cdf(4, loc=5, scale=1) + norm.cdf(6, loc=5, scale=1)
Bnorm.cdf(6, loc=5, scale=1) - norm.cdf(4, loc=5, scale=1)
Cnorm.sf(4, loc=5, scale=1) - norm.sf(6, loc=5, scale=1)
Dnorm.pdf(6, loc=5, scale=1) - norm.pdf(4, loc=5, scale=1)
Step-by-Step Solution
Solution:
  1. Step 1: Understand probability between two values

    Probability between a and b is CDF(b) - CDF(a).
  2. Step 2: Apply correct parameters

    Use loc=5, scale=1 for both CDF calls at 6 and 4.
  3. Final Answer:

    norm.cdf(6, loc=5, scale=1) - norm.cdf(4, loc=5, scale=1) -> Option B
  4. Quick Check:

    Probability between = CDF(b) - CDF(a) [OK]
Quick Trick: Subtract CDFs to get probability between two points [OK]
Common Mistakes:
MISTAKES
  • Subtracting PDFs instead of CDFs
  • Adding CDFs instead of subtracting
  • Using survival function incorrectly

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More SciPy Quizzes