Statistical Methods for Agricultural Sciences

Agricultural Statistics & Data Science · Foundations · also Statistical Methods (UG), Agricultural Statistics (BSc Ag), Statistical Methods for Applied Sciences (minor course)

14units
11chapters
7,578words
114practice questions

The first statistics course of every agricultural degree, which is also the statistics unit of AIEEA-PG Group 07: frequency distributions, averages and dispersion, probability and the three named distributions, tests of significance, correlation and regression, and the CRD and RBD. Laisha teaches it to the depth the entrance examines; the Veterinary, Agribusiness and Agricultural Engineering tracks have their own introductory versions.

In the exams: AIEEA-PG Group 07 statistics unit (heavy: the whole unit); AICE-JRF Agronomy Unit 6 and other agricultural subjects' statistics units (present); ASRB NET general statistics (present); SSC CGL JSO statistics paper (heavy)

Syllabus

  1. Statistics: definition, uses and limitations; frequency distributions and curves
  2. Measures of central tendency: arithmetic, geometric and harmonic means, median and mode
  3. Measures of dispersion: range, mean deviation, quartile deviation, variance and coefficient of variation
  4. Skewness, kurtosis and moments
  5. Probability: addition and multiplication laws, conditional probability and Bayes' theorem
  6. Binomial, Poisson and normal distributions in agricultural data
  7. Random sampling and standard error
  8. Tests of significance: errors, null hypothesis and level of significance
  9. Large-sample (SND) tests for one and two means
  10. Student's t-test: one sample, two samples and paired
  11. F-test for equality of variances
  12. Chi-square tests for goodness of fit and independence of attributes
  13. Correlation and regression and their tests of significance
  14. Basic principles of experimental design, ANOVA, CRD and RBD

Study manual

Statistical methods are the tools an agricultural scientist uses to turn measurements into conclusions: how much a new variety yields, whether a fertiliser dose raised it, how variable milk yield is in a herd, whether pest counts follow a pattern. This manual is the first statistics course of an agricultural degree, written to the depth that national agricultural postgraduate entrance examinations and junior statistical-officer papers examine it, and with the agricultural context those examinations use in their questions.

