100% Free Forever
AI-Powered Learning
Industry Expert Content
Certificates & Badges
Learn At Your Own Pace
Statistics & Probability for Data Science
85 minintermediate

Capstone — Submit Statistics Analysis Project

This final project consolidates the entire Statistics and Probability course into a single, submittable analysis report on the clinical-trial dataset, integrating the descriptive, inferential, and estimation work from the preceding capstone lessons into one coherent, professional deliverable. The project exists as the culminating demonstration that you can take a raw multi-variable dataset and produce a complete, rigorous, decision-ready analysis — the core competency of applied statistics. You will assemble a structured report that describes the data, characterises its distributions, tests the regime's effects with assumption checks and effect sizes, estimates those effects with confidence intervals, and delivers a clear, honest recommendation. The result is a portfolio-quality artifact proving you can wield the full statistical toolkit on a realistic problem from start to finish.

Analogy🏏Cricket
🏏 Think of it like cricket: This project is the full match — not a drill, not a net session, but the real contest where every skill the player has built must combine into a complete, match-winning performance under the selectors' gaze. Just as the match is where a cricketer proves he can integrate footwork, timing, and judgement into actual runs, this project is where you prove you can integrate every statistical skill into a real analysis. Just as one match performance can define a player's selection, this deliverable can define your demonstrated competence. The insight is that the capstone project is the genuine performance that proves mastery, integrating everything into one decisive demonstration.

Learning Objectives

  • Integrate descriptive statistics, distribution fitting, hypothesis testing, and confidence intervals into one coherent analysis.
  • Select and justify the appropriate statistical method for each question and data type.
  • Verify assumptions before every test and report effect sizes alongside significance.
  • Attach confidence intervals to every key estimate, communicating uncertainty honestly.
  • Distinguish statistical significance from practical importance in the conclusions.
  • Produce a clear, structured, reproducible report culminating in a defensible recommendation.

Technical Requirements

  • Load and validate the clinical-trial dataset, inspecting types and missing values.
  • Produce group-wise descriptive summaries with central tendency, spread, and shape.
  • Fit and validate the distribution of the skewed fitness variable with a goodness-of-fit test.
  • Run a paired test, a two-group test, and a chi-square test, each preceded by an assumption check.
  • Report Cohen's d or an equivalent effect size for every comparison.
  • Construct confidence intervals for the treatment effect, injury-rate difference, and fitness median via bootstrap.
  • Perform a power check, then conclude with a recommendation distinguishing statistical from practical significance.

Architecture & Design

The report is structured as a pipeline of stages that mirror the analytical arc: a data-loading and validation stage, a descriptive and distributional stage, an inferential stage with assumption checks and effect sizes, an estimation stage with confidence intervals, and a conclusion stage with the recommendation. This architecture exists because a professional analysis must be both logically ordered and reproducible, with each stage building on the verified outputs of the previous one and every decision documented. The design separates computation from reporting, computing all results first and then assembling them into a readable narrative, which mirrors how real analytical reports are produced. The data flows from raw CSV through description, inference, and estimation into a final structured summary, with each stage's findings informing the methods of the next, and the whole pipeline is reproducible from the dataset and the seed.

Analogy🏏Cricket
🏏 Think of it like cricket: The report's architecture is like a well-structured match report that moves in order from the conditions and team sheets, through the description of play, to the analysis of key moments, and finally to the verdict and recommendations — each section building on the last into a coherent whole. Just as a jumbled report that mixed verdict with team sheets would confuse readers, a disorganised analysis confuses reviewers. Just as the report flows logically from setup to conclusion, the analysis pipeline flows from loading to recommendation. The insight is that a professional deliverable is architected as an ordered, reproducible pipeline where each stage builds on the verified last, culminating in a clear verdict.
python
# capstone_report.py - architecture skeleton
import numpy as np
import pandas as pd
from scipy import stats

