Resources

In a field experiment testing territorial competition in song sparrows (Melospiza melodia), an investigator places acoustic playback speakers in 120120 distinct territories. The treatments consist of: (1) conspecific territorial song playback, (2) heterospecific competitor (Zonotrichia leucophrys) song playback, and (3) neutral control (Catharus guttatus) non-competitive vocalization. The observed aggressive physical approach responses within a 5 m5\text{ m} radius over a 1010-minute trial are recorded: 3434 aggressive responses out of 4040 trials for conspecific playback, 1818 aggressive responses out of 4040 trials for heterospecific playback, and 88 aggressive responses out of 4040 trials for control playback (totaling 6060 responses out of 120120 trials). Under the null hypothesis H0H_0 that aggressive territorial response is independent of playback vocalization type, the expected count is 20.020.0 responses per treatment. Calculate the test statistic χ2\chi^2, determine the degrees of freedom (dfdf), and state the statistical decision at α=0.01\alpha = 0.01 (critical value χ0.01,22=9.210\chi^2_{0.01, 2} = 9.210).

Answer and steps

Final answer

χ2=17.20\chi^2 = 17.20, df=2df = 2; since χ2=17.20>9.210\chi^2 = 17.20 > 9.210 (p<0.01p < 0.01), reject H0H_0 (conclude that aggressive response rate depends significantly on vocalization type).

Steps

01

Identify Observed and Expected Values

Under the null hypothesis (H0H_0), the territorial aggressive response is distributed equally across the three acoustic treatments.

  • Total aggressive responses across all groups: N=34+18+8=60N = 34 + 18 + 8 = 60
  • Number of treatment categories (kk): 33
  • Expected responses per treatment (EE): E=603=20.0E = \frac{60}{3} = 20.0

The observed responses (OO) per category are:

  • Conspecific song: O1=34O_1 = 34
  • Heterospecific competitor song: O2=18O_2 = 18
  • Neutral control vocalization: O3=8O_3 = 8

02

Compute the Chi-Square (χ2\chi^2) Test Statistic

The chi-square goodness-of-fit formula is: χ2=∑(O−E)2E\chi^2 = \sum \frac{(O - E)^2}{E}

Compute each component:

  • Conspecific: (34−20)220=14220=19620=9.80\frac{(34 - 20)^2}{20} = \frac{14^2}{20} = \frac{196}{20} = 9.80
  • Heterospecific: (18−20)220=(−2)220=420=0.20\frac{(18 - 20)^2}{20} = \frac{(-2)^2}{20} = \frac{4}{20} = 0.20
  • Neutral control: (8−20)220=(−12)220=14420=7.20\frac{(8 - 20)^2}{20} = \frac{(-12)^2}{20} = \frac{144}{20} = 7.20

Summing the components: χ2=9.80+0.20+7.20=17.20\chi^2 = 9.80 + 0.20 + 7.20 = 17.20


03

Determine Degrees of Freedom and Make the Statistical Decision

  • Degrees of freedom (dfdf): df=k−1=3−1=2df = k - 1 = 3 - 1 = 2
  • Comparison with Critical Value: The critical value at significance level α=0.01\alpha = 0.01 with df=2df = 2 is: χ0.01,22=9.210\chi^2_{0.01, 2} = 9.210

Since the calculated test statistic χ2=17.20\chi^2 = 17.20 exceeds the critical threshold of 9.2109.210 (p<0.01p < 0.01), we reject H0H_0.

Biological conclusion: Aggressive territorial defense behavior in song sparrows depends significantly on the vocalization type, eliciting the strongest territorial aggression toward conspecific rivals.

Typical errors

OverviewACEpath Teacher's Diagnosis

01 The student forgets to divide each squared difference by the expected count, calculating only the sum of squared differences.

Sample Student Work

