Skip to content

Latest commit

 

History

History
57 lines (40 loc) · 2.14 KB

File metadata and controls

57 lines (40 loc) · 2.14 KB

Probability Analysis: Basketball Scoring Data

This project analyzes Stephen Curry shot data from the 2023 season to compute shooting probabilities, apply the binomial distribution, and solve conditional probability questions with Bayes' theorem.

Project Structure

  • basketball_data_analysis.ipynb: Main Jupyter Notebook with data loading, probability calculations, and statistical analysis.
  • data/stephen_curry_shots_2023.csv: Source dataset of shot attempts and game context fields.
  • presentation/Calculate Basketball Scoring Probabilities.pdf: Final presentation deck in PDF format.
  • presentation/public.txt: Public link to the slide deck.

Key Analyses

  1. Overall Shooting Statistics

    • Overall probability of a make (result = True) and miss (result = False).
    • Overall proportion of two-pointers (shot_type = 2) and three-pointers (shot_type = 3).
    • Make/miss breakdown by shot type (2PT vs 3PT).
  2. Binomial Probability

    • Probability Steph makes 3 of the next 4 shots.
    • Probability that 4 of the next 5 shots are three-pointers.
    • Uses the binomial formula and states modeling assumptions (fixed trials, two outcomes, constant probability, independence).
  3. Conditional Probabilities (Future)

    • P(make | 3)
    • P(lead | 3)
    • P(make | 2)
    • P(lead | 2)
  4. Conditional Probabilities (Past) via Bayes' Theorem

    • P(3 | made)
    • P(2 | made)
    • Includes step-by-step Bayes setup and verification against direct counting.

Libraries Used

  • Pandas: Data loading and tabular analysis.
  • Math (comb): Binomial coefficient for probability calculations.

Getting Started

  1. Install dependencies:
    • pip install pandas jupyter
  2. Open the notebook:
    • jupyter notebook basketball_data_analysis.ipynb
  3. Run all cells to reproduce the probability results and calculations.

Presentation

Presentation files are in presentation/:

  • presentation/Calculate Basketball Scoring Probabilities.pdf
  • presentation/public.txt (contains the public Google Slides link)

License

This project is licensed under the MIT License. See LICENSE for details.