Bird
0
0

How would you generate 1000 random samples from a normal distribution with mean 10 and standard deviation 2 using scipy?

hard📝 Application Q9 of 15
SciPy - Statistical Functions (scipy.stats) Basics
How would you generate 1000 random samples from a normal distribution with mean 10 and standard deviation 2 using scipy?
Anorm.rvs(loc=10, scale=2, size=1000)
Bnorm.pdf(loc=10, scale=2, size=1000)
Cnorm.cdf(loc=10, scale=2, size=1000)
Dnorm.ppf(loc=10, scale=2, size=1000)
Step-by-Step Solution
Solution:
  1. Step 1: Identify function to generate random samples

    rvs() generates random variates (samples).
  2. Step 2: Use correct parameters and size

    Set loc=10, scale=2, and size=1000 for sample count.
  3. Final Answer:

    norm.rvs(loc=10, scale=2, size=1000) -> Option A
  4. Quick Check:

    rvs() generates random samples [OK]
Quick Trick: Use rvs() with loc, scale, and size for samples [OK]
Common Mistakes:
MISTAKES
  • Using pdf() or cdf() to generate samples
  • Missing size parameter
  • Confusing ppf() with rvs()

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More SciPy Quizzes