The course moves in a fixed order. It starts with what statistics is and how raw data become frequency distributions; then summarises a distribution by its centre (means, median, mode), its spread (range, deviations, variance, coefficient of variation) and its shape (moments, skewness, kurtosis). Probability supplies the language of chance, and three named distributions (binomial, Poisson and normal) model counts, rare events and continuous measurements. Sampling and the standard error connect a sample to its population, and tests of significance (the standard normal test, Student's t, F and chi-square) decide whether observed differences are larger than chance would produce. Correlation and regression measure and model relationships. The final chapter introduces the three principles of experimental design and the analysis of variance for the completely randomised and randomised block designs.

Every examination that includes this material, from master's entrance tests for agricultural graduates to statistical-officer recruitment in many countries, asks the same kinds of item: a definition, a one-step computation (a coefficient of variation, a standard error, a t or chi-square value, an ANOVA entry), the choice of the right test for a described situation, and the reading of a result. The manual gives every formula with its conditions of use and works the computations in words so that they can be followed without tables. Critical values quoted here are the standard tabulated ones; questions state any other value they need.

1. Statistics, data and frequency distributions

What statistics is, its uses and limitations

The word statistics has two meanings. In the plural it means numerical facts collected systematically: the area under maize in a district, the milk yield of each cow in a herd, the monthly rainfall at a station. In the singular it means the science of collecting, organising, summarising, analysing and interpreting such data, and of drawing conclusions under uncertainty. R. A. Fisher, who worked at an agricultural research station, built much of modern statistics on field-trial problems, and agriculture has remained one of its main users.

Statistics is used in agriculture to estimate crop area and production, compare varieties, fertilisers and pesticides in experiments, measure genetic variation and heritability in breeding, forecast yields and prices, evaluate development programmes, and set quality standards for seed and produce.

Its limitations are as important as its uses. Statistics deals with aggregates, not individuals: the mean yield of a variety says nothing certain about one plot. It deals with quantitative data, or with qualitative data only after counting or scoring them. Statistical laws are true on average and in the long run, not in every case. And statistics can be misused: a biased sample, an unsuitable average or a misleading graph gives wrong conclusions however careful the arithmetic. A conclusion is only as good as the data and the design behind it.

Data are primary when collected by the investigator for the purpose in hand (a crop-cutting experiment, a field trial) and secondary when taken from records collected by someone else (published production statistics, weather records). A variable is a characteristic that varies from unit to unit. It is qualitative (an attribute such as variety name or disease presence) or quantitative; quantitative variables are discrete (number of tillers, number of eggs) or continuous (plant height, grain weight).

Classification, frequency distributions and curves

Raw data are first classified: arranged into groups with common characteristics. Classification may be geographical (by region), chronological (by year), qualitative (by attribute) or quantitative (by class intervals of a variable). A frequency distribution lists the classes and the number of observations, the frequency, in each.

For a continuous variable, classes are intervals. Each class has lower and upper limits, a width (class interval) and a mid-value (the average of the limits). In the exclusive method, the upper limit of one class is the lower limit of the next (10-20, 20-30), and a value equal to a limit goes to the higher class. In the inclusive method, both limits belong to the class (10-19, 20-29); for calculations the limits are converted to true class boundaries by subtracting and adding half the gap (9.5-19.5, 19.5-29.5). Sturges' rule suggests about 1 + 3.322 log₁₀ N classes for N observations; in practice 5 to 15 classes are used, of equal width where possible.

Cumulative frequency gives the number of observations below an upper boundary (less-than type) or above a lower boundary (more-than type). Relative frequency divides each frequency by N.

Distributions are displayed by graphs. A histogram draws adjacent rectangles whose areas are proportional to the class frequencies (so with unequal widths, heights are frequency divided by width). A frequency polygon joins the mid-points of the tops of the rectangles. A frequency curve is the smooth curve the polygon approaches as the number of observations grows and classes narrow. An ogive is the graph of cumulative frequency; the less-than and more-than ogives intersect at the median. Bar diagrams and pie charts display qualitative or discrete data.

Frequency curves take characteristic shapes: symmetrical bell-shaped (plant height in a uniform crop), moderately skewed (yields with a few high values), J-shaped or reverse J-shaped (numbers of insects per leaf with many zeros), U-shaped, and bimodal (a mixture of two populations, such as two varieties harvested together).

Remember

2. Measures of central tendency

The arithmetic mean and its properties

An average is a single value that represents the centre of a distribution. Yule listed the properties of a good average: it should be rigidly defined, based on all observations, easy to understand and compute, capable of further algebraic treatment, little affected by sampling fluctuation and not unduly affected by extreme values. No average satisfies all of them; each suits some data.

The arithmetic mean (AM) is the sum of the observations divided by their number: x̄ = Σx/n. For a frequency distribution, x̄ = Σfx/N, where x is the class mid-value. The step-deviation method simplifies hand calculation: with assumed mean A and class width h, put d = (x − A)/h; then x̄ = A + h·Σfd/N.

The mean has three properties used constantly. First, the sum of deviations from the mean is zero: Σ(x − x̄) = 0. Second, the sum of squared deviations is least when taken about the mean, which is why variance is defined about the mean. Third, the combined mean of two groups of sizes n₁ and n₂ with means x̄₁ and x̄₂ is (n₁x̄₁ + n₂x̄₂)/(n₁ + n₂). The mean also changes predictably under a linear change of scale: if y = a + bx then ȳ = a + bx̄.

The mean is based on all observations and suits further algebra, which is why tests and analysis of variance use it. Its weakness is sensitivity to extreme values: one plot with an exceptional yield can pull the mean far from typical plots. It cannot be computed for open-ended classes without assumptions, and it can be a value no observation takes (2.4 calves per cow).

A weighted mean, Σwx/Σw, is used when observations differ in importance: the average price of rice across markets weighted by quantity sold, or average yield across districts weighted by area. The unweighted mean of district yields is not the state yield unless all districts have equal area.

Geometric and harmonic means

The geometric mean (GM) of n positive values is the nth root of their product, GM = (x₁x₂…xₙ)^(1/n), computed as the antilogarithm of the mean of the logarithms. It is the right average for rates of change and ratios: if a crop's area grows by factors of 1.10, 1.20 and 0.90 in three years, the average annual growth factor is the cube root of 1.10 × 1.20 × 0.90 = 1.188, which is about 1.059, or 5.9% a year, and not the arithmetic mean of 6.7%. The GM is used in index numbers and for averaging quantities that act multiplicatively, such as bacterial counts. It is undefined when any value is zero or negative.

The harmonic mean (HM) is the reciprocal of the mean of reciprocals: HM = n / Σ(1/x). It is the right average for rates when the numerator quantity is fixed: a tractor ploughing equal areas at 4 and 6 hectares per hour has an average rate of 2/(1/4 + 1/6) = 4.8 hectares per hour, not 5. Similarly, if equal sums of money buy a commodity at different prices, the average price is the HM of the prices.

For any set of positive values that are not all equal, AM > GM > HM; they are equal only when all values are equal. For two values, GM² = AM × HM. Thus for 4 and 9, AM = 6.5, GM = 6 and HM = 72/13 ≈ 5.54, and 6.5 × 5.54 = 36 = 6².

The choice of mean depends on how the quantities combine. Additive quantities (yields of plots to be totalled) use the AM; multiplicative changes (growth rates, ratios) the GM; rates over a fixed amount of the numerator (speed over a fixed distance, price for a fixed outlay) the HM.

Median, quartiles and mode

The median is the middle value when observations are arranged in order: for n odd it is the ((n + 1)/2)th value; for n even, the mean of the (n/2)th and (n/2 + 1)th values. For a grouped distribution, the median class is the one containing the (N/2)th observation, and Median = L + ((N/2 − cf)/f) × h, where L is the lower boundary of the median class, cf the cumulative frequency before it, f its frequency and h its width. Quartiles, deciles and percentiles are found the same way with N/4, 3N/4, N/10 and so on.

The median is not affected by extreme values and can be found for open-ended distributions and for ordinal data (disease grades). Its weaknesses are that it ignores the magnitudes of most observations and is less suited to algebra. The sum of absolute deviations is least when taken about the median.

The mode is the value that occurs most often, or for a grouped distribution the point of highest density: Mode = L + ((f₁ − f₀)/(2f₁ − f₀ − f₂)) × h, where f₁ is the modal-class frequency and f₀, f₂ the frequencies of the classes before and after. The mode is the only average for nominal data (the most common variety grown) and is the typical size in marketing (the most demanded shoe size, the most common landholding size). It can be ill-defined or multiple.

For a moderately skewed unimodal distribution, Karl Pearson's empirical relation holds approximately: Mode ≈ 3 Median − 2 Mean. In a symmetrical distribution, mean, median and mode coincide. With positive skew (a long right tail, as in farm incomes or landholding sizes) the order is mean > median > mode; with negative skew it is reversed. This is why a median income or holding size is often reported: a few very large values inflate the mean.

Remember

3. Measures of dispersion

Range, quartile deviation and mean deviation

Two herds can have the same mean milk yield and very different variability; two varieties the same mean yield and very different stability. Dispersion measures how widely observations scatter. Absolute measures are in the units of the data; relative measures (coefficients) are unit-free and allow comparison between variables or groups with different means.

The range is the largest minus the smallest value; its coefficient is (L − S)/(L + S). It is simple and used in quality control and for daily temperature, but depends on two extreme values only and grows with sample size.

The quartile deviation, or semi-interquartile range, is (Q₃ − Q₁)/2; its coefficient is (Q₃ − Q₁)/(Q₃ + Q₁). It ignores the outer quarters of the data, so it is robust to extremes and usable with open-ended classes, but ignores half the observations.

The mean deviation is the average of absolute deviations from an average, usually the mean or median: MD = Σ|x − A|/n. It is least when taken about the median. It uses all observations but discards signs by taking absolute values, which makes it awkward for algebra; for that reason it has largely given way to the standard deviation. Its coefficient is MD divided by the average about which it is computed.

For a normal distribution these measures stand in fixed ratios to the standard deviation σ: the quartile deviation is about 0.6745σ (roughly two-thirds of σ) and the mean deviation about 0.7979σ (roughly four-fifths of σ). A common examination item uses the approximation QD : MD : SD = 10 : 12 : 15.

Variance, standard deviation and the coefficient of variation

The variance is the mean of squared deviations from the mean, σ² = Σ(x − x̄)²/n, and the standard deviation (SD) is its positive square root. A computational form is σ² = Σx²/n − x̄². For a frequency distribution, σ² = Σf(x − x̄)²/N; with step deviations d = (x − A)/h, σ² = h²[Σfd²/N − (Σfd/N)²]. When a sample is used to estimate a population variance, the divisor n − 1 replaces n, giving s² = Σ(x − x̄)²/(n − 1), which is unbiased; examination questions say which is wanted, and many state 'sample variance' to mean the n − 1 form.

The variance is unaffected by a change of origin and scales with the square of a change of scale: if y = a + bx, then σᵧ² = b²σₓ² and σᵧ = |b|σₓ. Adding a constant to every yield leaves the SD unchanged; converting kilograms to quintals divides the SD by 100.

For two groups combined, the variance is σ² = [n₁(σ₁² + d₁²) + n₂(σ₂² + d₂²)]/(n₁ + n₂), where dᵢ is the difference between the group mean and the combined mean. The standard deviation of the first n natural numbers is √((n² − 1)/12).

The coefficient of variation (CV) is the SD as a percentage of the mean: CV = 100σ/x̄. It is unit-free and compares variability between series with different means or units. The series with the smaller CV is more consistent, more uniform or more stable. In field experiments the CV of the trial, 100 × √(error mean square)/grand mean, is a routine check on precision; what counts as an acceptable CV depends on the crop, trait and environment, so no single cut-off applies everywhere. The CV is meaningful only for ratio-scale variables with a positive mean; it is not used for temperature in degrees Celsius or for variables that can be negative.

Remember

4. Moments, skewness and kurtosis

Raw and central moments

Moments generalise the mean and variance. The rth raw moment about an arbitrary origin A is μ′ᵣ = Σ(x − A)ʳ/n; about zero it is Σxʳ/n. The rth central moment, about the mean, is μᵣ = Σ(x − x̄)ʳ/n. The first central moment is always zero, the second is the variance, the third measures asymmetry and the fourth measures peakedness or tail weight.

Central moments are obtained from raw moments about any origin by the standard relations: μ₂ = μ′₂ − μ′₁²; μ₃ = μ′₃ − 3μ′₂μ′₁ + 2μ′₁³; μ₄ = μ′₄ − 4μ′₃μ′₁ + 6μ′₂μ′₁² − 3μ′₁⁴. These are the formulas examined most often: a question gives the first four raw moments about some value and asks for the variance, or for β₁ and β₂.

Central moments do not depend on the origin, but they do depend on the scale: if y = (x − A)/h then μᵣ(x) = hʳ μᵣ(y). For grouped data, Sheppard's corrections adjust μ₂ and μ₄ for the grouping error introduced by treating every observation as sitting at its class mid-point (μ₂ corrected = μ₂ − h²/12). They apply only to continuous distributions with tails tapering to zero at both ends.

Moments are the basis of the method of moments for fitting distributions and of the shape coefficients below. They are also the natural link to the moment generating function in probability theory, where the rth raw moment is the rth derivative of the generating function at zero.

Skewness and kurtosis

Skewness is lack of symmetry. A distribution is positively skewed when its right tail is longer (mean > median > mode) and negatively skewed when its left tail is longer (mean < median < mode).

Karl Pearson's coefficient of skewness is Sk = (Mean − Mode)/σ, or, using the empirical relation, Sk = 3(Mean − Median)/σ. It usually lies between −1 and +1 in practice; the median form is bounded by −3 and +3. Bowley's coefficient uses quartiles: Sk_B = (Q₃ + Q₁ − 2·Median)/(Q₃ − Q₁), which lies between −1 and +1 and suits open-ended distributions. The moment coefficient is β₁ = μ₃²/μ₂³, with γ₁ = √β₁ carrying the sign of μ₃. For a symmetric distribution μ₃ = 0 and β₁ = 0.

Kurtosis describes the peakedness of a distribution relative to the normal, or more precisely the weight of its tails. Pearson's coefficient is β₂ = μ₄/μ₂², and γ₂ = β₂ − 3 is the excess kurtosis. For the normal distribution β₂ = 3 (γ₂ = 0), called mesokurtic. A distribution with β₂ > 3 is leptokurtic (more peaked, heavier tails; the t distribution with few degrees of freedom is an example), and with β₂ < 3 platykurtic (flatter; the uniform distribution has β₂ = 1.8).

In agricultural data, counts of insects per plant, weed densities and farm incomes are typically positively skewed; percentages close to 100 (germination of good seed lots) are negatively skewed. Strong skewness warns that the mean is a poor summary and that tests assuming normality may need a transformation (logarithm for positively skewed multiplicative data, square root for counts, angular for percentages), which is taken up again with the analysis of variance.

Remember

5. Probability and Bayes' theorem

Approaches to probability and the basic laws

A random experiment is one whose outcome cannot be predicted with certainty: tossing a coin, germinating a seed, sampling a plant for disease. The set of all possible outcomes is the sample space and an event is a subset of it. Events are mutually exclusive if they cannot occur together, exhaustive if together they cover the sample space, and independent if the occurrence of one does not change the probability of the other.

The classical definition gives P(A) = m/n when an experiment has n equally likely, mutually exclusive and exhaustive outcomes of which m favour A. It fails when outcomes are not equally likely or not finite. The relative-frequency (statistical) definition takes P(A) as the limit of the proportion of trials in which A occurs as the number of trials grows: the germination probability of a seed lot is estimated from the proportion germinating in a test. The axiomatic definition of Kolmogorov requires only that P(A) ≥ 0, P(S) = 1, and that probabilities of mutually exclusive events add.

The addition law: P(A ∪ B) = P(A) + P(B) − P(A ∩ B); for mutually exclusive events the last term is zero. For three events, P(A ∪ B ∪ C) = ΣP(A) − ΣP(A ∩ B) + P(A ∩ B ∩ C). The complement rule, P(not A) = 1 − P(A), often shortens work: the probability that at least one of five independent seeds germinates, each with probability 0.8, is 1 − 0.2⁵ = 0.99968.

The multiplication law: P(A ∩ B) = P(A)·P(B | A), where P(B | A) = P(A ∩ B)/P(A) is the conditional probability of B given A. For independent events, P(A ∩ B) = P(A)·P(B). Independence and mutual exclusiveness are different: two mutually exclusive events with non-zero probabilities cannot be independent, because if one occurs the other cannot.

Counting rules support the classical approach. The number of ways of arranging r items from n is ⁿPᵣ = n!/(n − r)!; of choosing r from n without regard to order, ⁿCᵣ = n!/(r!(n − r)!).

Total probability and Bayes' theorem

If events B₁, B₂, …, Bₖ are mutually exclusive and exhaustive (a partition), then for any event A the theorem of total probability gives P(A) = Σ P(Bᵢ)P(A | Bᵢ). Bayes' theorem reverses the conditioning: P(Bᵢ | A) = P(Bᵢ)P(A | Bᵢ) / Σⱼ P(Bⱼ)P(A | Bⱼ). P(Bᵢ) are the prior probabilities, P(A | Bᵢ) the likelihoods, and P(Bᵢ | A) the posterior probabilities.

A seed example shows the use. A seed company buys seed from three growers, who supply 50%, 30% and 20% of the stock. The proportions of off-type seed in their lots are 2%, 3% and 5%. The probability that a randomly drawn seed is off-type is 0.5 × 0.02 + 0.3 × 0.03 + 0.2 × 0.05 = 0.010 + 0.009 + 0.010 = 0.029. Given that a seed is off-type, the probability that it came from the third grower is 0.010/0.029, about 0.345, much more than that grower's 20% share, because that grower's lots have the highest off-type rate.

Diagnostic testing is the other standard application. If a disease affects 1% of animals and a test detects it with sensitivity 95% and gives a negative result in healthy animals with specificity 90%, the probability that an animal with a positive result is actually diseased is (0.01 × 0.95)/(0.01 × 0.95 + 0.99 × 0.10) = 0.0095/0.1085, about 0.088. The low prevalence makes most positives false, a result students routinely underestimate.

Bayes' theorem is also the foundation of Bayesian inference, in which prior beliefs about a parameter are updated by data; that approach is covered in the separate subject on Bayesian inference.

Remember

6. Binomial, Poisson and normal distributions

Binomial and Poisson distributions

The binomial distribution counts successes in n independent trials, each with the same probability p of success (Bernoulli trials). The probability of exactly x successes is P(x) = ⁿCₓ pˣ qⁿ⁻ˣ, x = 0, 1, …, n, with q = 1 − p. Its mean is np and variance npq, so the variance is always less than the mean. The distribution is symmetric when p = 0.5, positively skewed when p < 0.5 and negatively skewed when p > 0.5. Agricultural examples: the number of germinating seeds out of 10 sown per hill, the number of infected plants in a sample of 20, the number of female calves in a set of births. The binomial assumptions fail when plants in a row infect each other (trials not independent) or when the probability changes across trials.

Fitting a binomial to observed frequencies uses the mean: p̂ = x̄/n, and expected frequencies are N·P(x). The recurrence P(x + 1) = P(x)·((n − x)/(x + 1))·(p/q) speeds the computation.

The Poisson distribution is the limit of the binomial when n is large, p small and np = m finite. P(x) = e⁻ᵐ mˣ/x!, x = 0, 1, 2, …. Its mean and variance are both m, a property used to check whether counts are Poisson. It models rare events in a large number of opportunities: the number of weed seeds in a sample of crop seed, the number of insects per leaf when they are randomly scattered, the number of mutations, accidents or defects. The recurrence P(x + 1) = P(x)·m/(x + 1) is used for fitting, with m̂ = x̄. Biological counts often have variance greater than the mean (over-dispersion, clumping), in which case the negative binomial distribution fits better; a variance smaller than the mean suggests regular spacing.

The normal distribution

The normal distribution is the bell-shaped continuous distribution with density f(x) = (1/(σ√(2π))) exp(−(x − μ)²/(2σ²)), defined for all real x, with mean μ and standard deviation σ. Its properties are examined directly: it is symmetric about μ; mean, median and mode coincide; the curve is asymptotic to the x-axis; its points of inflexion are at μ ± σ; β₁ = 0 and β₂ = 3; the quartile deviation is about 0.6745σ and the mean deviation about 0.7979σ; and a linear combination of independent normal variables is again normal.

The standard normal variable Z = (X − μ)/σ has mean 0 and variance 1. Areas under the standard normal curve are tabulated; the ones used constantly are: about 68.27% of the area lies within μ ± σ, 95.45% within μ ± 2σ and 99.73% within μ ± 3σ; 95% lies within μ ± 1.96σ and 99% within μ ± 2.576σ. P(Z > 1.645) = 0.05 and P(Z > 2.326) = 0.01.

A standard calculation: if grain weight per ear is normal with mean 2.0 g and SD 0.4 g, the proportion of ears above 2.6 g is P(Z > 1.5) = 0.0668, about 6.7%.

The normal distribution is the limit of the binomial when n is large and neither p nor q is very small (np and nq both exceeding about 5 is a common rule), and of the Poisson when m is large. Approximating a discrete count with the continuous normal uses a continuity correction of half a unit. Its central role in statistics comes from the central limit theorem: the mean of a large random sample from almost any population with finite variance is approximately normal. Many agricultural measurements (heights, weights, yields of uniform plots) are close to normal; counts and percentages often need transformation first.

Remember

7. Sampling, standard error and the logic of tests

Population, sample and standard error

A population is the whole set of units about which information is wanted: all farms in a region, all plants in a field. A parameter is a numerical characteristic of the population (its mean μ, variance σ², proportion P). A sample is a part of the population selected for study, and a statistic is a value computed from the sample (x̄, s², p) used to estimate the parameter.

A sample is random when every unit has a known, non-zero chance of selection; in simple random sampling every possible sample of size n has the same chance. Random selection uses random-number tables, computer generators or lottery methods, never the investigator's judgment, which tends to favour accessible, typical-looking units. Sampling with replacement allows a unit to be drawn more than once; without replacement it does not.

A statistic varies from sample to sample. Its probability distribution over all possible samples is its sampling distribution, and the standard deviation of that distribution is the standard error (SE). The SE measures the precision of an estimate: the smaller it is, the closer estimates from repeated samples lie to each other. Key results: SE of the mean = σ/√n (with replacement or infinite population); without replacement from a population of N, multiply by √((N − n)/(N − 1)), the finite population correction. SE of a proportion = √(PQ/n). SE of the difference of two independent means = √(σ₁²/n₁ + σ₂²/n₂). SE of the difference of two proportions = √(P₁Q₁/n₁ + P₂Q₂/n₂).

Because the SE of the mean falls as √n, quadrupling the sample halves the SE. In experiments the SE of a treatment mean is √(EMS/r), where EMS is the error mean square and r the number of replications, and the SE of the difference between two treatment means is √(2EMS/r).

Errors in surveys are of two kinds: sampling error, which arises because only part of the population is observed and falls as n grows; and non-sampling error (non-response, measurement and recording mistakes, frame defects), which does not fall with n and can grow in large, poorly supervised surveys.

Hypotheses, errors and level of significance

A statistical hypothesis is a statement about a population parameter or distribution. The null hypothesis H₀ is the hypothesis of no difference or no effect, set up to be tested: the new variety's mean yield equals the check's. The alternative hypothesis H₁ is what is accepted if H₀ is rejected. It is two-sided (μ₁ ≠ μ₂) when a difference in either direction matters, and one-sided (μ₁ > μ₂) when only one direction is of interest and stated before seeing the data.

A test statistic, computed from the sample, has a known distribution when H₀ is true. The critical (rejection) region is the set of values of the statistic for which H₀ is rejected; its boundary is the critical value.

Two errors are possible. A Type I error rejects a true H₀; its probability is α, the level of significance, chosen in advance (commonly 5% or 1%). A Type II error accepts a false H₀; its probability is β. The power of a test, 1 − β, is the probability of rejecting H₀ when it is false. For a fixed sample, lowering α raises β; increasing the sample size lowers both. In variety testing, a Type I error releases a variety that is not better; a Type II error discards one that is.

The p-value is the probability, computed under H₀, of a test statistic at least as extreme as the one observed. H₀ is rejected at level α when the p-value is below α. A significant result means the observed difference is unlikely to be due to chance alone; it does not measure the size or practical importance of the difference, which needs an estimate and confidence interval. A non-significant result does not prove H₀; it may reflect too few replications.

The steps of any test are: state H₀ and H₁; choose α; choose the statistic and its distribution under H₀; compute it; compare with the critical value or compute the p-value; and state the conclusion in the terms of the problem.

Remember

8. Large-sample tests and Student's t

Standard normal (Z) tests for means and proportions

When samples are large (n above about 30 is the usual textbook rule), sample statistics are approximately normally distributed, and the sample SD can replace the population SD. The test statistic is Z = (statistic − hypothesised value)/SE, compared with 1.96 and 2.576 for two-tailed tests at 5% and 1%, or 1.645 and 2.326 one-tailed.

One mean: to test H₀: μ = μ₀, Z = (x̄ − μ₀)/(σ/√n). Example: a sample of 64 farms has mean yield 2.45 t/ha with SD 0.40 t/ha; the claimed regional mean is 2.30 t/ha. Then SE = 0.40/8 = 0.05 and Z = 0.15/0.05 = 3.0, which exceeds 2.576, so the difference is significant at 1%.

Two means: Z = (x̄₁ − x̄₂)/√(σ₁²/n₁ + σ₂²/n₂). If the two populations are assumed to share a common σ, the pooled form √(σ²(1/n₁ + 1/n₂)) is used.

One proportion: Z = (p − P₀)/√(P₀Q₀/n), with the hypothesised proportion in the SE. Example: a seed lot is claimed to germinate at 85%; in a test of 400 seeds, 320 germinate, so p = 0.80, SE = √(0.85 × 0.15/400) ≈ 0.01785, and Z ≈ −2.80, significant evidence that germination is below the claim.

Two proportions: Z = (p₁ − p₂)/√(p̂q̂(1/n₁ + 1/n₂)), where p̂ = (x₁ + x₂)/(n₁ + n₂) is the pooled proportion under H₀ of equal proportions.

A confidence interval for a mean from a large sample is x̄ ± 1.96 SE at 95%. Its correct interpretation is that 95% of intervals constructed this way in repeated sampling contain μ; it is not that μ has a 95% chance of lying in this particular interval. Tests of significance for large samples underlie survey reports, where the samples are large and the estimates are means and proportions.

Student's t-test: one sample, two samples and paired

For small samples from normal populations with unknown σ, the statistic (x̄ − μ)/(s/√n), with s the sample SD computed with divisor n − 1, follows Student's t distribution with n − 1 degrees of freedom. The t distribution is symmetric, bell-shaped and has heavier tails than the normal; as degrees of freedom increase it approaches the standard normal. W. S. Gosset published it under the pen-name Student while working on quality control for a brewery that bought barley from farms.

One-sample t: H₀: μ = μ₀; t = (x̄ − μ₀)/(s/√n) with n − 1 df.

Two independent samples (equal variances assumed): t = (x̄₁ − x̄₂)/(s_p√(1/n₁ + 1/n₂)), with pooled variance s_p² = [(n₁ − 1)s₁² + (n₂ − 1)s₂²]/(n₁ + n₂ − 2) and n₁ + n₂ − 2 df. The equal-variance assumption is checked with the F-test; when it fails, Welch's version uses separate variances and approximate degrees of freedom.

Paired t: when observations come in pairs on the same unit or matched units (yield of two varieties grown side by side on each of ten farms; weight of animals before and after a ration), the differences d are analysed: t = d̄/(s_d/√n) with n − 1 df, where n is the number of pairs. Pairing removes the variation between units from the comparison, which usually makes the test far more sensitive. Treating paired data as two independent samples is a standard error: it ignores the correlation and inflates the SE.

Tabulated two-tailed 5% points of t include 2.571 for 5 df, 2.262 for 9 df, 2.228 for 10 df, 2.101 for 18 df, 2.086 for 20 df and 1.96 for infinite df. The assumptions are independence of observations, normality of the population (or of the differences, for paired data) and, for the pooled two-sample test, equal variances. The test is fairly robust to moderate non-normality, especially with equal sample sizes, but not to dependence between observations.

Remember

9. The F-test and chi-square tests

F-test for equality of variances

If s₁² and s₂² are independent sample variances from normal populations with equal variances, the ratio F = s₁²/s₂² follows Snedecor's F distribution with (n₁ − 1, n₂ − 1) degrees of freedom. By convention the larger variance is put in the numerator so that F ≥ 1 and the upper-tail table can be used. The F distribution is positively skewed, ranges from 0 to infinity, and depends on two degrees of freedom; if F has (ν₁, ν₂) df then 1/F has (ν₂, ν₁) df. It is linked to the other distributions: t² with ν df is F with (1, ν) df, and F is the ratio of two independent chi-square variables, each divided by its degrees of freedom.

The F-test answers questions such as: is one variety more uniform in plant height than another; is one measuring method more precise; can two variances be pooled before a two-sample t-test. Example: the plant heights of two varieties give s₁² = 36 cm² from 11 plants and s₂² = 16 cm² from 9 plants. F = 36/16 = 2.25 with (10, 8) df. The upper 5% point of F(10, 8) is about 3.35, so the variances are not significantly different and pooling is acceptable.

The F-test for variances is sensitive to non-normality, more so than the t-test for means. Its most important use is the analysis of variance, where the ratio of a treatment mean square to the error mean square tests whether treatment means differ.

Chi-square tests for goodness of fit and independence

The chi-square (χ²) statistic compares observed frequencies O with expected frequencies E: χ² = Σ(O − E)²/E. Under H₀ it approximately follows the χ² distribution, which is positively skewed, defined for non-negative values, and has mean equal to its degrees of freedom and variance twice its degrees of freedom.

Goodness of fit tests whether data follow a hypothesised distribution or ratio. For k classes, df = k − 1 − (number of parameters estimated from the data). A Mendelian example: a dihybrid cross gives 315, 108, 101 and 32 plants in four phenotype classes (total 556); expected numbers under 9:3:3:1 are 312.75, 104.25, 104.25 and 34.75. χ² ≈ 0.016 + 0.135 + 0.101 + 0.218 = 0.47 with 3 df, far below the 5% value of 7.815, so the data agree with the 9:3:3:1 ratio. When fitting a Poisson with mean estimated from the data, one further df is lost; for a normal with mean and variance estimated, two.

Independence of attributes uses a contingency table of r rows and c columns. The expected frequency of each cell is (row total × column total)/grand total, and df = (r − 1)(c − 1). For a 2 × 2 table with cells a, b, c, d and total N, a shortcut gives χ² = N(ad − bc)²/[(a + b)(c + d)(a + c)(b + d)] with 1 df. Example: of 100 treated plants 20 are diseased; of 100 untreated, 40. χ² = 200(20 × 60 − 80 × 40)²/(100 × 100 × 60 × 140) = 200 × 4,000,000/84,000,000 ≈ 9.52, above 3.841, so disease is associated with treatment.

Conditions: observations independent; frequencies, not percentages or measurements; expected frequencies not too small, the usual rule being at least 5 per cell (smaller classes are pooled, with the df reduced accordingly). For a 2 × 2 table with small expected frequencies, Yates' correction subtracts 0.5 from each |O − E| before squaring, and Fisher's exact test is used when frequencies are very small. Tabulated 5% points: 3.841 (1 df), 5.991 (2), 7.815 (3), 9.488 (4).

Remember

10. Correlation and regression

Correlation and its test

Correlation measures the strength of linear association between two variables. A scatter diagram is the first step: it shows whether the relation is linear, curved or absent, and whether outliers drive it.

Karl Pearson's product-moment correlation coefficient is r = Cov(x, y)/(σₓσᵧ) = Σ(x − x̄)(y − ȳ)/√[Σ(x − x̄)²·Σ(y − ȳ)²]. Its properties: −1 ≤ r ≤ +1; r = ±1 only when all points lie on a straight line; r is unaffected by changes of origin and scale (apart from sign, if one scale is reversed); and it is symmetric in x and y. r = 0 means no linear relation, not no relation: points on a parabola can give r = 0. Correlation does not show causation: two variables may both depend on a third (rainfall raising both fertiliser use and yield), or the association may be spurious.

The coefficient of determination r² is the proportion of the variance of y explained by its linear regression on x: r = 0.8 means 64% of the variation is explained.

To test H₀: ρ = 0, t = r√(n − 2)/√(1 − r²) with n − 2 df. Example: with r = 0.6 from 18 pairs, t = 0.6 × 4/0.8 = 3.0 with 16 df, above the 5% value of 2.120, so the correlation is significant. Testing a non-zero ρ, or comparing two correlations, uses Fisher's z-transformation, z = ½ ln((1 + r)/(1 − r)), whose SE is 1/√(n − 3).

Spearman's rank correlation applies to ranks, as when judges rank varieties for taste: rₛ = 1 − 6Σd²/(n(n² − 1)), where d is the difference in ranks of each item. It suits ordinal data and monotone non-linear relations.

Partial correlation measures the association between two variables after removing the linear effect of a third; multiple correlation, R, measures the correlation between one variable and the best linear combination of several others.

Linear regression and its test

Regression describes how one variable, the dependent variable y, changes with another, the independent variable x, and is used to predict y. The simple linear regression line of y on x, fitted by least squares (minimising the sum of squared vertical deviations), is ŷ = a + bx, with slope b = Σ(x − x̄)(y − ȳ)/Σ(x − x̄)² = r σᵧ/σₓ and intercept a = ȳ − b x̄. The line passes through (x̄, ȳ).

The regression coefficient b is the change in y per unit change in x: in a fertiliser trial, the extra grain yield per kilogram of nitrogen within the range tested. There are two regression lines: y on x (for predicting y) and x on y (for predicting x); they coincide only when r = ±1 and intersect at (x̄, ȳ). Their coefficients satisfy bᵧₓ × bₓᵧ = r², so r is the geometric mean of the two coefficients and carries their common sign. If one coefficient exceeds 1 in absolute value, the other must be below 1. Unlike r, regression coefficients change with the scale of measurement but not with the origin.

To test H₀: β = 0, t = b/SE(b) with n − 2 df, where SE(b) = √(s²/Σ(x − x̄)²) and s² = Σ(y − ŷ)²/(n − 2) is the residual mean square. For simple linear regression this test is identical to the t-test of r. The analysis of variance splits the total sum of squares into the regression sum of squares, b²Σ(x − x̄)², with 1 df, and the residual with n − 2 df; F = regression MS/residual MS equals t².

Assumptions are a linear relation, independent errors with constant variance, and normal errors for the tests. Predictions outside the range of x observed (extrapolation) are unreliable; fertiliser response, for example, levels off and turns down at high doses, so a quadratic or other non-linear curve is fitted when the range is wide. Residual plots against fitted values reveal curvature and unequal variance.

Remember

11. Principles of experimental design, ANOVA, CRD and RBD

The three principles and the analysis of variance

A designed experiment compares treatments (varieties, fertiliser doses, feeds) applied to experimental units (plots, pots, animals). Experimental error is the variation among units treated alike; it arises from soil heterogeneity, genetic differences among animals, and measurement error. Fisher laid down three basic principles.

Replication is the repetition of each treatment on several units. It provides an estimate of experimental error, without which no test is possible, and reduces the SE of a treatment mean (√(σ²/r)). Randomisation allocates treatments to units by a chance mechanism, so that every unit has an equal chance of each treatment. It guards against systematic bias (the best plots getting the favoured treatment) and makes the errors independent, validating the tests. Local control groups similar units into blocks and compares treatments within blocks, removing between-block variation from the error and so increasing precision. Replication and randomisation make the test valid; local control makes it efficient.

The analysis of variance (ANOVA), developed by Fisher, partitions the total variation into parts attributable to identified sources (treatments, blocks) and the residual error. Each part has a sum of squares (SS) and degrees of freedom (df); a mean square is SS/df; the F ratio of a treatment mean square to the error mean square tests whether treatment means differ. Assumptions are additivity of effects, independence, normality and homogeneity of error variance. Data that violate them are often transformed before analysis: square root for small counts (√(x + 0.5) when there are zeros), logarithm for data whose SD is proportional to the mean, and the angular (arcsine square root) transformation for percentages that span a wide range.

The CV of the experiment, 100√EMS/grand mean, summarises its precision. Critical difference (least significant difference) between two treatment means is t(error df) × √(2EMS/r); it is used for pairwise comparison only after a significant F.

Completely randomised design

In a completely randomised design (CRD) the treatments are allocated to all units entirely at random, with no blocking. It suits homogeneous material: laboratory and pot experiments, greenhouse trials and animal trials with uniform animals. It is the simplest design, allows unequal replication, and gives the maximum error degrees of freedom for a given number of units, and missing observations cause no difficulty. Its weakness is that all variation among units goes into error, so in a heterogeneous field it is inefficient.

The model is yᵢⱼ = μ + tᵢ + eᵢⱼ. With t treatments, rᵢ replications and N = Σrᵢ units: Correction factor CF = G²/N, where G is the grand total. Total SS = Σy² − CF, with N − 1 df. Treatment SS = Σ(Tᵢ²/rᵢ) − CF, with t − 1 df. Error SS = Total SS − Treatment SS, with N − t df.

Example: four treatments with five replications each (N = 20) give treatment totals 50, 60, 70 and 80, grand total 260, and Σy² = 3,520. CF = 260²/20 = 3,380. Total SS = 140; treatment SS = (2,500 + 3,600 + 4,900 + 6,400)/5 − 3,380 = 3,480 − 3,380 = 100 with 3 df; error SS = 40 with 16 df. Treatment MS = 33.33, error MS = 2.5, F = 13.33 against the 5% value of F(3, 16), about 3.24: the treatments differ significantly. The SE of a difference between two means is √(2 × 2.5/5) = 1.0, and the critical difference at 5% is 2.120 × 1.0 = 2.12.

Randomised block design

In the randomised (complete) block design (RBD or RCBD) the experimental area is divided into blocks of homogeneous units, each block containing every treatment once, and the treatments are randomised separately within each block. Blocks are laid out across the direction of the fertility gradient, so that plots within a block are as alike as possible and differences between blocks are as large as possible. The RBD is the standard design for field experiments with a moderate number of treatments; with many treatments, blocks become too large to be homogeneous and incomplete block designs are used instead.

The model is yᵢⱼ = μ + tᵢ + bⱼ + eᵢⱼ. With t treatments and r blocks (N = tr): Total SS = Σy² − CF, with tr − 1 df. Treatment SS = ΣTᵢ²/r − CF, with t − 1 df. Block SS = ΣBⱼ²/t − CF, with r − 1 df. Error SS by subtraction, with (t − 1)(r − 1) df.

The RBD removes block variation from the error at the cost of r − 1 error degrees of freedom. If the blocks were effective, the error MS is smaller than it would have been in a CRD and precision rises. The relative efficiency of RBD over CRD can be estimated from the block and error mean squares; blocking is worthwhile when the block MS clearly exceeds the error MS.

A single missing plot in an RBD is estimated by Yates' formula, x = (tT + rB − G)/((t − 1)(r − 1)), where T, B and G are the totals of the treatment, the block and the whole experiment over the observed plots. The estimated value is inserted, the analysis carried out, and one df subtracted from the error (and from the total). The treatment SS from this analysis is slightly biased upward, and a correction exists.

The Latin square design adds a second blocking factor (rows and columns) and is used when the field has gradients in two directions; it requires as many replications as treatments. It and the factorial, split-plot and incomplete block designs are treated in the design-of-experiments subjects.

Remember

What the exams ask

How it is used, across a career

As a student

An agriculture graduate preparing for a statistics entrance must compute every quantity in this manual quickly and without software: grouped means and medians, CVs, binomial and Poisson terms, Z, t, F and chi-square statistics, correlation and regression coefficients, and the CRD and RBD tables. In a master's thesis the same student lays out a field or pot experiment, chooses between CRD and RBD, checks the CV, and reports means with standard errors and critical differences instead of a bare list of significance stars.

Five years in

A statistician or agronomist five years into work in a research station, seed company or extension service designs and analyses routine trials: chooses blocking against a known gradient, sets the number of replications from a previous trial's CV, transforms counts and percentages before ANOVA, checks residuals, uses paired designs for on-farm comparisons, and explains to colleagues why a correlation between fertiliser use and yield across farms is not a response curve. Survey work adds standard errors and confidence intervals for means and proportions.

Twenty-five years in

A senior statistician with twenty-five years of experience sets the standards that others follow: minimum replication and acceptable CV ranges for each crop and trait in a national testing system, rules for rejecting trials, the reporting format for means, standard errors and critical differences, and the choice of tests in official releases. Such a person reviews reports for misuse, such as percentages tested without transformation, paired data analysed as independent, or significance confused with importance, and trains field staff to keep randomisation honest.

PhD, twenty-five years in

A professor or research leader with a PhD and long experience teaches this course to agricultural students in a way that survives into their research: the logic of tests rather than recipes, power and sample size, effect sizes with intervals, and the link from the t-test to ANOVA and linear models. Such a person writes textbooks and open teaching material, reviews statistical sections of manuscripts, and advises institutes on moving from hand-computation habits to reproducible analysis in statistical software, and sits on committees that decide what statistics every agricultural graduate must master.

Written from

The manual does not include statistical tables; questions state the critical values they need. Derivations of sampling distributions, the theory of estimation and the Neyman-Pearson lemma are left to the theory subjects (probability, distribution theory, estimation and hypothesis testing). Multiple-comparison procedures other than the critical difference, non-parametric tests, factorial, split-plot, Latin square and incomplete block designs are covered in their own subjects. Rules of thumb such as n > 30 for large samples, expected frequencies of at least 5, and acceptable CV ranges differ between textbooks and crops; the manual gives the common textbook versions and says so.

Original practice questions written to the syllabus and pattern of the exams named in each question's examTags. They are not past papers and do not reproduce any board's questions.

Practise it, and prove it

These notes are free to read here, with no account.

What the Laisha app adds:

Free for ten days, then a subscription. We would rather write that here than have you find it later.

Open Laisha →