Reviewed by ACEpath Teacher
Step-by-Step Review
Walk Through It with Your Teacher
Incorrect
  1. Step 1

    χ2=(34−20)2+(18−20)2+(8−20)2  ⟹  χ2=196+4+144=344\chi^2 = (34-20)^2 + (18-20)^2 + (8-20)^2 \implies \chi^2 = 196 + 4 + 144 = 344

    Correct

    χ2=(34−20)220+(18−20)220+(8−20)220=19620+420+14420=17.20\chi^2 = \frac{(34-20)^2}{20} + \frac{(18-20)^2}{20} + \frac{(8-20)^2}{20} = \frac{196}{20} + \frac{4}{20} + \frac{144}{20} = 17.20

    You calculated the sum of squared differences ∑(O−E)2\sum (O - E)^2 instead of dividing each squared difference by its expected count EE as required by the formula χ2=∑(O−E)2E\chi^2 = \sum \frac{(O - E)^2}{E}.

  2. Step 2

    df=3−1=2df = 3 - 1 = 2

  3. Step 3

    Since 344>9.210, reject H0.\text{Since } 344 > 9.210\text{, reject } H_0.

    Correct

    Since χ2=17.20>9.210, reject H0.\text{Since } \chi^2 = 17.20 > 9.210\text{, reject } H_0.

    Your comparison logic is correct, but your decision relied directly on the incorrect test statistic of 344344 calculated in Step 1.

WHAT YOU DID WELL
Compliments from Your Teacher

You correctly identified and squared the deviations between observed and expected frequencies.

You correctly calculated the degrees of freedom as df=2df = 2.

You correctly identified the rule for comparing the calculated test statistic with the critical value.

THE ERROR
Where Your ACEpath Teacher Spotted the Mistake
Omitted expected frequency denominator in chi-square formula

no

WHY IT HAPPENED
ACEpath Teacher's Diagnosis

You treated the chi-square test statistic as a simple sum of squared errors ∑(O−E)2\sum (O-E)^2 rather than standardizing each squared deviation relative to the expected count by dividing by EE.

REASONING PATH
Your ACEpath teacher’s suggested approach
Chi-Square Test Statistic Formula
  • χ2=∑(O−E)2E\chi^2 = \sum \frac{(O - E)^2}{E}

  • Always divide each squared difference (O−E)2(O - E)^2 by its corresponding expected frequency EE before summing.

CORRECTED PATH
ACEpath Teacher's Demonstration
  1. Divide each squared deviation by E=20E = 20: 14220+(−2)220+(−12)220=19620+420+14420\frac{14^2}{20} + \frac{(-2)^2}{20} + \frac{(-12)^2}{20} = \frac{196}{20} + \frac{4}{20} + \frac{144}{20}.

  2. Sum the resulting quotients: 9.80+0.20+7.20=17.209.80 + 0.20 + 7.20 = 17.20.

  3. Compare the standardized test statistic to the critical threshold: since χ2=17.20>9.210\chi^2 = 17.20 > 9.210, reject H0H_0.

Final answer

χ2=17.20\chi^2 = 17.20, df=2df = 2; since χ2=17.20>9.210\chi^2 = 17.20 > 9.210 (p<0.01p < 0.01), reject H0H_0.

NEXT STEPS
Final Takeaways from Your Teacher
  • Write out the full formula χ2=∑(O−E)2E\chi^2 = \sum \frac{(O - E)^2}{E} at the start of each problem as a visual checklist.

  • Set up a small table with columns for OO, EE, O−EO - E, (O−E)2(O - E)^2, and (O−E)2E\frac{(O - E)^2}{E} to keep every step organized.

OverviewACEpath Teacher's Diagnosis

02 The student miscalculates the degrees of freedom as the number of categories k rather than k - 1.

Sample Student Work

Reviewed by ACEpath Teacher
Step-by-Step Review
Walk Through It with Your Teacher
Partially correct
  1. Step 1

    χ2=(34−20)220+(18−20)220+(8−20)220  ⟹  χ2=19620+420+14420=34420=17.2\chi^2 = \frac{(34-20)^2}{20} + \frac{(18-20)^2}{20} + \frac{(8-20)^2}{20} \implies \chi^2 = \frac{196}{20} + \frac{4}{20} + \frac{144}{20} = \frac{344}{20} = 17.2

  2. Step 2

    df=3df = 3

    Correct

    df=k−1=3−1=2df = k - 1 = 3 - 1 = 2

    For a one-way chi-square goodness-of-fit test, the degrees of freedom equal the number of categories minus one (k−1k - 1). Since there are 33 vocalization treatments, df=3−1=2df = 3 - 1 = 2.

  3. Step 3

    Since 17.2>9.210, reject H0.\text{Since } 17.2 > 9.210\text{, reject } H_0.

