liveBook · Manning

Statistical significance

As explained in The Well-Grounded Data Analyst

Statistical significance is the degree to which an observed result is unlikely under a specified null hypothesis according to a statistical test.

Statistical significance assesses whether an observed association is unlikely under a specified null hypothesis. A low p-value supports rejecting the null hypothesis, but does not establish a strong association. section 7.2.2

Use statistical significance as one part of a results-driven analysis:

  • Frame a stakeholder hypothesis, inspect the relevant questions and columns, and check missing data and outliers before testing. section 6.3
  • Explore the relationship visually, then select an appropriate statistical test for the variables and hypothesis. section 7.2.1 section 7.2.2
  • Report uncertainty carefully: statistical significance can support or weaken a hypothesis, while correlation size indicates association strength. section 7.2.2 section 6.3

Experience and trust in AI outputs

A heatmap suggested that more experienced developers trusted AI outputs less. Spearman’s rank correlation and Kendall’s tau found significant evidence of no link: the negative correlations were close to zero, so the association was weak. section 7.2.1 section 7.2.2

trust_exp_data = (
    survey_ai_users
    .dropna(subset=["YearsCodePro", "AIBen"], how="any")
    .loc[survey_ai_users["AIBen"] != "No answer given", :]
)

trust_rank = (
    pd.Series(
        trust_exp_data["AIBen"]
        .factorize(sort=True)[0]
    )
    .rank()
)

from scipy.stats import spearmanr, kendalltau

correlation, p_value = spearmanr(
    trust_exp_data["YearsCodePro"],
    trust_rank
)

print("Spearman's\n", correlation, p_value)

correlation, p_value = kendalltau(
    trust_exp_data["YearsCodePro"],
    trust_rank
)

print("Kendall's tau\n", correlation, p_value)

Inspect executable Python code that removes incomplete responses, ranks categorical trust answers, and calculates Spearman’s correlation and Kendall’s tau with p-values. section 7.2.2

How The Well-Grounded Data Analyst covers it

How deep it goes
Explains null-hypothesis testing through p-values and rank-correlation code, but stops short of mathematical derivations.
Examples
Uses developer experience, AI-output trust, heatmaps, Spearman’s correlation, Kendall’s tau, and Python test output.
What it assumes
Assumes survey variables and exploratory analysis, while reinforcing hypotheses, missing-data checks, and stakeholder-oriented interpretation.
What you can do after
Evaluate/understand whether an observed survey association has evidence against its null hypothesis and communicate its strength cautiously.
How it connects
Connects null hypotheses, p-values, correlation, Spearman’s rank correlation, Kendall’s tau, and statistical tests.

Also explained in

Compare how 7 books explain statistical significance →

Related concepts

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