Resources

An environmental bioassay is conducted to assess the toxicological impact of municipal wastewater chlorination byproducts on stream macroinvertebrates. An upstream reference station and an effluent-impacted downstream station are surveyed using Surber net kick-sampling. A total of N=250N = 250 individuals are collected downstream and categorized across four pollution-tolerance indicator taxa: Ephemeroptera (mayflies, intolerant), Trichoptera (caddisflies, moderately intolerant), Chironomidae (non-biting midges, tolerant), and Tubificidae (sludge worms, highly tolerant). Historical baseline ecological records from the unimpacted reference station indicate the expected proportion of individuals across these four taxa to be 40.0%40.0\%, 30.0%30.0\%, 20.0%20.0\%, and 10.0%10.0\%, respectively. The observed downstream collection yields 3535 Ephemeroptera, 4545 Trichoptera, 9595 Chironomidae, and 7575 Tubificidae. Perform a chi-square (χ2\chi^2) goodness-of-fit test at significance level α=0.01\alpha = 0.01 (critical value χcrit2=11.345\chi^2_{\text{crit}} = 11.345 for df=3df = 3): compute the test statistic χ2\chi^2, and state the explicit formal statistical hypothesis conclusion regarding community composition shift.

Answer and steps

Final answer

χ2=194.75\chi^2 = 194.75; Reject H0H_0 at α=0.01\alpha = 0.01 (Statistically significant shift in community structure due to wastewater effluent)

Steps

01

Formulate the Statistical Hypotheses

Let p1,p2,p3,p_1, p_2, p_3, and p4p_4 represent the true downstream proportions of Ephemeroptera, Trichoptera, Chironomidae, and Tubificidae, respectively.

  • Null hypothesis (H0H_0): The downstream community follows the baseline unimpacted distribution (p1=0.40p_1 = 0.40, p2=0.30p_2 = 0.30, p3=0.20p_3 = 0.20, p4=0.10p_4 = 0.10). There is no significant change in community structure.
  • Alternative hypothesis (HaH_a): At least one proportion differs significantly from the baseline distribution, indicating a shift in community structure.

02

Calculate the Expected Counts (EiE_i)

Using the total downstream sample size N=250N = 250 and the reference baseline proportions, determine the expected number of individuals for each taxon:

  • Ephemeroptera: E1=0.40×250=100E_1 = 0.40 \times 250 = 100
  • Trichoptera: E2=0.30×250=75E_2 = 0.30 \times 250 = 75
  • Chironomidae: E3=0.20×250=50E_3 = 0.20 \times 250 = 50
  • Tubificidae: E4=0.10×250=25E_4 = 0.10 \times 250 = 25

03

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

The formula for the chi-square goodness-of-fit test is:

χ2=∑i=1k(Oi−Ei)2Ei\chi^2 = \sum_{i=1}^{k} \frac{(O_i - E_i)^2}{E_i}

where OiO_i is the observed count, EiE_i is the expected count, and k=4k = 4 is the number of categories.

Substitute the values for each taxon:

  • Ephemeroptera (O1=35O_1 = 35, E1=100E_1 = 100): (35−100)2100=(−65)2100=4225100=42.25\frac{(35 - 100)^2}{100} = \frac{(-65)^2}{100} = \frac{4225}{100} = 42.25
  • Trichoptera (O2=45O_2 = 45, E2=75E_2 = 75): (45−75)275=(−30)275=90075=12.00\frac{(45 - 75)^2}{75} = \frac{(-30)^2}{75} = \frac{900}{75} = 12.00
  • Chironomidae (O3=95O_3 = 95, E3=50E_3 = 50): (95−50)250=(45)250=202550=40.50\frac{(95 - 50)^2}{50} = \frac{(45)^2}{50} = \frac{2025}{50} = 40.50
  • Tubificidae (O4=75O_4 = 75, E4=25E_4 = 25): (75−25)225=(50)225=250025=100.00\frac{(75 - 25)^2}{25} = \frac{(50)^2}{25} = \frac{2500}{25} = 100.00