class CapstoneAnalysis:
    """End-to-end statistical analysis pipeline for the cricket trial."""

    def __init__(self, csv_path, seed=42):
        self.df = pd.read_csv(csv_path)
        self.rng = np.random.default_rng(seed)
        self.results = {}

    def stage_1_load_validate(self): ...      # types, missing values, shape
    def stage_2_descriptive(self): ...        # group summaries, shape, fitting
    def stage_3_inference(self): ...          # assumption checks, tests, effect sizes
    def stage_4_estimation(self): ...         # confidence intervals, bootstrap
    def stage_5_conclude(self): ...           # recommendation, sig vs practical

    def run(self):
        self.stage_1_load_validate()
        self.stage_2_descriptive()
        self.stage_3_inference()
        self.stage_4_estimation()
        return self.stage_5_conclude()

if __name__ == "__main__":
    report = CapstoneAnalysis("cricket_trial.csv").run()

Phase 1 — Core Implementation

Phase 1 implements the loading, descriptive, and inferential stages, producing the validated data summary and the assumption-checked test results with effect sizes. This phase builds the analytical substance of the report — the description that frames the data and the tests that answer whether the regime works — drawing directly on the descriptive and inferential capstone lessons. It is the core because these stages produce the findings the estimation and conclusion will quantify and communicate.

Analogy🏏Cricket
🏏 Think of it like cricket: Phase 1 is like playing the bulk of the innings — laying the foundation and scoring the runs that the closing overs will build on. Just as the main innings produces the substance of the performance, this phase produces the descriptive and inferential substance of the report. Just as the closing overs depend on a solid innings, the estimation and conclusion depend on these findings. The insight is that Phase 1 builds the analytical core that the remaining phases quantify and present.
python
# capstone_report.py - core stages
def stage_2_descriptive(self):
    df = self.df
    df["improvement"] = df["strike_after"] - df["strike_before"]
    summary = {}
    for grp, sub in df.groupby("group")["improvement"]:
        summary[grp] = {"mean": sub.mean(), "median": sub.median(),
                        "std": sub.std(ddof=1)}
    # Fit fitness distribution
    best_p = {n: stats.kstest(df["fitness"], n, args=getattr(stats, n).fit(df["fitness"]))[1]
              for n in ["norm", "gamma", "lognorm"]}
    self.results["descriptive"] = summary
    self.results["fitness_dist"] = max(best_p, key=best_p.get)

def stage_3_inference(self):
    df = self.df
    t = df[df.group == "treatment"]["improvement"].values
    c = df[df.group == "control"]["improvement"].values
    pooled = np.sqrt((t.var(ddof=1) + c.var(ddof=1)) / 2)
    self.results["effect"] = {
        "p_value": stats.ttest_ind(t, c, equal_var=False)[1],
        "cohens_d": (t.mean() - c.mean()) / pooled,
    }

Phase 2 — Feature Completion

Phase 2 implements the estimation stage and the conclusion, adding confidence intervals for the key metrics and assembling the final recommendation that distinguishes statistical from practical significance. This phase completes the analytical content by quantifying the uncertainty around the findings and translating them into an actionable verdict, drawing on the confidence-interval capstone lesson. It is what turns a set of test results into a decision-ready report.

Analogy🏏Cricket
🏏 Think of it like cricket: Phase 2 is like the closing overs and the post-match verdict — converting the foundation into a final total and then delivering the clear judgement on what it means. Just as the closing overs and verdict complete the match story, the estimation and conclusion complete the report. Just as the verdict must weigh whether the performance was genuinely match-winning, the conclusion must weigh statistical against practical significance. The insight is that Phase 2 quantifies uncertainty and delivers the actionable verdict that completes the analysis.
python
# capstone_report.py - estimation and conclusion
def stage_4_estimation(self):
    df = self.df
    t = df[df.group == "treatment"]["improvement"].values
    c = df[df.group == "control"]["improvement"].values
    diff = t.mean() - c.mean()
    se = np.sqrt(t.var(ddof=1)/len(t) + c.var(ddof=1)/len(c))
    tc = stats.t.ppf(0.975, df=len(t)+len(c)-2)
    self.results["effect_ci"] = (diff - tc*se, diff + tc*se)

