Skip to content
QDA2 Lab

QDA2 · Bonus case file · Prepared for Simon Nicholas Hill

THE SOPRANOS
QDA2 LAB

“Never rat on your friends. Always check your measurement level.”

Bada Bing, Bivariate Analysis

Simon, you said you were watching The Sopranos.

Unfortunately, this means The Sopranos is now homework.

Your task is to determine whether six seasons of organized crime can survive quantitative analysis.

No prior knowledge of New Jersey waste management is required.

StatusOptional practice. Not graded.

CoversEverything in QDA2 so far, from measurement levels to t-tests.

ProgressSaved in this browser only. No login.

Direct link/bonus/sopranos
PART 0The evidence

The dataset

Every exercise below uses one episode-level dataset. Before analysing anything, know where the numbers come from.

Read this first

Synthetic teaching dataset inspired by The Sopranos. Values are created for statistical practice and are not factual episode statistics.

74 synthetic episode observations across 6 seasons. Episode labels are generic (S1E01 …) and do not refer to real episodes; the number of episodes per season is also synthetic.

Real metadata

0

Public facts about the episodes (titles, air dates, runtimes, ratings). None are used in this version: they could not be checked reliably when the lab was built, and invented ‘facts’ are worse than none.

Manually coded

0

Counts a person would code by watching the episodes or reading licensed transcripts. None are used in this version.

Synthetic teaching variable

24

Generated by a seeded script so that the exercises have realistic structure. Every variable in this dataset is synthetic.

PART 1Know your variables

Measurement levels, then roles

Classify each variable as nominal, ordinal or scale. Then decide which variable is X and which is Y in a few research questions.

Classify the variables

0/0 correct on first attempt

Classify variable

season (1, 2, 3, 4, 5, 6). What is its measurement level?

1 / 7

Measurement level ≠ variable role

The level describes what the values mean. The role (X, Y, Z) comes from the research question. A variable keeps its level while it moves between roles.

In each research question, which is X and which is Y?

0/0 correct on first attempt

Identify X and Y

Research question: “Are later seasons more violent than earlier seasons?” Which is X and which is Y?

1 / 4
PART 2Frequencies

How peaceful is The Sopranos, statistically speaking?

Descriptive statistics first: N, mean, median, minimum, maximum and standard deviation for death_count, violence_event_count, fuck_count and runtime_minutes.

Never rat on your friends. Always report N.

Research question

How peaceful is The Sopranos, statistically speaking?

violence_event_count Synthetic data
ValueFrequencyPercentCumulative Percent
056.86.8
11621.628.4
21925.754.1
31520.374.3
456.881.1
5810.891.9
645.497.3
711.498.6
911.4100.0
Total?100.0
05116219315455864718091

Read the frequency table (no calculator needed) and fill in four statistics.

Mean, median and skew

0/0 correct on first attempt

Mean or median?

If the distribution of violence counts is strongly right-skewed, would the mean or the median better describe a typical episode?

1 / 2
PART 3The Bada Bing crosstab

Are later seasons more likely to contain major violence?

Xearly_late × Ymajor_violence, a 2 × 2 crosstab. Switch between counts, row percentages and column percentages and watch which total becomes the denominator.

Check the denominator before you disrespect the family.

Research question

Are later seasons more likely to contain major violence?

X in the rows, Y in the columns

Ymajor_violence
Xearly_lateNo major violenceMajor violenceTotal
Seasons 1–3231639
Seasons 4–6112435
Total344074

Raw counts. The two periods contain different numbers of episodes (39 vs 35), so counts alone cannot be compared.

Synthetic data

Seven questions about one table

0/0 correct on first attempt

Question 1

Research question: “Are later seasons more likely to contain major violence?” What is the independent variable?

1 / 7

Tempting interpretation

A classmate writes: “60% of the episodes with major violence occurred in later seasons.” Does this answer whether later seasons are more likely to be violent?

SPSS mode

Now, and only now, the software

Choose the method

Both variables are dichotomous (nominal). Which analysis fits before we touch SPSS?

SPSS procedure unlocks after you answer the question above. Statistics first, buttons second.
PART 4p-value: the trial

The People of New Jersey v. H₀

The court presumes innocence. Statistics presumes H₀. The question is how embarrassing the evidence would be for H₀ if H₀ were true.

The defendant (H₀)

Major violence is independent of whether an episode comes from an early or late season.

The evidence

χ²(1) = 5.64, p = .018
Cramer's V = .28, N = 74

The verdict

p = .018. Which conclusion is correct?

The ruling

p tells us about evidence against H₀. Cramer's V tells us about strength. A tiny p with a tiny V is a convincing case about a small matter.

Sentencing

p = .018, Cramer's V = .28, N = 74. Which summary is correct?

