A company wants to determine if there is a significant difference in the productivity levels of developers who work from home versus those who work in the office. Good thing you already know a t-test can help with it.

The company has two independent developer teams. One team works from home, and the other works from the office. You are given two files, 'work_from_home.csv' and 'work_from_office.csv'. They contain the completed tasks count per month for each developer.

Your task is to conduct a t-test. The company wants to know whether developers who work from the office are more productive than home workers. If so, they will also force the second team to work from the office. In case of home workers being more productive, the company will not make any changes. So the desired alternative hypothesis is "The office worker's mean is greater than the home worker's".

Let's check if the variances are the same.

The second standard deviation is twice as much as the first, so variances differ. Recall the function ttest_ind to perform a t-test.


  1. Import scipy.stats with an alias st.
  2. Conduct a t-test with the following setup:
    • Samples: home_workers, office_workers;
    • Alternative hypothesis: office > home;
    • No homogeneity of variances.

Everything was clear?

Section 6. Chapter 7
toggle bottom row