def stage_5_conclude(self):
    eff = self.results["effect"]
    lo, hi = self.results["effect_ci"]
    sig = eff["p_value"] < 0.05
    meaningful = abs(eff["cohens_d"]) >= 0.5
    if sig and meaningful:
        rec = (f"Adopt the regime: effect is significant (p={eff['p_value']:.4g}), "
               f"meaningful (d={eff['cohens_d']:.2f}), plausibly +{lo:.1f} to +{hi:.1f}.")
    elif sig:
        rec = "Significant but small effect; weigh cost before adopting."
    else:
        rec = "No significant effect detected; do not adopt on current evidence."
    self.results["recommendation"] = rec
    return self.results

Phase 3 — Polish & Production Readiness

Phase 3 adds the polish that makes the report production-ready: robust handling of edge cases like missing data, clear formatted output of every finding, and a reproducibility guarantee through the fixed seed. This phase exists because a professional deliverable must be robust and reproducible, not merely correct on one run, and the difference between a script that works once and a report that withstands scrutiny lies in this hardening. You will add validation, format the results into a readable report, and ensure anyone can reproduce your exact findings from the dataset and seed.

Analogy🏏Cricket
🏏 Think of it like cricket: Phase 3 is the difference between a player who scores once in the nets and one who performs reliably in every Test. Adding robust handling of edge cases like missing data is like a batter who can adapt to a rain-interrupted, low-bounce pitch instead of only thriving in ideal nets — the report must not crash when a record is incomplete. Clear, formatted output of every finding is like a scorecard any selector can read at a glance, not a scribbled note only you understand. The reproducibility guarantee from a fixed seed is like a technique so grooved that the same delivery produces the same shot every time — anyone rerunning your analysis gets identical results. Just as a professional is judged across a series, not one flattering innings, a deliverable must be robust and reproducible, not merely correct on a single lucky run. The payoff: a report that withstands messy real data and independent scrutiny, turning a script that works once into a production-ready analysis a professional would sign off.
python
# capstone_report.py - production hardening
def stage_1_load_validate(self):
    df = self.df
    assert not df.isnull().any().any(), "Dataset contains missing values"
    assert set(df["group"].unique()) == {"treatment", "control"}, "Bad group labels"
    self.results["n"] = len(df)
    self.results["groups"] = df["group"].value_counts().to_dict()

def format_report(self):
    """Produce the readable final report from computed results."""
    r = self.results
    lines = [
        "=" * 55, "CRICKET TRAINING REGIME — STATISTICAL ANALYSIS", "=" * 55,
        f"Sample: {r['n']} players {r['groups']}",
        f"Fitness distribution: {r['fitness_dist']}",
        f"Treatment effect: p={r['effect']['p_value']:.4g}, "
        f"d={r['effect']['cohens_d']:.2f}",
        f"95% CI for effect: [{r['effect_ci'][0]:.1f}, {r['effect_ci'][1]:.1f}]",
        "-" * 55, f"RECOMMENDATION: {r['recommendation']}", "=" * 55,
    ]
    return "\n".join(lines)

# Reproducible: same seed -> identical results every run

Evaluation Rubric

  • Completeness: all five stages present — loading, descriptive, inference, estimation, conclusion.
  • Correctness: appropriate method chosen for each question and data type, recovering the dataset's known effects.
  • Rigour: assumptions checked before every test, effect sizes reported, power verified.
  • Uncertainty: confidence intervals attached to every key estimate, with bootstrap used for the skewed median.
  • Interpretation: p-values stated in the correct direction, statistical versus practical significance distinguished.
  • Communication: report is clearly structured, readable, and culminates in a defensible recommendation.
  • Reproducibility: analysis runs end to end from the dataset and seed, producing identical results each time.

Extension Challenges: Strengthen the capstone by adding a robustness section that re-runs every test non-parametrically and confirms the conclusions hold, demonstrating the findings do not depend on distributional assumptions. Add a subgroup analysis examining whether the regime's effect differs by player role, using appropriate corrections for the extra comparisons. Finally, produce a visual appendix with grouped boxplots, the fitted fitness distribution, and a forest-plot-style display of every confidence interval, turning the numeric report into a publication-quality document a senior reviewer would commend.

Submit your capstone project

Checking submission status…
Final Exam unlocks when all 35 lessons are complete (35 left)
Lesson 35 of 35
0% complete