PART 5Lazarsfeld meets Tony Soprano

What happens to X → Y when Z walks in?

Start from the zero-order relationship between Xlater season and Ymajor violence. Then introduce a control variable Z and compare the partial relationships with the original one.

Bivariate analysis. Whatever happened there.

Zero-order relationship (from the dataset)

% of episodes with major violence
Seasons 1–3Seasons 4–6Difference
All episodes41.0%68.6%+27.5 points
Synthetic data

Lazarsfeld visualizer

Four ways a story can end

XLater seasonYMajor violenceZZ

The original two-variable relationship: later seasons, more major violence. Everything that follows is compared with this.

Where does Z live in the story?

No Z yet.

Scenarios

Same X and Y, four hypothetical sets of partial tables

Hypothetical tablesThe partial tables in scenarios A–D are invented to illustrate each pattern. They are not computed from the dataset.

Scenario A

Z = finale episode. The early/late difference is about the same among finales and ordinary episodes. Which Lazarsfeld pattern?

Hypothetical partial tables: % of episodes with major violence, by finale episode
Seasons 1–3Seasons 4–6Difference
Zero-order (all episodes)41.0%68.6%+27.5
Ordinary episodes39%66%+27
Finales62%90%+28

Scenario B

Same X, Y and Z, different hypothetical data. Which Lazarsfeld pattern?

Hypothetical partial tables: % of episodes with major violence, by finale episode
Seasons 1–3Seasons 4–6Difference
Zero-order (all episodes)41.0%68.6%+27.5
Ordinary episodes47%51%+4
Finales25%92%+67

Scenario C · Where does Z live in the story?

Suppose the production budget increased over the course of the series. Proposed story: season period → production resources → visually elaborate (major) violence. Where does Z = production budget live in the story?

Scenario C

Controlling for production budget, the season–violence relationship disappears. Which Lazarsfeld pattern?

Hypothetical partial tables: % of episodes with major violence, by production budget
Seasons 1–3Seasons 4–6Difference
Zero-order (all episodes)41.0%68.6%+27.5
Lower budget37%39%+2
Higher budget70%72%+2

Scenario D · Where does Z live in the story?

Suppose a broader change in HBO programming policy came before both the later seasons and the change in content intensity. Where does Z = programming policy live in the story?

Scenario D

Controlling for the programming-policy period, the original relationship disappears. Which Lazarsfeld pattern?

Hypothetical partial tables: % of episodes with major violence, by hbo programming policy
Seasons 1–3Seasons 4–6Difference
Zero-order (all episodes)41.0%68.6%+27.5
Before policy change36%38%+2
After policy change71%73%+2

Same tables, different story

Scenarios C and D produce identical-looking partial tables. Only the position of Z in the story (intervening vs antecedent) separates interpretation from explanation, and that position comes from theory and timing, not from the tables.
PART 6Put the analysis in order

Five steps, one correct sequence

Drag the steps into order (or use the arrow buttons).

Put the five steps of the Lazarsfeld analysis in order.

Drag the steps, or use the arrow buttons to move them.

  1. 1A. Analyze the partial tables and compare them with the zero-order relationship.
  2. 2B. Formulate and interpret the two- and three-variable model and identify the role of the control variable.
  3. 3C. Set up the two-dimensional and three-dimensional model.
  4. 4D. Summarize the findings and classify the result using Lazarsfeld's paradigm.
  5. 5E. Analyze the original two-dimensional crosstab.

Why the 2D table comes first

We cannot say what changed after controlling for Z unless we first know what the original zero-order relationship looked like.
PART 7Correlation

Do longer episodes contain more violence?

Correlation does not imply whacking.

Research question

Do longer episodes contain more violence?

runtime_minutes →violence_event_count →Synthetic data

Measurement levels

Research question: “Do longer episodes contain more violence?” What are the measurement levels of runtime_minutes and violence_event_count?

Pearson or Spearman?

Two scale variables, and the scatterplot shows a roughly linear cloud without extreme outliers. Pearson or Spearman?

SPSS procedure unlocks after you answer the question above. Statistics first, buttons second.
PART 7½Bonus round

Does Tony swear more in longer episodes?

Xruntime_minutes and Yfuck_count. Guess the correlation from the scatterplot before it is revealed, then decide which coefficient deserves to be reported.
runtime_minutes →fuck_count →Synthetic data

Estimate Pearson's r from the cloud.

.00

Pearson or Spearman?

fuck_count is strongly right-skewed and two episodes are extreme outliers. Pearson gives r = .45, Spearman gives rho = .36. Which should you report?

PART 8Nonlinearity trap

Is violence unrelated to the passage of the series?

Violent events per episode, in series order. Look at the plot before you trust the coefficient.
position in the series (episode 1 … 74) →violent events →Synthetic data