Summing all contributions:

χ2=42.25+12.00+40.50+100.00=194.75\chi^2 = 42.25 + 12.00 + 40.50 + 100.00 = 194.75


04

Compare with the Critical Value and Draw Conclusion

  • Degrees of freedom (dfdf): df=k−1=4−1=3df = k - 1 = 4 - 1 = 3.
  • Significance level: α=0.01\alpha = 0.01.
  • Critical value: χcrit2=11.345\chi^2_{\text{crit}} = 11.345.

Because the calculated test statistic far exceeds the critical value:

χ2=194.75>11.345\chi^2 = 194.75 > 11.345

we reject H0H_0 at the α=0.01\alpha = 0.01 significance level (p<0.001p < 0.001).

Ecological Conclusion: There is strong, statistically significant evidence of a community shift downstream of the wastewater outfall. The community shows a severe reduction in pollution-sensitive taxa (mayflies and caddisflies) and a massive proliferation of pollution-tolerant taxa (midges and sludge worms), consistent with severe organic and chemical water pollution.

Common Pitfall: Never insert percentages or relative frequencies directly into the χ2\chi^2 formula; only use whole counts (observed counts and calculated absolute expected counts), as chi-square requires frequencies to evaluate sample variance correctly.

Typical errors

OverviewACEpath Teacher's Diagnosis

01 The student treats the expected baseline percentages directly as expected counts instead of multiplying by the total sample size N = 250, yielding an incorrect test statistic of 711.875.

Sample Student Work

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

    E:Ephemeroptera=40,  Trichoptera=30,  Chironomidae=20,  Tubificidae=10E: \text{Ephemeroptera} = 40,\; \text{Trichoptera} = 30,\; \text{Chironomidae} = 20,\; \text{Tubificidae} = 10

    Correct

    E1=0.40×250=100,  E2=0.30×250=75,  E3=0.20×250=50,  E4=0.10×250=25E_1 = 0.40 \times 250 = 100,\; E_2 = 0.30 \times 250 = 75,\; E_3 = 0.20 \times 250 = 50,\; E_4 = 0.10 \times 250 = 25

    You treated the expected percentage values (40%40\%, 30%30\%, 20%20\%, 10%10\%) directly as raw counts instead of multiplying each proportion by the total downstream sample size (N=250N = 250).

  2. Step 2

    χ2=(35−40)240+(45−30)230+(95−20)220+(75−10)210  ⟹  χ2=2540+22530+562520+422510  ⟹  χ2=0.625+7.5+281.25+422.5=711.875\chi^2 = \frac{(35-40)^2}{40} + \frac{(45-30)^2}{30} + \frac{(95-20)^2}{20} + \frac{(75-10)^2}{10} \implies \chi^2 = \frac{25}{40} + \frac{225}{30} + \frac{5625}{20} + \frac{4225}{10} \implies \chi^2 = 0.625 + 7.5 + 281.25 + 422.5 = 711.875

    Correct

    χ2=(35−100)2100+(45−75)275+(95−50)250+(75−25)225=42.25+12.00+40.50+100.00=194.75\chi^2 = \frac{(35-100)^2}{100} + \frac{(45-75)^2}{75} + \frac{(95-50)^2}{50} + \frac{(75-25)^2}{25} = 42.25 + 12.00 + 40.50 + 100.00 = 194.75

    You correctly set up the chi-square summation ∑(O−E)2E\sum \frac{(O-E)^2}{E} and computed each term without arithmetic mistakes, but your numerical result was distorted by using the unscaled expected counts from the previous step.

  3. Step 3

    711.875>11.345711.875 > 11.345, so reject the null hypothesis; community composition significantly shifted.

    Correct

    Because χ2=194.75>11.345\chi^2 = 194.75 > 11.345, reject H0H_0; there is a statistically significant shift in macroinvertebrate community composition downstream.

    You correctly compared your calculated test statistic to the critical value and drew the correct ecological conclusion, though the test statistic itself was based on incorrect expected frequencies.

