PHYC41080 Physics Data Analysis (Python)

Academic Year 2022/2023

The aim is to provide students with a strong grounding in the analysis of experimental Physics data in the Python programming language. The contents will cover the basics of statistics, error analysis and propagation of errors, curve fitting and parameter estimation, chi-squared tests for goodness of fit, Monte Carlo simulations and maximum likelihood methods. Python topics will be intertwined with data analysis topics to build Python skills at the same time. Students will learn from doing examples themselves in-class in an Active Learning Room environment as well as assignments. The error analysis section of the course will pay close attention to the Guide to the expression of Uncertainty in Measurement (G.U.M.) reference document adopted by many scientific organisations and industries.

Show/hide contentOpenClose All

Curricular information is subject to change

Learning Outcomes:

Have an understanding of experimental measurement and uncertainties, including statistical and systematic errors, and to use appropriate precision when quoting uncertainties.

Understand the fundamental statistical distributions that apply to physical measurements.

Be able to characterise data through parameters such as the mean, standard deviation, covariance, weighted mean and uncertainties on the weighted mean.

Be able to propagate errors on measurements through functions of those measurements, both analytically and numerically.

Be able to fit a function to a set of experimental data to derive best-fit parameters including the uncertainties on the parameters and to use the best-fit covariance matrix to calculate confidence intervals.

Be able to apply a chi-squared test to assess goodness of fit and f-test to assess whether extra parameters for nested functions significantly improve the fit.

Be able to apply Kolmogorov–Smirnov test and chi-square tests to compare two distributions.

Have an understanding of and be able to apply the Permutation test and Bootstrap/Jackknife tests.

Be apply to apply the Method of Maximum Likelihood, including the Likelihood Ratio Test, for parameter estimation and significance estimation.

Be able to do all of the above in Python using appropriate libraries.


Indicative Module Content:

Experimental Measurement & Uncertainties
- accuracy, precision, statistical and non-statistical/systematic errors
- presentation of data and significant figures
- measures of a value and spread (mean and standard deviation, parent and sample)

Measurement probability distributions:
- Recap on basic probability theory and statistical distributions
- Binomial
- Poisson
- Normal
- Student-t
- statistical significance and confidence
- statistical trials and corrected probability

The weighted mean and its error

Propagation of Errors:
- error on x and f(x)
- propagation of errors formula and covariance terms
- examples, with and without covariance

Curve Fitting and Confidence Intervals:
- Method of least squares
- Chi-squared fitting
- Interpreting the results of the fit including errors on fit parameters and covariance terms
- Calculate uncertainty on a value calculated from fit function using best-fit parameters
- Confidence region for a fit
- Uncertainties on x & y, how to handle including combining uncertainties into one ordinate and orthogonal distance regression

Chi-squared test for goodness of fit
- Chi-squared distribution, degrees of freedom, P-value
- f-test for nested functions

Comparison of distributions of data with measured and expected distributions.?
- Chi-square comparison of two distributions
- Kolmogorov–Smirnov test

Computer/Matrix Methods for Propagation of Errors

Monte Carlo Methods:
- Permutation test
- Bootstrap/Jackknife

Method of Maximum Likelihood:
- Maximum Likelihood, log likelihood
- Parameter estimation and errors
- Likelihood ratio test

Upper-limit calculations

Python:
- essentials of programming in Python
- NumPy
- Jupyter Notebooks including markdown and LaTeX equations
- MATPLOTLIB and scientific data presentation
- Additional libraries including numdifftools, lmfit, iminuit,

Student Effort Hours: 
Student Effort Type Hours
Lectures

24

Tutorial

12

Autonomous Student Learning

64

Total

100

Approaches to Teaching and Learning:
The module will be delivered through a mixture of presented lecture material and hands-on guided exploration and problem solving in the active learning room class environment. Additional homework exercises will reinforce the skills and help the students achieve the learning outcomes. 
Requirements, Exclusions and Recommendations

Not applicable to this module.


Module Requisites and Incompatibles
Not applicable to this module.
 
Assessment Strategy  
Description Timing Open Book Exam Component Scale Must Pass Component % of Final Grade
Practical Examination: Exam where computer is required. Varies over the Trimester n/a Other No

50

Assignment: A number of assignments will be given throughout the trimester. Unspecified n/a Other No

50


Carry forward of passed components
Yes
 
Resit In Terminal Exam
Spring No
Please see Student Jargon Buster for more information about remediation types and timing. 
Feedback Strategy/Strategies

• Feedback individually to students, post-assessment
• Group/class feedback, post-assessment

How will my Feedback be Delivered?

Assignments will be graded and returned to students with feedback provided.