Statistics - Introduction

Lecture Notes

Basics

Statistics in ecology is used to interpret data in order to make conclusions about ecological relationships.

Uncertainty

Statistics not only lets us determine what kind of relations exist, but also estimate the reliability of the evidence by quantifying the amount of uncertainty. There are two kinds of uncertainty:

Aleatory uncertainty

  • This is uncertainty related to stochasticity (randomness) in repetitive experiments
  • For example, repetitive measurements in the lab or field have aleatory uncertainty since measuring the same thing twice can give different results due to user or instrument error.

Epistemic uncertainty

  • Uncertainty related to our knowledge or understanding of a process
  • This can be reduced by collecting more data

Example - pulling balls from a bag

A ball is full of black and white balls. If we know the true ratio of black:white balls and the total number of balls in the bag, we could predict the result of a blind draw from the bag, with a certain degree of aleatory uncertainty due to random sampling. (see Probability - Fundamentals)

However, if we don't know the ratio, or are uncertain about its true value, or don't know the total number of balls in the bag, we have both aleatory and epistemic uncertainty arising from our lack of understanding about the system.

Approaches to statistical inference

The two main ways to conduct statistical inference are the Frequentist and Bayesian approaches. The frequentist approach is more traditionally used since it usually requires less computing power, but nowadays the Bayesian approach is being used more and more.

Frequentist Approach

  • Probability is defined through frequencies in long term experiments
  • Example: the probability getting heads in a coin toss is the proportion of heads in an infinite number of coin tosses [1]
  • Frequentist probability does not really exist for events that cannot be repeated.
    • Such as whether there were more than 400 Saimaa ringed seals alive in 2024.
  • In frequentist inference, probability only reflects Aleatory uncertainty.

Bayesian Approach

  • In a Bayesian approach, probability is a measure of uncertainty at all levels, both aleatory and epistemic.
  • Bayesian probability can be defined for any event, unlike in the Frequentist Approach to Statistics where it can only apply to repeatable events.
    • For example, using Bayesian inference you could state that "with 90% probability there are more than 400 ringed seals in Saimaa"

Population and sample

The concept of a Population is very important in statistics.

Population - definition

A population in statistics is a group of objects whose properties we are interested in. In some cases, these entities are real things, whereas in some cases they are more or less fictitious abstractions that help statistical analysis.

A population can consist of countably many (i.e., finite number) of objects or an infinite number of objects.

A sample, naturally, is a defined number sampled from this population.

Population - examples

Example 1: spatial differences

Example 2: temporal differences

Spatially defined populations

In ecology we often define populations based on spatial locations. For example:

Comparing two populations through samples

See separate note for this long example and exploration of comparing population means:
Comparing two populations through samples

Data Transformations

All our analyses so far have assumed that the variables are Gaussian distributed, which is almost never the case in real life.

However, we often know enoguh that we can make an assumption that Gaussian, or some other distribution, is a good enough approximation for the true underlying distribution. (Central Limit Theorem)

If so, we can use the methods above to analyze the data. However, if this assumption cannot be safely made, we will need to do something else. The simplest way to do this is by transforming the data with some kind of mathematical function.

Log transformations

If our data is only positive numbers that are mostly close to zero, with some outlying very large values, a logarithmic transformation can help correct this. You can literally just use the log() function in R for this.

Linear Models

I'll make this last section it's own note:
Linear models


  1. See Probability - Fundamentals#Frequency and Probability ↩︎

  2. We discussed similar problems with defining a population in the Population Ecology lecture ↩︎