WHAT YOU DID WELL
Compliments from Your Teacher

You correctly identified and applied the chi-square goodness-of-fit formula ∑(O−E)2E\sum \frac{(O - E)^2}{E}.

You performed all intermediate divisions and summations accurately.

You correctly compared the test statistic against the critical value (11.34511.345) and stated the appropriate hypothesis rejection and biological conclusion.

THE ERROR
Where Your ACEpath Teacher Spotted the Mistake
Expected Count vs. Percentage Confusion

You treated the reference percentage values directly as raw expected counts without scaling them by the sample size N=250N = 250.

WHY IT HAPPENED
ACEpath Teacher's Diagnosis

A chi-square goodness-of-fit test evaluates sampling variation in raw count data, requiring that the expected frequencies sum to the total sample size (N=∑Ei=∑OiN = \sum E_i = \sum O_i). Treating percentages as counts implicitly assumes N=100N = 100, which breaks sample-size proportionality and artificially inflates the test statistic.

REASONING PATH
Your ACEpath teacher’s suggested approach
Expected Counts Sum to Sample Size
  • Before calculating (Oi−Ei)2/Ei(O_i - E_i)^2 / E_i, always verify that ∑Ei=N\sum E_i = N.

  • Multiply each reference baseline proportion pip_i by the total sample size: Ei=pi×NE_i = p_i \times N.

CORRECTED PATH
ACEpath Teacher's Demonstration
  1. Calculate the correct expected counts using N=250N = 250: EEphem=0.40×250=100E_{\text{Ephem}} = 0.40 \times 250 = 100, ETrich=0.30×250=75E_{\text{Trich}} = 0.30 \times 250 = 75, EChiro=0.20×250=50E_{\text{Chiro}} = 0.20 \times 250 = 50, and ETubif=0.10×250=25E_{\text{Tubif}} = 0.10 \times 250 = 25.

  2. Compute each taxon contribution: (35−100)2100=42.25\frac{(35-100)^2}{100} = 42.25, (45−75)275=12.00\frac{(45-75)^2}{75} = 12.00, (95−50)250=40.50\frac{(95-50)^2}{50} = 40.50, and (75−25)225=100.00\frac{(75-25)^2}{25} = 100.00.

  3. Sum the contributions: χ2=42.25+12.00+40.50+100.00=194.75\chi^2 = 42.25 + 12.00 + 40.50 + 100.00 = 194.75.

  4. Compare to the critical value: since 194.75>11.345194.75 > 11.345, reject H0H_0 at α=0.01\alpha = 0.01.

Final answer

χ2=194.75\chi^2 = 194.75; Reject H0H_0 at α=0.01\alpha = 0.01 (Statistically significant shift in community structure due to wastewater effluent)

NEXT STEPS
Final Takeaways from Your Teacher
  • Always write down the formula Ei=pi×NE_i = p_i \times N before calculating any expected cell values.

  • Perform a quick checksum: add up your expected values ∑Ei\sum E_i to ensure they equal the total observed sample size ∑Oi\sum O_i before computing χ2\chi^2.

OverviewACEpath Teacher's Diagnosis

02 The student assumes equal expected frequencies across all four categories rather than using the baseline proportions, resulting in χ² = 36.4.

