Bird
0
0

Given this code:

medium📝 Predict Output Q5 of 15
SciPy - Statistical Tests
Given this code:
from scipy.stats import ttest_ind
sample1 = [10, 12, 11, 13]
sample2 = [14, 15, 16, 15]
t_stat, p_val = ttest_ind(sample1, sample2)
print(p_val > 0.05)

What will be printed?
AFalse
BTrue
CError
DNone
Step-by-Step Solution
Solution:
  1. Step 1: Understand ttest_ind output

    ttest_ind compares means of two independent samples.
  2. Step 2: Evaluate p-value condition

    Samples differ enough to produce p-value less than 0.05, so print(False).
  3. Final Answer:

    False -> Option A
  4. Quick Check:

    p_val > 0.05 is False for different samples [OK]
Quick Trick: p-value less than 0.05 means reject null (print False) [OK]
Common Mistakes:
MISTAKES
  • Assuming p-value is greater than 0.05
  • Confusing boolean output
  • Ignoring sample mean differences

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More SciPy Quizzes