WHAT YOU DID WELL
Compliments from Your Teacher

You substituted the observed and expected values accurately into the chi-square formula.

You calculated the test statistic χ2=17.2\chi^2 = 17.2 without any arithmetic slips.

You correctly compared the test statistic to the critical value and stated the proper hypothesis decision.

THE ERROR
Where Your ACEpath Teacher Spotted the Mistake
Degrees of freedom misidentification

You set the degrees of freedom equal to the total number of categories kk rather than subtracting 11.

WHY IT HAPPENED
ACEpath Teacher's Diagnosis

In goodness-of-fit tests, once the total sample count is fixed, the count in the final category is completely determined by the remaining categories, which reduces the free parameters by one (df=k−1df = k - 1).

REASONING PATH
Your ACEpath teacher’s suggested approach
One-Way Chi-Square Degrees of Freedom
  • For a goodness-of-fit test across kk categories with fixed total NN, df=k−1df = k - 1.

  • Count the distinct treatment categories (k=3k = 3) and subtract 11 to find df=2df = 2.

CORRECTED PATH
ACEpath Teacher's Demonstration
  1. Identify the number of treatment categories: k=3k = 3 (conspecific, heterospecific, control).

  2. Apply the degrees of freedom formula: df=k−1=3−1=2df = k - 1 = 3 - 1 = 2.

  3. Confirm that the given critical value χ0.01,22=9.210\chi^2_{0.01, 2} = 9.210 matches df=2df = 2.

Final answer

χ2=17.20\chi^2 = 17.20, df=2df = 2; since χ2=17.20>9.210\chi^2 = 17.20 > 9.210, reject H0H_0.

NEXT STEPS
Final Takeaways from Your Teacher
  • Review the distinction between the total number of categories (kk) and the degrees of freedom (k−1k - 1) in goodness-of-fit tests.

  • Practice verifying that the critical value notation (e.g., χα,df2\chi^2_{\alpha, df}) matches your calculated degrees of freedom before finalizing your test decision.

OverviewACEpath Teacher's Diagnosis

03 The student reverses the decision rule for a chi-square test, failing to reject H₀ when the test statistic exceeds the critical value.

Sample Student Work

Reviewed by ACEpath Teacher
Step-by-Step Review
Walk Through It with Your Teacher
Incorrect
  1. Step 1

    χ2=(34−20)220+(18−20)220+(8−20)220  ⟹  χ2=19620+420+14420=17.2\chi^2 = \frac{(34 - 20)^2}{20} + \frac{(18 - 20)^2}{20} + \frac{(8 - 20)^2}{20} \implies \chi^2 = \frac{196}{20} + \frac{4}{20} + \frac{144}{20} = 17.2

  2. Step 2

    df=3−1=2df = 3 - 1 = 2

  3. Step 3

    Since χ2=17.2>9.210, fail to reject H0\text{Since } \chi^2 = 17.2 > 9.210\text{, fail to reject } H_0

    Correct

    Since χ2=17.20>9.210, reject H0\text{Since } \chi^2 = 17.20 > 9.210\text{, reject } H_0

    When the calculated test statistic is greater than the critical value, it falls into the critical rejection region (p<αp < \alpha). Therefore, you must reject H0H_0 rather than fail to reject it.

WHAT YOU DID WELL
Compliments from Your Teacher

You correctly applied the chi-square goodness-of-fit formula with observed and expected counts.

You calculated the test statistic value of 17.217.2 without any arithmetic error.

You correctly identified that the degrees of freedom equal 22.

THE ERROR
Where Your ACEpath Teacher Spotted the Mistake
Reversed Decision Rule

no

WHY IT HAPPENED
ACEpath Teacher's Diagnosis