Sample Student Work

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

    E=2504=62.5E = \frac{250}{4} = 62.5 for each taxon

    Correct

    E1=0.40×250=100E_1 = 0.40 \times 250 = 100, E2=0.30×250=75E_2 = 0.30 \times 250 = 75, E3=0.20×250=50E_3 = 0.20 \times 250 = 50, E4=0.10×250=25E_4 = 0.10 \times 250 = 25

    You assumed an equal distribution across all four taxa, but the problem specified historical baseline proportions of 40.0%40.0\%, 30.0%30.0\%, 20.0%20.0\%, and 10.0%10.0\%. Each expected count must be calculated as Ei=pi×NE_i = p_i \times N.

  2. Step 2

    χ2=(35−62.5)262.5+(45−62.5)262.5+(95−62.5)262.5+(75−62.5)262.5  ⟹  χ2=756.2562.5+306.2562.5+1056.2562.5+156.2562.5  ⟹  χ2=12.1+4.9+16.9+2.5=36.4\chi^2 = \frac{(35-62.5)^2}{62.5} + \frac{(45-62.5)^2}{62.5} + \frac{(95-62.5)^2}{62.5} + \frac{(75-62.5)^2}{62.5} \implies \chi^2 = \frac{756.25}{62.5} + \frac{306.25}{62.5} + \frac{1056.25}{62.5} + \frac{156.25}{62.5} \implies \chi^2 = 12.1 + 4.9 + 16.9 + 2.5 = 36.4

    Correct

    χ2=(35−100)2100+(45−75)275+(95−50)250+(75−25)225=42.25+12.00+40.50+100.00=194.75\chi^2 = \frac{(35-100)^2}{100} + \frac{(45-75)^2}{75} + \frac{(95-50)^2}{50} + \frac{(75-25)^2}{25} = 42.25 + 12.00 + 40.50 + 100.00 = 194.75

    You applied the formula ∑(O−E)2E\sum \frac{(O - E)^2}{E} correctly with your numbers, but your result was distorted because you substituted the incorrect expected count E=62.5E = 62.5 into every term.

  3. Step 3

    36.4>11.34536.4 > 11.345, so reject the null hypothesis; downstream community composition shows a significant shift.

    Correct

    194.75>11.345194.75 > 11.345, so reject H0H_0 at α=0.01\alpha = 0.01; there is a statistically significant shift in community structure downstream.

    Your decision rule and interpretation were logically sound, but the conclusion relied on the incorrect test statistic of 36.436.4 rather than 194.75194.75.

WHAT YOU DID WELL
Compliments from Your Teacher

You correctly remembered and applied the general chi-square formula ∑(Oi−Ei)2Ei\sum \frac{(O_i - E_i)^2}{E_i}.

You accurately performed the arithmetic operations of squaring differences and dividing by expected counts.

You correctly identified the critical value comparison rule: reject H0H_0 when χ2>χcrit2\chi^2 > \chi^2_{\text{crit}}.

THE ERROR
Where Your ACEpath Teacher Spotted the Mistake
Incorrect Expected Frequency Assumption

no

WHY IT HAPPENED
ACEpath Teacher's Diagnosis

Defaulting to an equal-proportions model (E=N/kE = N/k) for a goodness-of-fit test without checking whether the problem provides a specific baseline or theoretical probability distribution (p1,p2,…,pkp_1, p_2, \dots, p_k).

REASONING PATH
Your ACEpath teacher’s suggested approach
Identify the Null Distribution Model
  • In a chi-square goodness-of-fit test, check if H0H_0 specifies equal proportions (pi=1/kp_i = 1/k) or unequal reference proportions (p1,p2,…p_1, p_2, \dots).

  • Look for given percentages, ratios, or historical baseline data before computing expected counts.

Calculate Category-Specific Expected Counts
  • For each category ii, Ei=N×piE_i = N \times p_i, where ∑Ei=N\sum E_i = N.

  • Multiply the total sample count by each individual taxon proportion separately rather than dividing NN by the number of categories.

CORRECTED PATH
ACEpath Teacher's Demonstration
  1. Calculate the correct expected counts using baseline proportions: E1=0.40×250=100E_1 = 0.40 \times 250 = 100, E2=0.30×250=75E_2 = 0.30 \times 250 = 75, E3=0.20×250=50E_3 = 0.20 \times 250 = 50, and E4=0.10×250=25E_4 = 0.10 \times 250 = 25.

  2. Compute each component of the test statistic: (35−100)2100=42.25\frac{(35-100)^2}{100} = 42.25, (45−75)275=12.00\frac{(45-75)^2}{75} = 12.00, (95−50)250=40.50\frac{(95-50)^2}{50} = 40.50, and (75−25)225=100.00\frac{(75-25)^2}{25} = 100.00.

  3. Sum the components: χ2=42.25+12.00+40.50+100.00=194.75\chi^2 = 42.25 + 12.00 + 40.50 + 100.00 = 194.75.

  4. Compare to the critical value: since 194.75>11.345194.75 > 11.345, reject H0H_0 at α=0.01\alpha = 0.01.

