1. Home
  2. Explore
  3. Statistics
  4. Introduction to Statistics

Study methods

Flashcards
Quiz
Fill in the blanks
Written test
Lesson
Notes
Podcast
Content

Introduction to Statistics

Speaker 1Speaker 2

Introduction to Statistics

14:47
0:00-14:47
  1. Hope

    Welcome to the statistics lecture series: everything you always wanted to know about statistics but were afraid to ask. The lectures are being recorded, and the videos, slides, and handouts will be shared through the Data Analysis Group website.

  2. Michael

    And who’s leading us through them? A little introduction helps before we dive into the maths.

  3. Hope

    The lecturer is Mark Gierliński, part of the Data Analysis Group at the University of Dundee’s School of Life Sciences. He and James Abbott collaborate with researchers inside and outside the school on projects involving RNA-seq, proteomics, other data analysis, and modelling. The group is available to help with data analysis and statistics.

  4. Michael

    The course has fourteen lectures, with the early ones focused on uncertainty and error analysis in biology, along with presenting data well. Later lectures cover statistical tests such as t-tests and ANOVA, statistical power, multiple-test correction, linear models, and a closing discussion of what can go wrong with p-values.

  5. Hope

    There will be maths, but the aim is to keep it accessible. Some concepts will take effort, though, so don’t let one challenging lecture put you off. Today we’re laying foundations with probability distributions—and that matters far beyond statistics class. Understanding probability helps us interpret scientific findings and everyday information, including the kinds of COVID data reported in the media.

  6. Michael

    Let’s make that concrete with a familiar experiment. Suppose you estimate bacterial concentration using a spectrophotometer, measuring optical density at 600 nanometres, or OD600. It’s proportional to the bacterial concentration in the sample. If you measure six replicate aliquots under the same conditions, you won’t necessarily get the exact same reading six times.

  7. Hope

    Right—and that variation is normal in experimental science, not automatically a sign that something has gone wrong. We can think of an experimental result as a random variable: before doing the experiment, there are multiple possible outcomes, and the experiment produces one of them. The probability distribution describes those possible outcomes and how likely they are.

  8. Michael

    A pair of dice is a useful picture. Before rolling, you don’t know the result, but you know the possible sums range from two to twelve. Once you roll, all those possibilities collapse to one observed sum—say, four. That observed result is one realization of the random variable.

  9. Hope

    And repeating an experiment gives us more information about the distribution of possible results. In that sense, an experiment can be viewed as a random-number generator. Repeated observations let us explore the variability and infer something about the uncertainty in our result.

  10. Michael

    There are two broad kinds of random variables: discrete and continuous. A discrete variable has separate possible outcomes, such as a dice result, a category like small, medium, or large, or a count of mice. A count may be fixed once you’ve made it, but in a repeated survival experiment the number of mice surviving treatment could vary from one run to another.

  11. Hope

    A continuous variable can take values across a continuous range, such as a mouse’s weight, a person’s height, fluorescent-marker intensity, or protein abundance. The type of variable matters because we describe its probability distribution differently depending on whether outcomes are discrete or continuous.

  12. Michael

    Back to the two dice: there are 36 possible ordered combinations. A sum of two can happen only one way—one plus one—whereas a sum of four can happen three ways: one plus three, two plus two, or three plus one. More combinations mean a higher probability, so seven, which has six combinations, is six times as likely as two, which has one.

  13. Hope

    That illustrates a discrete probability distribution: it assigns probabilities to the possible outcomes. We can write the probability that random variable X equals outcome k as P of X equals k. For example, if the distribution assigns six a probability of 0.1, then P of X equals six is 0.1.

  14. Michael

    Probabilities for separate outcomes can be added. If we want the probability that X is between five and seven, including those values, we add the probabilities for five, six, and seven. On a graph of a discrete distribution, that’s the total height of those bars, interpreted as their probability mass.

  15. Hope

    For a continuous variable, we use a density function instead. We don’t usually ask for the probability that it equals exactly one value, because an infinitely narrow interval has probability zero. Instead, we ask for the probability that it falls above or below a limit, or within a range.

  16. Michael

    On a density graph, probability is represented by area under the curve. For example, the probability that X is greater than ten is the area to the right of ten. This is why tail probabilities—the areas beyond a chosen cutoff—will matter repeatedly when we get to statistical testing.

  17. Hope

    The total area under a probability distribution is one, representing all possible outcomes. One especially common continuous distribution is the normal distribution, also called the Gaussian distribution. It’s a symmetric, bell-shaped curve described by its mean, which locates the centre, and its standard deviation, which describes its spread; the variance is the standard deviation squared.

  18. Michael

    For a normal distribution, about 68.3 percent of values lie within one standard deviation of the mean—roughly two-thirds. About 95 percent lie within two standard deviations. More precisely, the interval from 1.96 standard deviations below the mean to 1.96 above contains 95 percent, leaving five percent in the two tails combined.

  19. Hope

    That 1.96 is worth remembering because it comes up again and again. With a 95 percent central interval, each tail contains 2.5 percent. In the lecture’s framing, a five-percent cutoff corresponds to odds of one in twenty of being outside the interval. Some physicists use a three-standard-deviation threshold, with odds around one in 400, reflecting a different standard in fields where measurements can be more precise than many biological experiments.

  20. Michael

    Human height is a real-world illustration. The heights of 1,034 Major League Baseball players were shown as bars, with measurements rounded to the nearest inch. A normal curve fit the overall pattern well, and the mean height was 187.2 centimetres. But that’s an approximation: real-world data are not guaranteed to be perfectly normal.

  21. Hope

    The name Gaussian comes from Carl Friedrich Gauss, who studied the distribution in detail, although Abraham de Moivre formulated it earlier. Gauss was a remarkable mathematician—among other things, he devised a ruler-and-compass construction for a regular polygon with 17 sides. He reportedly wanted one on his tombstone, but the stonemason feared it would look like a circle.

  22. Michael

    A second distribution is the log-normal distribution. A variable is log-normally distributed when its logarithm is normally distributed. Its original values often look strongly skewed, while taking logarithms can make their distribution look much closer to a normal curve.

  23. Hope

    That distinction matters for interpreting variation. In the example from proteomics, the original data were skewed: about 96 percent of values fell within one standard deviation of the mean, unlike the roughly two-thirds expected for a normal distribution. After taking logarithms, the distribution looked more normal, and about 67 percent fell within one standard deviation.

  24. Michael

    So a useful habit is to plot your data distribution before analysing it. Many measurements from high-throughput experiments—such as RNA-seq, microarrays, and mass spectrometry—as well as drug potency measured by IC50, are often log-normal. A logarithmic scale can make their patterns much easier to see.

  25. Hope

    The RNA-seq illustration compares two replicates. On the original intensity scale, a few large values dominate the plot and much of the data is crowded together. Plotting the logarithms of both measurements spreads out the lower values and makes their relationship more visible. You can use base two, base ten, or natural logarithms, as long as you’re consistent.

  26. Michael

    For presentation, base ten can be intuitive: a value of five on a log-base-ten scale corresponds to 100,000 on the original scale. A log-base-two value of ten corresponds to 1,024, which is less immediately obvious to many people. And a historical aside: the Scottish mathematician and astronomer John Napier invented logarithms and published tables of natural logarithms; Napier’s bones, made of wood, were an early practical calculating device.

  27. Hope

    Next is the Poisson distribution, often called a counting distribution. It applies when we count events in a defined bin—something measured over time, space, or both. Examples include bacterial colonies on a plate, radioactive decays per second, deaths in a population, cells in a counting chamber, or mutations in a DNA fragment.

  28. Michael

    Imagine plating the same bacterial solution repeatedly. One plate might have ten colonies and another a different count, because each aliquot contains a varying number of bacteria. The Poisson distribution describes such counts when events occur randomly and independently. Independence matters: if bacteria clump together rather than being evenly distributed, the counts may not follow a Poisson distribution.

  29. Hope

    A Poisson distribution has one parameter, its mean, usually written mu. Its variance equals that mean, so its standard deviation is the square root of the mean. That’s different from the normal distribution, which has separate parameters for its mean and standard deviation. As the Poisson mean gets larger, its shape begins to resemble a normal distribution.

  30. Michael

    There’s a striking historical example involving Prussian soldiers killed by horse kicks. Statistician Ladislaus Bortkiewicz examined records from 14 army corps over 20 years, counting deaths per corps per year. Army officers were concerned about one corps having four deaths in a particular year and suspected foul play.

  31. Hope

    Bortkiewicz showed that the counts followed a Poisson distribution well, with a mean of about 0.7 deaths per corps-year. Given that distribution, the probability of four deaths in one corps-year was about 0.078. Across 14 corps, such an event was expected to occur from time to time—on average, about once every 13 years—so the unusual-looking count was not, by itself, evidence of foul play.

  32. Michael

    The last distribution today is the binomial distribution. It describes a fixed number of trials, each with two possible outcomes: a success with probability p, or a failure with probability one minus p. The question is: what is the probability of getting exactly k successes in n trials?

  33. Hope

    Tossing a coin is the classic example. If heads counts as success and the coin is fair, p is 0.5, and tails is failure with probability 0.5. The binomial distribution tells us the probabilities of getting different numbers of heads over a set number of tosses. Its mean is n times p, and its standard deviation is the square root of n times p times one minus p.

  34. Michael

    For eight tosses, getting four heads is much more likely than getting eight heads. There’s only one sequence that gives eight heads, but there are 70 different sequences that give exactly four. That’s why the probability of four heads is 70 times the probability of eight heads.

  35. Hope

    The binomial distribution also connects to the other distributions. With a large number of trials and a probability that isn’t too close to zero or one, it can look approximately normal. With a large number of trials and a very small probability, it can look approximately Poisson. Those approximations can make calculations easier in the right circumstances.

  36. Michael

    How do we work with these distributions in practice? The lecture recommends R, a statistical language with many built-in tools for analysis. For each distribution, R commonly provides three kinds of functions, with names beginning d, p, and q.

  37. Hope

    The d function gives a density for a continuous distribution, or the probability of a particular outcome for a discrete one. The p function gives a cumulative probability—typically the probability of being less than or equal to a specified value. The q function reverses that: given a cumulative probability, it finds the corresponding quantile or cutoff.

  38. Michael

    For a 95 percent central interval under the normal distribution, we want the positive cutoff that leaves 2.5 percent in the upper tail. The cumulative probability to the left of that cutoff is 97.5 percent, or 0.975. In R, qnorm of 0.975 gives about 1.96, the familiar cutoff.

  39. Hope

    For a binomial example, dbinom can give the probability of exactly two heads in eight fair-coin tosses: the number of successes is two, the number of trials is eight, and the probability of success is 0.5. To find the probability of at least six heads, use one minus pbinom of five, because the cumulative probability through five includes all the outcomes we want to exclude.

  40. Michael

    The same d, p, and q pattern is available for distributions including normal, log-normal, Poisson, and binomial, as well as others such as chi-square and Student’s t. These functions are part of base R, so you can use them without installing extra libraries.

  41. Hope

    Let’s recap the four distributions. Normal is a continuous, bell-shaped distribution often used to approximate natural measurements such as height. Log-normal means the logarithm of the variable is normal and is common in high-throughput biological measurements. Poisson describes random, independent counts in a bin. Binomial describes success-versus-failure outcomes across a fixed number of trials.

  42. Michael

    And the thread connecting them is uncertainty: an experimental result is one outcome from a range of possibilities. Understanding the distribution behind those possibilities helps us describe variation, calculate probabilities, and avoid overinterpreting unusual observations. That’s the foundation we’ll build on in later lectures.

Ask anything

We've read this whole study set, so questions about it get the best answers.

FlashcardsQuizFill in the blanksWritten testLessonNotesPodcastContent