411 REFERENCE · Wikibooks
Statistics for Sociologists/Chapter 17: An Introduction to Bayesian Thinking
Reference material by Wikibooks contributors. This retains its source identity and is not 411 news reporting.
Chapter 17: An Introduction to Bayesian Thinking
Everything in this book from Chapter 11 onward has followed one particular philosophy of statistics, without ever quite naming it as a choice. This chapter names it, and introduces the alternative. No new math machinery to speak of — just a genuinely different way of thinking about what probability even means, and one accessible R package for trying it out on a question you've already answered the other way.
Two Philosophies of Statistics
The frequentist approach — everything through Chapter 16 — treats probability as long-run frequency: the probability of an event is the proportion of times it would occur across infinitely many repetitions. Parameters (the true population mean, the true slope) are treated as fixed, unknown constants, and the data are treated as random — which is why a frequentist confidence interval's correct interpretation (Chapter 12) is so awkwardly indirect: it's a statement about the reliability of the method across repeated sampling, not a direct probability statement about the parameter itself.
The Bayesian approach flips this around. Probability represents a degree of belief, which can attach directly to a parameter. Data are treated as fixed (you observed what you observed); the parameter is treated as uncertain, and probability describes exactly how uncertain. This isn't just a technical rearrangement — it changes what kinds of questions you're allowed to ask directly. A Bayesian is entitled to say "there's an 80% probability the true effect is positive." A frequentist, strictly, is not; a frequentist can only talk about how often a method would succeed across repetitions, never assign a direct probability to a specific fixed parameter.
The Bayesian Update: Prior + Data → Posterior
The core Bayesian move is genuinely intuitive once you see it stated plainly, because it's how humans actually reason when they're thinking carefully: start with a prior belief, encounter new evidence, and update to a posterior belief that blends the two. Bayesians update their beliefs when confronted with new evidence. This makes them both principled statisticians and very unusual people.
Bayes' Theorem is the formal engine behind this update — this book states it conceptually and stops there, since a full derivation belongs in a dedicated Bayesian statistics course rather than an introductory chapter:
Posterior probability ∝ Prior probability × Likelihood of the observed data
In words: your updated belief is proportional to how plausible you thought something was beforehand, adjusted by how well the new data actually fit that possibility.
A concrete example: before looking at any GSS data, what do you believe about the relationship between education and income? Probably something like "more education tends to predict more income, though not perfectly, and the relationship is likely moderate rather than either trivial or overwhelming" — a genuinely informative prior belief, built from general knowledge of the world, well before touching a dataset. After seeing Chapter 16's regression result (a clear, positive, moderately strong relationship, R² around 0.25), a Bayesian would update that prior belief toward greater confidence in something like the observed pattern — not discard the prior entirely, and not ignore the data either, but blend the two according to how strong each one is.
The prior/posterior update is a natural fit for sociological thinking generally — sociologists already believe, as a matter of basic disciplinary common sense, that context shapes interpretation. Bayesian inference just formalizes that instinct mathematically.
Bayesian t-Tests With the BayesFactor Package
library(BayesFactor)
ttestBF(formula = EDUC ~ SEX, data = as.data.frame(gss))
The BayesFactor packageMorey, R. D., & Rouder, J. N. BayesFactor: Computation of Bayes Factors for Common Designs. R package. https://richarddmorey.github.io/BayesFactor/ does the heavy computational lifting here. This asks essentially the same question as Chapter 13's independent-samples t-test, but returns a different kind of answer: a Bayes FactorKass, R. E., & Raftery, A. E. (1995). Bayes factors. Journal of the American Statistical Association, 90(430), 773–795. (BF) rather than a p-value.
A Bayes Factor expresses how much more likely the observed data are under the alternative hypothesis (H₁: there's a real difference) compared to the null hypothesis (H₀: there's no difference). A BF of 5 means the data are five times more likely under H₁ than under H₀ — direct evidence for one hypothesis relative to the other, which is a meaningfully different kind of statement than a p-value's "how surprising would this be if H₀ were exactly true," and notably, a Bayes Factor can provide genuine evidence for the null, something a p-value structurally cannot do (a large p-value only ever means "not enough evidence to reject the null," never "evidence the null is true").
Rough interpretation benchmarks, widely (if informally) usedLee, M. D., & Wagenmakers, E.-J. (2014). Bayesian Cognitive Modeling: A Practical Course. Cambridge University Press. (Adapting the classification scale originally proposed by Jeffreys, H. (1961). Theory of Probability (3rd ed.). Oxford University Press.):
Bayes Factor Strength of Evidence 1–3 Barely worth mentioning 3–10 Moderate evidence 10–30 Strong evidence 30–100 Very strong evidence >100 Extreme evidence
(And, symmetrically, a BF between 1/3 and 1 is weak evidence for the null; below 1/10, moderate evidence for the null; and so on in the other direction.)
Why Bayesian Methods Are Gaining Ground
Bayesian methods are attracting more attention across the social sciences for a few genuine reasons: they're honest about uncertainty in a direct, interpretable way; they update naturally as new evidence accumulates, which maps well onto how a research literature is supposed to actually work over time; and they don't force a binary significant/not-significant decision the way conventional null-hypothesis testing does, offering instead a continuous measure of evidential strength.
They come with real limitations too. Prior choice matters — a badly chosen or overly opinionated prior can meaningfully distort a Bayesian analysis, and defending your choice of prior is a genuine, sometimes contentious, part of doing Bayesian work honestly. And Bayesian methods can be considerably more computationally intensive for complex models than their frequentist equivalents, though the simple Bayesian t-test shown here is not one of the cases where that matters.
I'll be honest about my own position as the author here: I learned Bayesian statistics in the process of writing this chapter. You can too. This isn't a field that requires a separate PhD to engage with at the level this book operates on — it requires a willingness to think about probability a little differently than you've been trained to for the last sixteen chapters, and a decent R package to handle the computation once you understand what you're asking it to do.
Chapter Summary
Frequentist statistics (everything through Chapter 16) treats probability as long-run frequency and parameters as fixed unknowns; Bayesian statistics treats probability as degree of belief and allows that belief to attach directly to a parameter, updating a prior belief into a posterior belief as new data arrive. The BayesFactor package's ttestBF() function runs a Bayesian alternative to Chapter 13's t-test, returning a Bayes Factor — a direct measure of how much more likely the data are under one hypothesis versus the other, interpretable via rough benchmarks and capable, unlike a p-value, of providing genuine evidence for the null. Bayesian methods are gaining traction for their honesty about uncertainty and their natural fit with how evidence should accumulate over a research career, though prior selection and, for complex models, computational cost remain real considerations.
Practice Examples
Example 1: Bayesian t-Test for Sex Differences in Education
The Research Question: How does a Bayesian answer to Chapter 13's education-by-sex question compare to the frequentist p-value already obtained there?
The Code:
library(BayesFactor)
bf <- ttestBF(formula = EDUC ~ SEX, data = as.data.frame(gss))
bf
The Output:
Bayes factor analysis
--------------
[1] Alt., r=0.707 : 0.62 ±0%
Against denominator:
Null, mu1-mu2 = 0
---
Bayes factor type: BFindepSample, JZS
The Interpretation: A Bayes Factor of about 0.62 means the data are actually somewhat more likely under the null hypothesis (no difference) than under the alternative — weak evidence favoring no meaningful sex difference in education, which lines up closely with Chapter 13's frequentist result: a non-significant p-value (.156) and a negligible Cohen's d (0.06). Frequentist and Bayesian approaches don't always agree this cleanly, but when they do, it's a reassuring form of convergent evidence — two different philosophies of inference, applied to the same data, telling a consistent story.
Follow-Up Challenge: Compare this BF to Chapter 13's exact p-value (.156) side by side. Do you find the Bayes Factor or the p-value more intuitively informative as a reader? Try to articulate specifically why.
Example 2: Interpreting Three Different Bayes Factors
The Research Question: What does the strength of evidence actually look like across a range of possible Bayes Factor results?
The Code: (No new code — a conceptual interpretation exercise using the benchmark table above.)
The Output: Three hypothetical Bayes Factors to interpret: BF = 45, BF = 2.1, and BF = 0.15.
The Interpretation: A BF of 45 falls in the "very strong evidence" range — the data are 45 times more likely under the alternative hypothesis than the null, about as convincing as evidence gets in an applied social science context. A BF of 2.1 is barely worth mentioning on its own — the data are only about twice as likely under the alternative, evidence weak enough that a careful researcher would want more data before drawing any real conclusion. A BF of 0.15 flips the direction entirely: since 1/0.15 ≈ 6.7, this is moderate evidence for the null hypothesis — a meaningfully different, and more informative, conclusion than a frequentist "failed to reject the null," which can never distinguish "genuine evidence for no effect" from "just not enough data to tell."
Follow-Up Challenge: For each of the three Bayes Factors above, write one sentence describing what you would tell a colleague about the evidence — the way you'd actually explain it out loud, not just the technical classification.
Follow-Up Challenge (chapter-level): Find one published sociology paper that uses Bayesian methods (a search for "Bayes factor" or "Bayesian" alongside a topic you're interested in, in Google Scholar, will turn up a growing number). What does the paper's author say they gain from the Bayesian approach that a conventional analysis wouldn't have offered? Does their justification feel convincing to you?
References