UNIHIVE

Study Hub UNIPORT AGR 204

AGR 204 · Computer Applications to Agriculture

Statistical packages

What statistical software does, common packages, descriptive statistics, t-tests and analysis of variance, and reading the output.

Our notes

2 min read

Why use a package

Packages compute summaries and tests quickly and without arithmetic slips, handle large data sets, and draw graphs. You must still choose the right test and interpret the output.

Common packages

PackageNotes
Excel / Calc (Data Analysis ToolPak)Descriptive statistics, t-tests, simple ANOVA and regression
SPSSMenus; common for surveys in social and extension research
R (with RStudio)Free, powerful, uses commands; many agricultural packages
GenStatDesigned for agricultural experiments
SAS, Stata, Minitab, JASPOthers met in research

Descriptive statistics

Mean, median, mode, range, variance, standard deviation (SD), coefficient of variation (CV = SD ÷ mean × 100). Spreadsheet: =AVERAGE(), =MEDIAN(), =STDEV.S().
Example: weights 2.0, 2.4, 2.2, 2.6, 2.3 kg. Mean = 11.5 ÷ 5 = 2.3. Deviations −0.3, 0.1, −0.1, 0.3, 0: squares sum = 0.09 + 0.01 + 0.01 + 0.09 + 0 = 0.20. SD = √(0.20 ÷ 4) = √0.05 ≈ 0.224 kg; CV ≈ 9.7%.

Comparing means

  • t-test: two treatments (new feed vs old).
  • One-way ANOVA: three or more treatments (fertiliser rates).
  • If ANOVA is significant, a mean separation test (LSD, Duncan's, Tukey) shows which treatments differ.
  • Correlation and regression: relationship between two variables (fertiliser rate and yield).
  • Chi-square: association between categories (adoption and education level) in surveys.

Worked example: one-way ANOVA by hand

Maize yield (t/ha), three fertiliser rates, three plots each: A: 4, 5, 6 (mean 5); B: 6, 7, 8 (mean 7); C: 8, 9, 10 (mean 9). Grand mean 7.

  • Between groups SS = 3[(5 − 7)² + (7 − 7)² + (9 − 7)²] = 3 × 8 = 24, df = 2, mean square = 12.
  • Within groups SS = (1 + 0 + 1) × 3 = 6, df = 6, mean square = 1.
  • F = 12 ÷ 1 = 12. The table value of F(2, 6) at 5% is about 5.14, so the rates differ significantly.

Check: total SS = sum of (each value − 7)² = 9+4+1 + 1+0+1 + 1+4+9 = 30 = 24 + 6 ✓.

Reading output

Look for the test statistic, degrees of freedom and the p-value: p < 0.05 is usually called significant. Report means with SD or standard error, and say which test you used.

Exams usually ask: name statistical packages and their uses; compute mean, SD and CV; choose a test for a given experiment; interpret a p-value or an ANOVA table.

Common mistake: running several t-tests between three or more treatments instead of one ANOVA. Multiple t-tests raise the chance of a false "significant" result.

Written by the UniHive team in our own words. Spotted a mistake? Tell us on WhatsApp.

Read

Watch

We link to free material and never copy it. Every link was opened by our team before it went up; video data is a rough guide at 360p.

All AGR 204 topics

Report

Sign in to report this. It is free.

Is this your work (a lecturer, author or publisher)? Ask us to take it down.