1. Home
  2. Explore
  3. Statistics
  4. Random Variation and Confidence Intervals

Study methods

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

Random Variation and Confidence Intervals

Speaker 1Speaker 2

Random Variation and Confidence Intervals

14:08
0:00-14:08
  1. Maria

    Let’s begin with a basic problem in statistics: when two groups appear different, how do we decide whether that difference reflects a real population effect or just random variation?

  2. Michael

    Random variation means that people differ from one another even within the same group. So differences between groups can appear simply because the particular individuals sampled from Group A and Group B happened to vary by chance.

  3. Maria

    Exactly. That is why we should not judge group means by looking only at the means themselves. We also examine confidence intervals or error bars, because they give us information about uncertainty and variability around those means.

  4. Michael

    If the groups have a lot of variability and their uncertainty ranges overlap substantially, we would be hesitant to conclude that their population means are clearly different. But if there is very little variability within either group, and the means are separated, that is stronger evidence that something may be going on between the groups.

  5. Maria

    So the main task of statistics is not to eliminate uncertainty. It is to quantify uncertainty: to assess how probable or improbable the observed pattern would be under different explanations.

  6. Michael

    That distinction matters, especially when comparing frequentist and Bayesian approaches. Suppose we have performance measurements from two groups. We might define a null hypothesis saying that group has no effect on performance, and an alternative hypothesis saying that group does affect performance.

  7. Maria

    In a frequentist test, particularly the Fisher-style approach discussed here, we focus on the null hypothesis. We ask: assuming the null hypothesis is true, how probable would it be to observe data as extreme as, or more extreme than, the data we actually obtained?

  8. Michael

    That probability is the p-value. It is not the probability that the null hypothesis is true, and it is not simply the probability that the result happened by chance. It is a probability of the data, or more extreme data, conditional on the null hypothesis.

  9. Maria

    The usual interpretation is that a small p-value means the data would be unusual if the null hypothesis were true. That may lead us to reject the null hypothesis. But a large p-value does not allow us to accept the null hypothesis, because it might mean either that the null is reasonable or that we simply do not have enough data or statistical power.

  10. Michael

    And that is one of the central limitations of the Fisher approach: it can provide evidence against a null hypothesis, but it cannot provide evidence in favor of that null hypothesis. Fisher himself did not claim that his framework could establish support for a hypothesis.

  11. Maria

    There is also an important historical distinction. Frequentist statistics contains at least two major traditions: Fisher’s approach, and the approach associated with Neyman and Pearson. Neyman and Pearson introduced ideas such as power analysis, while Fisher’s framework is centered on testing a null hypothesis and interpreting a p-value.

  12. Michael

    The trouble is that researchers sometimes combine pieces of these traditions into what has been called an inconsistent hybrid. Fisher, Neyman, and Pearson would each reject that mixture. One benefit of learning Bayesian statistics is realizing that statistical methods are not mathematical inevitabilities; there are different approaches and choices.

  13. Maria

    Let’s make the problem with one-sided evidence more concrete using the case of Sally Clark. Her two babies died a few weeks after birth. The first death might have been attributed to sudden infant death syndrome, sometimes called crib death. After the second death, suspicion turned toward murder.

  14. Michael

    The prosecution noted that sudden infant death syndrome occurred approximately once in 1,500 births. Treating the two deaths as independent, they multiplied those probabilities and obtained roughly one in 73 million. That number was presented as if it showed that the sudden-infant-death explanation was essentially impossible.

  15. Maria

    But that reasoning examined only one hypothesis. It asked how unlikely the data were under sudden infant death syndrome, then jumped to the conclusion that murder must therefore be true. It failed to consider how likely the same data would be under the murder hypothesis.

  16. Michael

    When the infant murder rate was considered, it was approximately one in 33,000 in the United Kingdom. The probability of two such murders would be about one in 1.1 billion, which is even smaller than one in 73 million. So the data were actually about fifty times more likely under the sudden-infant-death explanation than under the double-murder explanation.

  17. Maria

    The lesson is that evidence is relative. A result can be very unlikely under one hypothesis and still be even more unlikely under another. The mistake was treating the improbability of the null hypothesis as absolute evidence for a particular alternative.

  18. Michael

    A similar kind of reasoning appeared in the case of a nurse working in an elderly home. Several people died while the nurse was on duty, and the fact that those deaths occurred during the nurse’s shifts was treated as suspicious. Again, the broader issue was whether the evidence had been compared across competing explanations rather than judged against only one.

  19. Maria

    One possible response is to use a much lower alpha threshold for extremely rare events instead of the familiar .05. Fisher even wrote that no scientific worker should use a fixed significance level in every circumstance. But adjusting the threshold based on how rare the event seems can become circular, because explaining the rarity is the very reason we are doing the statistical analysis.

  20. Michael

    The Bayesian alternative compares hypotheses directly. Bayes’ rule says that the posterior odds between two hypotheses equal the prior odds multiplied by the Bayes factor. The prior odds describe how plausible the hypotheses were before seeing the data.

  21. Maria

    The Bayes factor is the key quantity. It is the likelihood of the data under one hypothesis divided by the likelihood of the data under another. So a Bayes factor of two means the data are twice as likely under one hypothesis as under the other.

  22. Michael

    You can also interpret the Bayes factor as the factor by which the data change your relative beliefs. If the prior odds are one-to-one and the Bayes factor is six, then the posterior odds favor the first hypothesis six to one.

  23. Maria

    This is different from a p-value in several ways. A p-value is absolute evidence relative to a single null hypothesis, whereas a Bayes factor is relative evidence comparing hypotheses. A p-value can help reject a hypothesis, but a Bayes factor can support one hypothesis over another, including support for a null hypothesis.

  24. Michael

    That ability matters for science. A non-significant result is often treated as uninteresting because it does not reject the null. But a Bayesian analysis can show evidence that the null hypothesis is actually better supported than an alternative.

  25. Maria

    The lecture connected this issue to the replication crisis. If researchers focus almost entirely on rejecting null hypotheses, they may ignore failed experiments. Those missing results create the file-drawer problem: the published literature can exaggerate the evidence because negative or inconclusive findings remain unseen.

  26. Michael

    That focus can also encourage poor statistical hygiene, with researchers trying many analyses or decisions in order to obtain a significant result. A healthier research culture would allow results supporting the null hypothesis to be reported and valued.

  27. Maria

    Bayes factors are often summarized with verbal labels such as weak, moderate, or strong evidence. Those labels can help beginners develop intuition, but they also impose arbitrary boundaries. A Bayes factor of four and one of nine may both receive a broad label even though they are different numerical quantities.

  28. Michael

    And the appropriate interpretation can depend on the field. Evidence that seems strong in one area may be modest in another. So it is better to keep thinking about the Bayes factor as a continuous measure rather than reducing it to a category.

  29. Maria

    Another complication is heterogeneity. If different participants produce Bayes factors in opposite directions, simply multiplying them assumes that all participants follow the same model. That assumption may be inappropriate if the sample contains different subpopulations.

  30. Michael

    In that situation, researchers can report the individual Bayes factors and consider hierarchical model selection, which allows for the possibility that different people come from different models. There may even be variability within one participant if that person switches between strategies across trials.

  31. Maria

    Let’s compare the two approaches more directly. Frequentist analysis usually begins with a single null hypothesis. Bayesian analysis compares at least two hypotheses, and it can compare more than two if the situation calls for it.

  32. Michael

    Frequentist procedures also require the analysis plan and stopping rule to be specified before collecting data. If researchers test twenty participants, look at the p-value, and collect ten more only when the first p-value is near .05, the final p-value is biased because the decision to continue depended on the observed data.

  33. Maria

    Bayesian analysis is generally less severely affected by that stopping-rule problem, although it is not free from every possible issue involving optional stopping or analysis decisions. The broader point is that data collection choices still need to be made thoughtfully.

  34. Michael

    There is also a philosophical difference. Bayesian statistics quantifies degrees of belief and requires priors. Frequentist methods aim to work with long-run properties and avoid inserting priors, which frequentists view as subjective. Bayesians accept that some subjective choices are necessary and make them explicit.

  35. Maria

    Those priors can apply not only to the hypotheses but also to nuisance parameters, such as means and variances, that we are not directly interested in. The result can depend on these choices, so Bayesian analyses should examine robustness: how much does the conclusion change under reasonable alternative priors?

  36. Michael

    Now let’s apply these ideas to correlation. Imagine data relating the height ratio of presidential candidates to the winning candidate’s popular-vote support. The scatterplot appears to suggest a positive relationship, but we need to ask whether that pattern could have arisen by chance.

  37. Maria

    A frequentist analysis tests the null hypothesis that the population correlation is zero. It transforms the sample correlation into a t statistic and asks how extreme that statistic would be if the true population correlation were zero. In the example, the p-value was about .07, with a reported 95 percent confidence interval from approximately .12 to .62.

  38. Michael

    That p-value would not conventionally lead to rejecting the null at .05. But it still would not justify saying that the null has been supported. The Bayesian analysis instead computes a Bayes factor comparing zero correlation with a nonzero correlation and also produces a credible interval for the population correlation.

  39. Maria

    Using a default prior, the Bayes factor favoring a nonzero correlation was about 6.33. That means the data were approximately 6.33 times more likely under the hypothesis of a true correlation than under the hypothesis of no correlation.

  40. Michael

    The Bayesian analysis also showed a posterior distribution for the correlation. The posterior combines the prior with the data and represents the updated distribution of plausible correlation values. In that example, the posterior median was around .37, and the 95 percent credible interval was approximately .11 to .60.

  41. Maria

    A credible interval has the interpretation many people intuitively assign to a confidence interval: given the model, prior, and data, it contains 95 percent of the posterior probability. A frequentist confidence interval does not mean there is a 95 percent probability that the particular parameter lies inside this particular interval.

  42. Michael

    In the frequentist interpretation, if we repeatedly ran the same procedure over many hypothetical samples, about 95 percent of the resulting intervals would contain the true value. That is a long-run statement about the procedure, not a probability statement about the parameter in the one experiment we actually performed.

  43. Maria

    The intervals can sometimes look similar, but they are not interchangeable. Different frequentist methods can produce different valid confidence intervals, and a credible interval is based on a different framework involving a posterior distribution.

  44. Michael

    The same comparison applies to a two-group t-test. A frequentist test might produce a p-value of .21. That means the data would not be especially unusual under the null hypothesis, but it does not establish that the two population means are equal.

  45. Maria

    A Bayesian t-test can instead compute a Bayes factor. Depending on the data and the prior over standardized effect sizes, the result might favor the null hypothesis or the alternative. The Bayes factor can change when the prior becomes wider, which is why sensitivity to prior settings should be reported or checked.

  46. Michael

    Bayesian computation used to be difficult and computationally expensive, but modern hardware and software have made many analyses practical. Tools such as JASP provide an interface familiar to users of statistical packages, while software such as R can offer more control over priors and model choices.

  47. Maria

    The final message is not that Bayesian statistics magically solves every problem or that frequentist statistics is always useless. The important goal is to become a mindful statistician rather than a mindless button-clicker searching for a p-value below .05.

  48. Michael

    So when evaluating evidence, remember the essentials: account for random variation within groups, quantify uncertainty, define what probability is conditioned on, compare competing explanations when possible, and distinguish rejecting a hypothesis from supporting one.

  49. Maria

    And if you use Bayesian methods, state your priors and check how robust the conclusions are. If you use frequentist methods, be precise about what p-values and confidence intervals mean, avoid treating a high p-value as proof of no effect, and do not mix statistical traditions without understanding their assumptions.

Ask anything

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

FlashcardsQuizFill in the blanksWritten testLessonNotesPodcastContent