Skip to content

7: Z-Tests, T-Tests, F-Tests, and ANOVA

Students analyze biological datasets using one-sample z-tests and t-tests, two-sample t-tests, F-tests for comparing variances, and ANOVA for comparing group means.

Two-Sample t-Test P-Values

Click to show Two-Sample t-Test P-Values example problem

Two-Sample T-Test Scenario
Previously, you compared newborn weights at Joe's Hospital of Fried Foods to the national average (7.5 lbs) using a one-sample t-test. Now, Joe faces a challenge from Alex, CEO of Green Veggies Health Center, who believes her babies are just as heavy as Joe's fried-food babies.
Joe's Hospital of Fried Foods (n=35) and Green Veggies Health Center (n=38) each recorded the weights of newborns this month. Joe believes his hospital's babies weigh more on average than those from Green Veggies.
Use a one tailed two sample t test for H1: μJoe > μVeggies.
Assume unequal variances (Welch's t test).

Joe's Hospital (lbs):
8.1
9.5
6.9
6.1
7.0
9.8
7.8
8.8
7.2
8.2
6.5
11.5
6.6
7.3
6.8
7.8
6.6
9.5
8.6
5.4
9.0
5.5
8.1
6.8
7.0
7.7
9.2
8.7
8.2
5.0
7.2
8.7
5.2
8.4
9.8
Green Veggies (lbs):
10.5
7.1
5.9
7.7
8.5
8.5
6.9
9.0
6.7
6.2
10.4
4.6
6.7
6.9
6.6
6.8
8.6
6.9
4.0
8.5
7.4
6.8
9.8
7.9
6.1
5.8
8.5
5.5
6.3
6.3
8.0
4.0
6.0
6.9
9.0
8.0
7.7
5.9

Compute the p value in Google Sheets using the tutorial: link here.
Enter your result as a decimal between 0 and 1 (for example, 0.084, not 8.4%).

 

Biodiversity Differences Using ANOVA

Click to show Biodiversity Differences Using ANOVA example problem

ANOVA of Shannon Diversity: 1994, 2004, 2009, 2014, 2024
Compare microbial diversity across five years using one way ANOVA.
Sample Data Table:
Copy table rows and use regular paste (Ctrl-V or ⌘-V) into Google Sheets.

Sample
Location
1994
Shannon
Index
2004
Shannon
Index
2009
Shannon
Index
2014
Shannon
Index
2024
Shannon
Index
Andrews Park 4.46 3.74 3.48 3.37 3.84
Beisner Road Entrance 4.29 4.03 4.18 4.05 4.48
Boat Launch Area 4.22 4.67 4.01 4.49 4.08
Busse Lake 4.89 4.20 2.84 4.16
Debra Park 4.78 3.89 4.17 4.34 4.00
Elk Pasture 4.11 4.32 4.39
Forest Central Grove 3.96 3.65 4.01 3.91
Forest North Grove 3.61
Forest South Grove 4.36 4.64 3.93 4.31 4.72
Forest West Grove 3.62 3.57 5.14 4.75 4.19
Lake Boating Center 4.02
Large Event Area 4.11 3.72 4.30
Main Dam 3.90
Main Pool 4.17
Marshall Park 4.39 3.98 3.20
Model Airplane Field 4.05 4.05 3.79 3.84 4.51
Nature Preserve 3.84 4.32
Ned Brown Meadow 3.48 3.80 4.13 2.82
North Pool 5.91 3.75 3.39
Osborn Park 3.80 4.87 3.79
Salt Creek Trail 4.21 3.39 4.00 4.61 4.60
South Pool 3.80 4.40 4.05 4.33 3.60
Wildlife Refuge 4.22 3.92 3.75 3.53 4.00
Woodland Meadow 4.26 3.20

Alternate Copyable Format:
Copy this text and use Data → Split text to columns → Comma in Google Sheets.
Sample Location,1994 Shannon Index,2004 Shannon Index,2009 Shannon Index,2014 Shannon Index,2024 Shannon Index
Andrews Park,4.46,3.74,3.48,3.37,3.84
Beisner Road Entrance,4.29,4.03,4.18,4.05,4.48
Boat Launch Area,4.22,4.67,4.01,4.49,4.08
Busse Lake,,4.89,4.20,2.84,4.16
Debra Park,4.78,3.89,4.17,4.34,4.00
Elk Pasture,,,4.11,4.32,4.39
Forest Central Grove,,3.96,3.65,4.01,3.91
Forest North Grove,,,,,3.61
Forest South Grove,4.36,4.64,3.93,4.31,4.72
Forest West Grove,3.62,3.57,5.14,4.75,4.19
Lake Boating Center,,,,,4.02
Large Event Area,,,4.11,3.72,4.30
Main Dam,,,,,3.90
Main Pool,,,,,4.17
Marshall Park,,,4.39,3.98,3.20
Model Airplane Field,4.05,4.05,3.79,3.84,4.51
Nature Preserve,,,,3.84,4.32
Ned Brown Meadow,,3.48,3.80,4.13,2.82
North Pool,,,5.91,3.75,3.39
Osborn Park,,,3.80,4.87,3.79
Salt Creek Trail,4.21,3.39,4.00,4.61,4.60
South Pool,3.80,4.40,4.05,4.33,3.60
Wildlife Refuge,4.22,3.92,3.75,3.53,4.00
Woodland Meadow,,,,4.26,3.20

Enter the ANOVA p value as a decimal between 0 and 1.
Workflow: link here.

 

Microbial Diversity Significance Using a Z-Test

Click to show Microbial Diversity Significance Using a Z-Test example problem

Busse Woods Microbial Diversity vs Benchmark

Z-Test Scenario
Use a Z test. Population sd is known.
Fixed values: mu = 4.00, sigma = 0.60.
Alternative H1: diversity is different from the benchmark.
Use a two tailed test.
Sample Data Table:
Copy the table rows and use regular paste (Ctrl-V or ⌘-V) into Google Sheets.

Sample
Location
2024
Shannon
Index
Andrews Park 4.06
Boat Launch Area 3.86
Busse Lake 4.19
Debra Park 2.33
Forest Central Grove 3.80
Forest North Grove 4.28
Forest West Grove 4.26
Lake Boating Center 3.46
Main Dam 3.55
Marshall Park 3.97
Model Airplane Field 3.21
Nature Preserve 4.56
Ned Brown Meadow 3.59
North Pool 3.93
Osborn Park 4.54
Salt Creek Trail 3.72
Wildlife Refuge 3.45
Woodland Meadow 2.76

Alternate Copyable Format:
Copy this text and use Data → Split text to columns → Comma in Google Sheets.
Sample Location 2024 Shannon Index
Andrews Park,4.06
Boat Launch Area,3.86
Busse Lake,4.19
Debra Park,2.33
Forest Central Grove,3.80
Forest North Grove,4.28
Forest West Grove,4.26
Lake Boating Center,3.46
Main Dam,3.55
Marshall Park,3.97
Model Airplane Field,3.21
Nature Preserve,4.56
Ned Brown Meadow,3.59
North Pool,3.93
Osborn Park,4.54
Salt Creek Trail,3.72
Wildlife Refuge,3.45
Woodland Meadow,2.76

Follow the workflow in the tutorial: link here.
Enter the p value as a decimal between 0 and 1.

 

Statistical Significance Using a Two-Sample F-Test

Click to show Statistical Significance Using a Two-Sample F-Test example problem

F-Test of Variances: 2014 vs 2024
Use a one tailed F test for H1: variance_2024 < variance_2014.
Sample Data Table:
Copy the table rows and use regular paste (Ctrl-V or ⌘-V) into Google Sheets.

Sample
Location
2014
Shannon
Index
2024
Shannon
Index
Andrews Park 3.50 4.15
Beisner Road Entrance 3.86 3.45
Boat Launch Area 3.57 3.40
Busse Lake 3.85 4.48
Debra Park 4.00 4.09
Forest Central Grove 4.35 4.01
Forest North Grove 4.29 3.89
Forest South Grove 3.69 4.23
Forest West Grove 4.16 3.85
Lake Boating Center 4.39 4.42
Large Event Area 4.32 3.71
Main Dam 5.01 3.63
Main Pool 3.32 4.58
Marshall Park 4.07 3.88
Nature Preserve 4.31 3.49
Ned Brown Meadow 3.57 4.24
Osborn Park 4.02 4.15
Salt Creek Trail 2.93 4.02
South Pool 4.19 3.45
Wildlife Refuge 4.02 3.87
Woodland Meadow 4.35 3.98

Alternate Copyable Format:
Copy this text and use Data → Split text to columns → Comma in Google Sheets.
Sample Location,2014 Shannon Index,2024 Shannon Index
Andrews Park,3.50,4.15
Beisner Road Entrance,3.86,3.45
Boat Launch Area,3.57,3.40
Busse Lake,3.85,4.48
Debra Park,4.00,4.09
Forest Central Grove,4.35,4.01
Forest North Grove,4.29,3.89
Forest South Grove,3.69,4.23
Forest West Grove,4.16,3.85
Lake Boating Center,4.39,4.42
Large Event Area,4.32,3.71
Main Dam,5.01,3.63
Main Pool,3.32,4.58
Marshall Park,4.07,3.88
Nature Preserve,4.31,3.49
Ned Brown Meadow,3.57,4.24
Osborn Park,4.02,4.15
Salt Creek Trail,2.93,4.02
South Pool,4.19,3.45
Wildlife Refuge,4.02,3.87
Woodland Meadow,4.35,3.98

Enter the p value as a decimal between 0 and 1.
Workflow: link here.

 

Statistical Significance Using a Two-Sample t-Test

Click to show Statistical Significance Using a Two-Sample t-Test example problem

Two-Sample Test of Shannon Diversity: 2014 vs 2024
Use a one tailed Welch two sample t test for H1: mean_2024 < mean_2014.
Assume unequal variances.
Sample Data Table:
Copy the table rows and use regular paste (Ctrl-V or ⌘-V) into Google Sheets.

Sample
Location
2014
Shannon
Index
2024
Shannon
Index
Andrews Park 4.75 2.47
Beisner Road Entrance 4.57 4.71
Busse Lake 3.77 3.91
Debra Park 4.41 3.59
Elk Pasture 3.72 3.72
Forest Central Grove 4.72 5.22
Lake Boating Center 4.47 4.45
Large Event Area 4.08 3.38
Main Pool 5.27 3.74
Nature Preserve 4.50 3.50
Ned Brown Meadow 3.02 3.63
Osborn Park 4.15 4.13
South Pool 4.02 4.15

Alternate Copyable Format:
Copy this text and use Data → Split text to columns → Comma in Google Sheets.
Sample Location,2014 Shannon Index,2024 Shannon Index
Andrews Park,4.75,2.47
Beisner Road Entrance,4.57,4.71
Busse Lake,3.77,3.91
Debra Park,4.41,3.59
Elk Pasture,3.72,3.72
Forest Central Grove,4.72,5.22
Lake Boating Center,4.47,4.45
Large Event Area,4.08,3.38
Main Pool,5.27,3.74
Nature Preserve,4.50,3.50
Ned Brown Meadow,3.02,3.63
Osborn Park,4.15,4.13
South Pool,4.02,4.15

Compute the p value in Google Sheets using the tutorial: link here.
Enter the p value as a decimal between 0 and 1.

 

Population Z-Test Using Google Sheets Data

Click to show Population Z-Test Using Google Sheets Data example problem

Joe's Hospital of Fried Foods vs National Average
Use a one tailed Z test for H1: mu_hospital > mu.
Fixed population values: μ = 7.5 lbs, σ = 1.5 lbs.
Sample weights (lbs), enter into a single column in Google Sheets:
8.4
7.7
8.9
7.6
8.5
9.9
7.3
6.9
7.3
8.4
9.5
8.0
5.6
6.7
6.9
6.9
8.4
9.5
7.6
7.9
6.2
8.1
10.3
5.9
6.7
9.6

Compute the one-tailed p-value using the tutorial workflow from last week: link here.
Enter your result as a decimal between 0 and 1 (for example, 0.084, not 8.4%).