liveBook · Manning

Probability theory

As explained in Effective Data Analysis

Probability is a mathematical measure of uncertainty about events or propositions.

Probability measures uncertainty and can represent a degree of belief about an event based on available evidence. In hypothesis testing, it supports reasoning about expected differences between groups. section 3.1.3

Use probability to connect hypotheses with evidence and expected effect sizes:

  • Frequentist testing uses samples to make inferences about a broader population, often framing hypotheses around group differences and their direction. section 3.1.3
  • Bayesian reasoning quantifies a hypothesized difference using evidence from research, organizational data, or stakeholder knowledge. section 3.1.3

Simulating treatment and control groups

A Python simulation generates overlapping normal distributions for control and treatment groups, shifting the treatment distribution two standard deviations to illustrate a strong difference. section 3.1.3

import numpy as np   #1
import matplotlib.pyplot as plt

c = np.random.normal(0, 1, size=500)   #2
t = np.random.normal(2, 1, size=500)

plt.hist(c, alpha=0.5, bins=25, color="black")   #3
plt.hist(t, alpha=0.5, bins=25, color="lightgray")
plt.legend(["Control", "Treatment"])

Run the NumPy and Matplotlib example to generate and compare simulated treatment and control histograms. section 3.1.3

How Effective Data Analysis covers it

How deep it goes
Contrasts frequentist and Bayesian interpretations, then stops short of detailed probability or Bayesian statistics.
Examples
Uses simulated normal distributions, treatment-control histograms, and a two-standard-deviation treatment shift.
What it assumes
Builds from existing hypothesis-testing methods while introducing probabilistic thinking through effect-size estimates.
What you can do after
Apply it via Python to quantify expected differences and visualize simulated treatment and control distributions.
How it connects
Connects probability with hypothesis testing, Bayesian statistics, frequentist inference, and treatment-control comparisons.

Also explained in

Compare how 16 books explain probability theory →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Effective Data Analysis. The section links point to the parts of the book it draws on.