Bird
0
0

What is wrong with this Wilcoxon test usage?

medium📝 Debug Q7 of 15
SciPy - Statistical Tests

What is wrong with this Wilcoxon test usage?

from scipy.stats import wilcoxon
x = [4, 5, 6, 7]
stat, p = wilcoxon(x)
Ax must be a numpy array, not a list
Bwilcoxon function needs alternative parameter
CWilcoxon test requires two samples or differences, not one sample
DWilcoxon test cannot handle even number of samples
Step-by-Step Solution
Solution:
  1. Step 1: Check input requirements

    Wilcoxon test needs either two related samples or a single array of differences.
  2. Step 2: Analyze given input

    Passing only one sample without differences is invalid.
  3. Final Answer:

    Wilcoxon test requires two samples or differences, not one sample -> Option C
  4. Quick Check:

    Wilcoxon needs paired data or differences [OK]
Quick Trick: Provide two samples or difference array to wilcoxon [OK]
Common Mistakes:
MISTAKES
  • Passing single sample without differences
  • Assuming lists are invalid input
  • Omitting required parameters

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More SciPy Quizzes