Final answer

χ2=194.75\chi^2 = 194.75; Reject H0H_0 at α=0.01\alpha = 0.01 (Statistically significant shift in community structure due to wastewater effluent)

NEXT STEPS
Final Takeaways from Your Teacher
  • Review how to distinguish uniform null hypotheses from non-uniform reference baseline distributions in ecology and genetics.

  • Practice calculating expected counts directly from non-uniform percentages before setting up the chi-square summation table.

OverviewACEpath Teacher's Diagnosis

03 The student omits squaring the differences between observed and expected frequencies in the numerator, producing χ² = 1.85 and incorrectly concluding that community composition did not change.

Sample Student Work

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

    E=[100,75,50,25]E = [100, 75, 50, 25]

  2. Step 2

    χ2=(35−100)/100+(45−75)/75+(95−50)/50+(75−25)/25  ⟹  χ2=−65/100−30/75+45/50+50/25  ⟹  χ2=−0.65−0.40+0.90+2.00=1.85\chi^2 = (35-100)/100 + (45-75)/75 + (95-50)/50 + (75-25)/25 \implies \chi^2 = -65/100 - 30/75 + 45/50 + 50/25 \implies \chi^2 = -0.65 - 0.40 + 0.90 + 2.00 = 1.85

    Correct

    χ2=∑(Oi−Ei)2Ei=(−65)2100+(−30)275+45250+50225=42.25+12.00+40.50+100.00=194.75\chi^2 = \sum \frac{(O_i - E_i)^2}{E_i} = \frac{(-65)^2}{100} + \frac{(-30)^2}{75} + \frac{45^2}{50} + \frac{50^2}{25} = 42.25 + 12.00 + 40.50 + 100.00 = 194.75

    You omitted the square on each (Oi−Ei)(O_i - E_i) difference term in the numerator. The chi-square formula requires squaring each deviation before dividing by the expected frequency, ensuring all terms are non-negative.

  3. Step 3

    1.85<11.3451.85 < 11.345, so fail to reject the null hypothesis; there is no significant shift in community composition.

    Correct

    χ2=194.75>11.345\chi^2 = 194.75 > 11.345, so reject H0H_0 at α=0.01\alpha = 0.01; there is a statistically significant shift in community composition.

    Your comparison logic followed your computed value, but because the test statistic was calculated without squared deviations, you reached the opposite biological conclusion.

WHAT YOU DID WELL
Compliments from Your Teacher

You accurately converted baseline percentages into expected counts based on N=250N = 250.

You correctly matched each observed taxon count to its corresponding expected category.

You correctly identified the critical value χcrit2=11.345\chi^2_{\text{crit}} = 11.345 and understood the general decision rule for a goodness-of-fit test.

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

You wrote Oi−EiEi\frac{O_i - E_i}{E_i} instead of (Oi−Ei)2Ei\frac{(O_i - E_i)^2}{E_i} when setting up the summation.

WHY IT HAPPENED
ACEpath Teacher's Diagnosis

Forgetting that chi-square measures squared standardized distance causes negative deviations to cancel positive deviations. Every component in a chi-square sum must be non-negative.

REASONING PATH
Your ACEpath teacher’s suggested approach
Formula Structure
  • The goodness-of-fit statistic is χ2=∑(O−E)2E\chi^2 = \sum \frac{(O - E)^2}{E}.

  • Always write down the explicit formula with the square in the numerator before substituting numbers.

Sign Sanity Check
  • Every individual category contribution (Oi−Ei)2Ei\frac{(O_i - E_i)^2}{E_i} must be ≥0\ge 0.

  • If you see negative numbers such as −0.65-0.65 or −0.40-0.40 in your sum, pause immediately—a squared term can never be negative.

