Login
📚 Python for Introductory Statistics: Lab Workbook
Chapters ▾

14.6 ANOVA

Watch demo video

One-way ANOVA

Lab 14.6.1

The data set below (URL) contains the students test1_score, gender, level, section etc.

  1. Write a Python code to read the data set and display the first and last five rows.
  2. Write a Python code to find test3_score means, std and size for each level
  3. Write a Python code to perform ANOVA to test if there is sufficient evidence to indicate a difference in the averages of test1_scores among the three levels (low, medium, high). Use 10% level of significance.

my_csv_file.csv

view answer

Two-way ANOVA (Block Design)

Lab 14.6.2

The data set below (URL) contains students test1_score, gender, level, section etc.

  1. Write a Python code to read the dataset and display the first five rows.
  2. Write a program to find test3_score means grouped by level and gender.
  3. Write a Python code to perform ANOVA block design to test if there is sufficient evidence to indicate a difference in the averages of test3_score among the three levels (low, medium, high) using gender as blocks. Use 10% level of significance.

my_csv_file.csv

view answer

Two-Factor ANOVA (Interactions)

Lab 14.6.3

The dataset below (URL) contains students test1_score, gender, level, section etc.

  1. Write a Python code to read the dataset and display the first 5 rows.
  2. Write a Python code to display the means grouped by level and interaction for test3_score.
  3. Write a Python code to perform a two-factor ANOVA with level and section. Do the data provide sufficient evidence to indicate an interaction between level and section? Use 10% level of significance.

my_csv_file.csv

view answer

Adapted from Python for Introductory Statistics: Student's Lab Workbook, by Simon Aman (Truman College, City Colleges of Chicago), licensed under CC BY 4.0. Changes were made: reformatted as an accessible XYZ web edition with live in-browser code cells. License: CC-BY-4.0.