A key component of scientific research is the analysis pipeline, the analytical and computational steps that convert a dataset of raw measurements into meaningful results. The process of extracting relevant features from long tables of numbers is a sort of art form, as there is ambiguity at every step: how should one determine what parameters of a given model best fit the data? Or how can one establish confidence that their preferred model is in fact the one that best describes the data?
In this module, students will be introduced to common steps in an analysis pipeline. They will gain practice in processing datasets into more compact histograms and curve fitting the distributions to possible underlying models. Students will also learn how to quantify how well a hypothesized matches the true model that produced the dataset.
After completing this module, students should feel comfortable:
(Physics Goals)
- using histograms as a tool to visualize large datasets
- evaluating how well a given model fits a dataset
- constructing their own analysis pipelines
(Data Science Goals)
- using built-in functions from
numpyandscipyto produce histograms from a dataset - using built-in functions from
numpyandscipyto curve fit a distribution - writing their own code to do any of the above tasks, if desired
Students are expected to be familiar with python, numpy, and matplotlib.
Four in-class notebooks will guide students through the analysis of the radioactive decays of a toy “Uranium-241” sample. The notebooks will cover:
- creating histograms from large datasets (
01_introduction_to_histograms.ipynb) - curve fitting analytical models to histograms (
02_introduction_to_curve_fitting.ipynb) - evaluating how well a fit model describes the dataset (
03_goodness_of_fit.ipynb)- Bonus for an advanced topic, students can learn about using the Kolmogorov-Smirnov goodness-of-fit-test for histograms (
03a_kolmogorov_smirnov_GoF.ipynb)
- Bonus for an advanced topic, students can learn about using the Kolmogorov-Smirnov goodness-of-fit-test for histograms (
- creating pull flows to gauge the residuals of a fit (
04_pull_plots.ipynb)
Estimated time to complete: 60 minutes per notebook
A short quiz will provide problems to students that challenge implicit assumptions they might have developed while completing the notebooks.
Estimated time to complete: 30 minutes
The homework assignment is a realistic data analysis task that draws upon the material introduced in the in-class notebooks.
Students will be given a dataset of
- calculating and histogramming
$m_X$ candidates - fitting the distribution, and
- comparing their recovered value of
$m_X$ with the value that their “theorist friend” has predicted.
Estimated time to complete: 60 - 90 minutes
Several datasets are provided to accopany this module. We also provide iPython notebooks for instructors to re-generate the datasets, if they wish to change any of the relevant parameters.
The notebook data_generation.ipynb creates:
- (for the in-class notebooks) two files (
geiger_counts_A.txtandgeiger_counts_B.txt) containing a few thousand Poisson distributed values, meant to represent the number of clicks heard per minute from a Geiger counter placed near the sample. - (for the quiz questions) one file
quiz_dataset.txtcontains of a generic signal (gaussian, 3000 events) + background (exponential, 5000 events) dataset.
The notebook homework_dataset_generation.ipynb creates:
- (for the homework) one file
ee_collisions.txtcontaining a sample of 10,000 simulated$ee \rightarrow abcd$ collisions. The dataset contains four-momenta and charge information for each daughter particle. You must havepyROOTinstalled to be able to run this notebook.
These notebooks might be shown in the first two weeks of an undergraduate laboratory course. Additionally, the homework could be given as a standalone assignment for an undergraduate Particle Physics course.
- Module 4: Residuals and pull plots
- Module 3: adding in Confidence Intervals
- Module 1: Other data visualizations (i.e. scatter plots, time series)
- Module 5: (From scratch) deep learning Higgs detection
- Module 2: Mention non-grid search methods of optimization