CORRECTED PATH
ACEpath Teacher's Demonstration
  1. Write the definition with squares: χ2=∑i=14(Oi−Ei)2Ei\chi^2 = \sum_{i=1}^4 \frac{(O_i - E_i)^2}{E_i}.

  2. Compute squared deviations divided by expected counts: (−65)2100=42.25\frac{(-65)^2}{100} = 42.25, (−30)275=12.00\frac{(-30)^2}{75} = 12.00, 45250=40.50\frac{45^2}{50} = 40.50, and 50225=100.00\frac{50^2}{25} = 100.00.

  3. Sum the taxon components: χ2=42.25+12.00+40.50+100.00=194.75\chi^2 = 42.25 + 12.00 + 40.50 + 100.00 = 194.75.

  4. Compare with the critical threshold: 194.75>11.345194.75 > 11.345.

Final answer

χ2=194.75\chi^2 = 194.75; Reject H0H_0 at α=0.01\alpha = 0.01. There is a statistically significant shift in macroinvertebrate community composition.

NEXT STEPS
Final Takeaways from Your Teacher
  • Re-evaluate the component terms using squared numerators to verify that all contributions are positive.

  • Practice computing one category at a time on small datasets to build the habit of writing (O−E)2(O - E)^2 explicitly.

Lock it in

Similar question

01

An estuary sampling survey captures N=200N = 200 fish across three species with historical baseline proportions of 50%50\% Species A, 30%30\% Species B, and 20%20\% Species C. If the observed counts are 8080 Species A, 7070 Species B, and 5050 Species C, calculate the expected counts for each species and the resulting chi-square test statistic χ2\chi^2.

Answer

EA=0.50×200=100E_A = 0.50 \times 200 = 100, EB=0.30×200=60E_B = 0.30 \times 200 = 60, EC=0.20×200=40E_C = 0.20 \times 200 = 40. χ2=(80−100)2100+(70−60)260+(50−40)240=400100+10060+10040=4+1.67+2.50=8.17\chi^2 = \frac{(80-100)^2}{100} + \frac{(70-60)^2}{60} + \frac{(50-40)^2}{40} = \frac{400}{100} + \frac{100}{60} + \frac{100}{40} = 4 + 1.67 + 2.50 = 8.17

02

A forest disturbance survey observes 180180 birds across four feeding guilds. The expected ratios from a mature old-growth forest are 4:3:2:14:3:2:1 for insectivores, granivores, frugivores, and raptors, respectively. Calculate the expected count of frugivores in this disturbed forest patch.

Answer

The total ratio parts equal 4+3+2+1=104 + 3 + 2 + 1 = 10. The expected proportion of frugivores is 210=0.20\frac{2}{10} = 0.20. Expected count E=0.20×180=36E = 0.20 \times 180 = 36 frugivores.

03

In a benthic biomonitoring study with N=500N = 500 macroinvertebrates, an analyst erroneously plugged the expected baseline percentage (25%25\%) directly as E=25E = 25 instead of the true expected count for a taxon with O=110O = 110. Compute both the erroneous single-cell contribution (O−25)225\frac{(O - 25)^2}{25} and the true single-cell contribution (O−Etrue)2Etrue\frac{(O - E_{\text{true}})^2}{E_{\text{true}}}, and find the difference between them.

Answer

True expected count: Etrue=0.25×500=125E_{\text{true}} = 0.25 \times 500 = 125. Erroneous component: (110−25)225=85225=722525=289.00\frac{(110 - 25)^2}{25} = \frac{85^2}{25} = \frac{7225}{25} = 289.00. True component: (110−125)2125=(−15)2125=225125=1.80\frac{(110 - 125)^2}{125} = \frac{(-15)^2}{125} = \frac{225}{125} = 1.80. Difference: 289.00−1.80=287.20289.00 - 1.80 = 287.20.

Loading workspace…