You confused the critical value threshold rule in hypothesis testing, treating a larger test statistic as evidence supporting H0H_0 rather than recognizing that larger differences between observed and expected values increase χ2\chi^2 and provide evidence against H0H_0.

REASONING PATH
Your ACEpath teacher’s suggested approach
Decision Rule in Chi-Square Testing
  • If χcalc2>χcrit2\chi^2_{\text{calc}} > \chi^2_{\text{crit}}, the observed deviation from the null model is statistically significant (p<αp < \alpha), so reject H0H_0. If χcalc2≤χcrit2\chi^2_{\text{calc}} \le \chi^2_{\text{crit}}, fail to reject H0H_0.

  • Compare χcalc2\chi^2_{\text{calc}} to χcrit2\chi^2_{\text{crit}} and place the value on the distribution curve: values in the upper tail beyond the critical threshold fall in the rejection region.

CORRECTED PATH
ACEpath Teacher's Demonstration
  1. Compare the calculated value χ2=17.20\chi^2 = 17.20 with the critical threshold χ0.01,22=9.210\chi^2_{0.01, 2} = 9.210.

  2. Because 17.20>9.21017.20 > 9.210, the test statistic falls in the upper 1%1\% rejection tail (p<0.01p < 0.01).

  3. Reject H0H_0 and conclude that territorial aggression differs significantly across the playback treatments.

Final answer

χ2=17.20\chi^2 = 17.20, df=2df = 2; reject H0H_0

NEXT STEPS
Final Takeaways from Your Teacher
  • Review the relationship between observed deviations, the magnitude of χ2\chi^2, and the critical rejection tail.

  • Practice stating both the statistical decision (reject vs. fail to reject) and the biological interpretation for hypothesis tests.

Lock it in

Similar question

01

A biologist tests bird foraging site preference across 22 equal habitats. Under H0H_0, the expected count is E=25E = 25 for each habitat. The observed counts are 3535 in Habitat A and 1515 in Habitat B. Calculate the χ2\chi^2 statistic.

Answer

χ2=8.0\chi^2 = 8.0. Key step: χ2=(35−25)225+(15−25)225=10025+10025=4.0+4.0=8.0\chi^2 = \frac{(35 - 25)^2}{25} + \frac{(15 - 25)^2}{25} = \frac{100}{25} + \frac{100}{25} = 4.0 + 4.0 = 8.0.

02

In a mating choice experiment with three male morphs, an equal distribution predicts E=16E = 16 female visits per morph. The observed visits are 2424, 1616, and 88. Calculate χ2\chi^2 and determine the degrees of freedom (dfdf).

Answer

χ2=8.0\chi^2 = 8.0, df=2df = 2. Key steps: df=3−1=2df = 3 - 1 = 2. For each morph: (24−16)216=6416=4\frac{(24-16)^2}{16} = \frac{64}{16} = 4, (16−16)216=0\frac{(16-16)^2}{16} = 0, (8−16)216=6416=4\frac{(8-16)^2}{16} = \frac{64}{16} = 4. Sum: 4+0+4=8.04 + 0 + 4 = 8.0.

03

An animal behavior study tests responses to four predator alarm calls with unequal expected proportions: 40%40\%, 30%30\%, 20%20\%, and 10%10\% out of 100100 total trials (giving E=40,30,20,10E = 40, 30, 20, 10). The observed responses are 50,25,15,1050, 25, 15, 10. Calculate the χ2\chi^2 test statistic.

Answer

χ2=4.58\chi^2 = 4.58. Key steps: Category 1: (50−40)240=10040=2.50\frac{(50-40)^2}{40} = \frac{100}{40} = 2.50; Category 2: (25−30)230=2530≈0.833\frac{(25-30)^2}{30} = \frac{25}{30} \approx 0.833; Category 3: (15−20)220=2520=1.25\frac{(15-20)^2}{20} = \frac{25}{20} = 1.25; Category 4: (10−10)210=0\frac{(10-10)^2}{10} = 0. Sum: 2.50+0.833+1.25+0=4.583≈4.582.50 + 0.833 + 1.25 + 0 = 4.583 \approx 4.58.

Loading workspace…