Question: ( Taylor 1 9 9 7 , pp . 1 8 2 - 8 , or Barford 1 9 8 5 , Section 3 .

(Taylor 1997, pp.182-8, or Barford 1985, Section 3.3). The results are:
c=i?xi2i?yi-i?xii?xiyi
and
m=Ni?xiyi-i?xii?yi
with the error in the intercept,
c=CUi?xi22
and the error in the gradient,
m=CUN2
where ?4
=Ni?xi2-(i?xi)2
and the so-called common uncertainty CU is defined as
CU=1N-2i?(yi-mxi-c)22.
Suppose that measurements are made of an object-lens-image system which should follow
1p+1q=1f
rearranging this gives
1p=-1q+1f
which means that a graph of 1p vs 1q should have a slope of -1 and a y-intercept of 1f.
Complete the code cell below to calculate the best fit slope and y-intercept as well as their uncertainties for an object-lensthe equations on page 58. Report your answer including units (if applicable) to the correct number of digits.
import numpy as np
# Object and image distances and uncertainties
p=np.array([0.8000,0.5000,0.3000,0.2000,0.1800]) # meters
punc = np. array([0.0005,0.0005,0.0005,0.0005,0.0005]) # meters
q=np.array([0.163,0.182,0.242,0.40,0.52]) # meters
qunc = np.array , of..01,0.01 meters
# Define x and y values
x=1q
y=1p
# Calculate the uncertainty in x and y using the calculus method dxdq=-1q****2
x_err = np.sqrt ((dxdq*qunc)****2
# Fill in code to calculate the uncertainty in y and assign to a
# variable called y_err
# Calculate the best fit slope and y-intercept using the equations
# on pg 58 of Huges & Hase
# Fill in the code to perform these calculations. I
# Print the results to the screen print('Slope ={:.2f} lu00B1{:.2f}'. format (m, alpham))
print ('y-int ={:.2f} lu00B1{:.2f}, format , alphac))
# Modify the print commands to display the correct number of digits.
 (Taylor 1997, pp.182-8, or Barford 1985, Section 3.3). The results are:

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!