This assignment has to be made individually. You can start at 13:30h, it has to submitted before 17:30h.
You are allowed to use previous materials you made and used in Python.
Important:
provide enough information so we can understand what you are doing.
you can create cells (as markdown) to create comments and explanations.
you can use # as well to comment.
always use significant figures and units (if given) for your final answer
You are allowed to calculate things by hand as well, but then show or explain your final answer.
import matplotlib.pyplot as plt
import numpy as np
from scipy.optimize import curve_fit
from scipy.stats import norm
Task 1¶
In this task you will show that you understand the basics of Python.
Make an array “x_raw” running from 0 to 100 (including both 0 and 100) with an interval where all elements are integers (so [0,1,2,3...100]). (1pt)
Now use x_raw to make a new array “x_even” which consists of all even numbers in the array “x_raw”. (1pt)
Define a function that returns . Use it to make an array _. (1pt)
Now, replace by 2500. Note, counting to the index corresponding to by hand is not allowed! (1pt)
We now have a distorted dataset.
Use curve fitting to find the best value of and the uncertainty in . Present the two values as an experimental physicist would do. (3pt)
Make a test array from 0 to 100 with an interval of 0.1 and use this test array to graph the function fit into the data. Show the function fit as a dotted red line. (3pt)
### YOUR CODE
Task 2¶
A physical quantity has been measured in order to calculate a different physical quantity . The value of is 1.075 ± 0.003.
Calculate the physical quantity and its uncertainty using the calculus approach for:
- (3pt)
and the functional approach for:
- (3pt)
(Disregard the unit(s))
### YOUR CODE
Task 3¶
Eliza is taking repeated independent measurements using a digital multimeter. However, she notes that every time the same value is showing up. Does this mean that the quantity she is measuring has no uncertainty? Explain. (1pt)
### YOUR ANSWER
Task 4¶
In your final project you received a dataset stored in ‘data.csv’. You are asked to (1) investigate the pattern in the data, (2) define a function that probably fits that pattern, (3) use curve fitting to present the values of the parameters and their uncertainties, (4) plot the fit on the data and study the residuals: investigate whether this these are random noise that can be described using a Gaussian distribution and if so, what the standard deviation is of that noise.
First load the ‘data.csv’ file. Then carry out this data-analysis. (9pt)
### YOUR CODE