Bird
0
0

Which of the following is the correct syntax to create a Poisson random variable with mean 4 using scipy?

easy📝 Syntax Q3 of 15
SciPy - Statistical Functions (scipy.stats) Basics
Which of the following is the correct syntax to create a Poisson random variable with mean 4 using scipy?
Apoisson(mu=4)
Bpoisson(4)
Cpoisson.mean(4)
Dpoisson.random(4)
Step-by-Step Solution
Solution:
  1. Step 1: Check scipy.stats.poisson constructor syntax

    The Poisson distribution object is created by passing the mean as the first positional argument, e.g., poisson(4).
  2. Step 2: Validate other options

    poisson(mu=4) uses mu=4 which is incorrect keyword, .mean(4) and .random(4) are not valid constructors.
  3. Final Answer:

    poisson(4) -> Option B
  4. Quick Check:

    Constructor uses positional mean [OK]
Quick Trick: Use positional argument for mean in poisson() [OK]
Common Mistakes:
MISTAKES
  • Using mu= keyword
  • Calling mean() as constructor
  • Using random() instead of rvs()

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More SciPy Quizzes