Project 24: Weekday vs. Weekend A/B Test
Scientific Computing
Current Task
Objective
Review day: reuse a t-test — day 16 — to compare weekday vs. weekend attendance.
Task: compare weekday and weekend attendance with a t-test and print the p-value.
index.py
from scipy.stats import ttest_ind
weekday_attendance = [40, 45, 38, 42]
weekend_attendance = [60, 65, 58, 70]
result = ttest_ind(weekday_attendance, weekend_attendance)
print(round(result.pvalue, 5))
* Hint: Correct characters turn green, incorrect ones turn red.
Live Preview
🖼️
Verify your code to see the preview