r = .00

Pearson, N = 74

Mean violent events by season

  • Season 13.69
  • Season 22.69
  • Season 31.23
  • Season 42.50
  • Season 52.58
  • Season 63.55

Nonlinearity trap

Position in the series vs number of violent events: r = .00. Does r ≈ 0 prove there is no relationship?

Two measures of ‘violence’, two stories

The number of violent events is U-shaped over the series, while the share of episodes with major violence rises in later seasons (Part 3). Different operationalisations of the same idea can behave differently, which is why the research question has to name the variable.
PART 9The three t-tests

One mean, two groups, or two measurements?

For each question: choose the test first. The SPSS procedure appears only after you have answered.

Question A

Question A

“Is the average Sopranos episode longer than a hypothetical 50-minute benchmark?” Which test?

SPSS procedure unlocks after you answer the question above. Statistics first, buttons second.

Question B

Question B

“Do episodes with a therapy scene have a different average violence count from episodes without a therapy scene?” Which test?

SPSS procedure unlocks after you answer the question above. Statistics first, buttons second.

Question C

Question C

Every episode has two coded counts: family_conflict_count and crime_conflict_count. “Within the same episodes, are crime-related conflicts more frequent than family-related conflicts?” Which test?

SPSS procedure unlocks after you answer the question above. Statistics first, buttons second.
PART 10Reading t-test output

Therapy scenes and violent events

Xtherapy_scene as the grouping variable, Yviolence_event_count as the test variable.

Statistically significant. Emotionally complicated.

Group Statistics
therapy_sceneNMeanStd. DeviationStd. Error Mean
1 = therapy scene252.081.8240.365
0 = no therapy scene493.001.7800.254
Independent Samples Test
Levene's Testt-test for Equality of Means
FSig.tdfSig. (2-tailed)Mean Difference
Equal variances assumed0.334.565-2.08672.041-0.920
Equal variances not assumed-2.06947.385.044-0.920
  1. 1Levene's p = .565 ≥ .05: read the ‘Equal variances assumed’ row.
  2. 2Sig. (2-tailed) = .041.
Independent Samples Effect Sizes
StandardizerPoint Estimate
Cohen's d1.794-.513
Hedges' correction1.813-.507
  1. 3Hedges' g: Cohen's d with a small-sample correction. Ignore the sign when judging size.
Synthetic teaching data.

Four questions about the output

0/0 correct on first attempt

Output · 1

Is the difference statistically significant at α = .05?

1 / 4
PART 11Levene's test mini-boss

Before you interpret the t-test, Paulie has one more question.

Levene's H₀: the two groups have equal variances. Its p-value only decides which row of the t-test table to read.

Paulie's question

Levene's test: p = .62. Which row do you read?

Paulie's follow-up

Levene's test: p = .012. Which row now?

PART 12Final boss

Did later seasons become more violent, or is it the finales?

One research problem, every step: roles, measurement levels, the zero-order table, χ² and V, the partial tables, the Lazarsfeld classification, and what you can and cannot claim.

Research question

Did later Sopranos seasons become more violent, or is the apparent relationship mainly due to season finales?

The tables (from the dataset)

Zero-order: early_late × major_violence (N = 74)
No major violenceMajor violenceTotal
Seasons 1–323 (59.0%)16 (41.0%)39
Seasons 4–611 (31.4%)24 (68.6%)35
Three-dimensional: % with major violence, by finale_episode
Layer (Z)Seasons 1–3Seasons 4–6n
Ordinary episodes38.9%65.6%68
Finales66.7%100.0%6

Zero-order: χ²(1) = 5.64, p = .018, V = .28. Ordinary episodes: χ²(1) = 4.85, p = .028, V = .27. Finales: too few episodes for a χ² test.

Synthetic data

The case, step by step

0/0 correct on first attempt

Step 1 · roles

“Did later Sopranos seasons become more violent, or is the apparent relationship mainly due to season finales?” Identify X, Y and Z.

1 / 8

SPSS mode

The three-dimensional crosstab

Analyze›Descriptive Statistics›Crosstabs

Same dialog as Part 3, with finale_episode in the Layer box: SPSS prints one partial table (with χ² and V) per category of Z.

Write a sentence first.

Final report

Case closed (for now)

Simon's Sopranos statistical profile

0 / 58 questions attempted

Strongest area

Not enough answers yet

Review next

Measurement levels & roles

Not attempted yet

Practice only: this is not a course grade. Only first attempts count, and they are stored in this browser and nowhere else.

Synthetic teaching dataset inspired by The Sopranos. Values are created for statistical practice and are not factual episode statistics. This page is an independent teaching exercise. It is not affiliated with or endorsed by HBO or the makers of The Sopranos, and it uses no images, logos or scripts from the show.