Skip to content

Hypothesis Testing in Python Assessment :Inferential Statistical Analysis with Python (Statistics with Python Specialization) Answers 2025

1) Question 1 — Difference of sample mean bedtimes (nap − no-nap) (three decimals)

❌ 20.126
0.714
❌ 0.1785
❌ 0.5355

Explanation: Using the reported group CIs, the nap-group mean ≈ 20.3040 and the no-nap mean ≈ 19.5900, so the difference ≈ 20.3040 − 19.5900 = 0.714 (rounded to three decimals).


2) Question 2 — Degrees of freedom for the t distribution (assume equal variances)

38
(answer is an integer)

Explanation: Under the equal-variances (pooled) two-sample t test, df = n₁ + n₂ − 2. Using the sample sizes implied earlier (n₁ = 27, n₂ = 13), df = 27 + 13 − 2 = 38.


3) Question 3 — t-test statistic for the first (one-sided) hypothesis test (two decimals)

❌ 3.61
2.61
❌ 2.41
❌ 4.41

Explanation: Using the pooled-variance SE (equal-variance assumption) and the observed difference 0.714, the t statistic computes to about 2.61 (rounded to two decimals). This uses the sample sizes and the group SEs inferred from the group confidence intervals.


4) Question 4 — p-value for the first hypothesis test (four decimals)

❌ 0.0147
❌ 0.9866
0.0080
❌ 0.0134

Explanation: The first test is one-sided (Hₐ: μ_nap > μ_no-nap). With t ≈ 2.61 and df = 38, the one-sided p-value is approximately 0.0080, which is the choice matching the computed test statistic and rounding.


5) Question 5 — For the second (two-sided) hypothesis test (α = 0.05), do you reject H₀?

Reject
❌ Fail to reject

Explanation: The second test is two-sided for mean 24-hour sleep duration. The evidence from the data (t large enough; corresponding two-sided p ≈ 0.016 — i.e. < 0.05) leads us to reject H₀ at α = 0.05.


🧾 Summary Table

Q # Answer Key point
1 0.714 Difference = mean(nap) − mean(no-nap) ≈ 20.3040 − 19.5900
2 38 Pooled df = n₁ + n₂ − 2 = 27 + 13 − 2
3 2.61 t = (difference) / (pooled SE) ≈ 2.61 (rounded)
4 0.0080 One-sided p ≈ 0.0080 for t ≈ 2.61, df = 38
5 Reject Two-sided p < 0.05 ⇒ reject H₀ at α = 0.05