Chapter 3 : Errors in Measurements and Their Statistical Analysis

Example 3.1 Page No : 59

In [2]:
# calculating guarantee value of capacitance

# Variables
As  =  1;
Er = 0.05;

# Calculations and Results
Aau = As*(1+Er);
print "Upper limit(micro F) = ", Aau
Aal = As*(1-Er);
print "Lower limit(micro F) = ", Aal
Upper limit(micro F) =  1.05
Lower limit(micro F) =  0.95

Example 3.2 Page No : 61

In [3]:
# calculating percentage limiting error

# Variables
As  =  150.;
Er = 0.01;

# Calculations
dA = As*Er;
As1 = 75.;
Er = (dA/As1)*100;

# Results
print "Percentage limiting error  = ", Er
Percentage limiting error  =  2.0

Example 3.3 Page No : 63

In [4]:
# Calculate the range of readings

# Variables
fsd = 1000.;
TP = 100.;

# Calculations and Results
Efsd = (1./100)*1000;
print "magnitude of Error when specified in terms of full scale deflection (w) = ", Efsd
print "Thus the meter will read between 90W and 110W"

Etv = (1./100)*100;
print "magnitude of Error when specified in terms of true value (w) = ", Etv
print "Thus the meter will read between 99W and 101W"
magnitude of Error when specified in terms of full scale deflection (w) =  10.0
Thus the meter will read between 90W and 110W
magnitude of Error when specified in terms of true value (w) =  1.0
Thus the meter will read between 99W and 101W

Example 3.4 Page No : 65

In [5]:
# Calculate the limiting error in percent

# Variables
dA = 0.05*5*10**-6;
As = 2.5*10**-6;

# Calculations
Er = (dA/As)*100;

# Results
print "percemtage limiting error  = +/-", Er
percemtage limiting error  = +/- 10.0

Example 3.5 Page No : 67

In [7]:
# Calculate the range of readings specified interms of f.s.d. and true value

print "Range when specified interms of f.s.d."

# Calculations and Results
Error_fsd = 1.*1000./100
Range_lower_value = 100-Error_fsd;
print "Lower value of range (kN/m2)", Range_lower_value
Range_upper_value = 100+Error_fsd;
print "Upper value of range (kN/m2)", Range_upper_value
print "Range when specified interms of True value",
Error_true = 1*100/100.
Range_lower_value = 100-Error_true;
print "Lower value of range (kN/m2)", Range_lower_value
Range_upper_value = 100+Error_true;
print "Upper value of range (kN/m2)", Range_upper_value
Range when specified interms of f.s.d.
Lower value of range (kN/m2) 90.0
Upper value of range (kN/m2) 110.0
Range when specified interms of True value Lower value of range (kN/m2) 99.0
Upper value of range (kN/m2) 101.0

Example 3.6 Page No : 69

In [8]:
# Calculate the magnitude and limiting error in ohm and in percentage of the resistance

# Variables
R1 = 37.;
R1_le = 5.*R1/100;
R2 = 75.;
R2_le = 5.*R2/100;
R3 = 50.;
R3_le = 5.*R3/100;

# Calculations and Results
R = R1+R2+R3;
print "Value of resistance (ohm) = ", R

R_le = R1_le+R2_le+R3_le;
print "Limiting Value of resistance (ohm) = ", R_le

Limiting_error_percentage = R_le*100/R;
print "Limiting Value of resistance (percentage) = +/-", Limiting_error_percentage
Value of resistance (ohm) =  162.0
Limiting Value of resistance (ohm) =  8.1
Limiting Value of resistance (percentage) = +/- 5.0

Example 3.7 Page No : 71

In [9]:
# calculate the value of  relative limiting error in resistance

# Variables
Re_P = 1.5;
Re_I = 1;

# Calculations
Re_resistance = (Re_P+2*Re_I);

# Results
print "the value of  relative limiting error of resistance in percentage(+/-) = ", Re_resistance
the value of  relative limiting error of resistance in percentage(+/-) =  3.5

Example 3.8 Page No : 73

In [10]:
# Calculate the guaranteed values of the resistance

# Variables
R1 = 100.;
R1_le_perunit = 0.5; # R1_le_perunit indicates dR1/R1  =  0.5%
R2 = 1000.;
R2_le_perunit = 0.5;
R3 = 842.;
R3_le_perunit = 0.5;

# Calculations and Results
Rx = R2*R3/R1;
print "Value of resistance (ohm) = ", Rx
Rx_le_perunit = R1_le_perunit+R2_le_perunit+R3_le_perunit;

print "Limiting Value of resistance per unit (dRx/Rx) = ", Rx_le_perunit
Er_Le = Rx_le_perunit*Rx/100;
print "Limiting Value of resistance (ohm) = +/-", Er_Le
print "Guarantee value of the resistance (ohm) = ",
G1 = Rx+Er_Le;
G2 = Rx-Er_Le;
print G1,G2
Value of resistance (ohm) =  8420.0
Limiting Value of resistance per unit (dRx/Rx) =  1.5
Limiting Value of resistance (ohm) = +/- 126.3
Guarantee value of the resistance (ohm) =  8546.3 8293.7

Example 3.9 Page No : 75

In [11]:
# Calculate the percentage limiting error and range of resistance values
print "error in decade a =   so, decade a is set at 4000 ohm",
Er_a = 4000.*0.1/100;
print Er_a
print "error in decade b =   so, decade b is set at 600 ohm",
Er_b = 600*0.1/100.;
print Er_b
print "error in decade c =   so, decade c is set at 30 ohm",
Er_c = 30*0.1/100.;
print Er_c
print "error in decade d =   so, decade d is set at 9 ohm",
Er_d = 9*0.1/100;
print Er_d
Er_total = Er_a+Er_b+Er_c+Er_d;
Re_le_percentage = Er_total*100./4639;
print "Percentage Relative limiting error = ", Re_le_percentage
Range_lower = 4639-Er_total;
print "Lower value of range (ohm) = ", Range_lower
Range_upper = 4639+Er_total;
print "upper value of range (ohm) = ", Range_upper
error in decade a =   so, decade a is set at 4000 ohm 4.0
error in decade b =   so, decade b is set at 600 ohm 0.6
error in decade c =   so, decade c is set at 30 ohm 0.03
error in decade d =   so, decade d is set at 9 ohm 0.009
Percentage Relative limiting error =  0.1
Lower value of range (ohm) =  4634.361
upper value of range (ohm) =  4643.639

Example 3.10 Page No : 77

In [12]:
import math 
# Calculate the magnitude of power and limiting error

# Variables
F = 4.58;
L = 397.;
R = 1202.*10**-9;
t = 60.;

# Calculations and Results
P = (2*math.pi*9.81*F*L*R)/(t*10**6);
print "Magnitude of power (W) = ", P
dF_pu = 0.02/F; # per unit error in force
dL_pu = 1.3/L; # per unit error in Length
dR_pu = 1/R; # per unit error in revolution
dt_pu = 0.5/t; # per unit error in time
dP_pu =  dF_pu+dL_pu+dR_pu+dt_pu;
dP_le = dP_pu*P;
print "Magnitude of limiting error in power (W)", dP_le
Magnitude of power (W) =  2.24521573806e-09
Magnitude of limiting error in power (W) 0.00186789998434

Example 3.11 Page No : 79

In [13]:
# Calculate the magnitude of Force and limiting error

# Variables
E = 200.*10**9;
L = 25.*10**-3;
b = 4.75*10**-3;
d = 0.9*10**-3;

# Calculations and Results
I = (b*d**3)/12;
x = 2.5*10**-3;
F = (3*E*I*x)/(L**3);
print "Magnitude of Force (N) = ", F

dE_pu = 0./E; # per unit error in E
db_pu = 0.0075/b; 
dd_pu = 0.0075/d;  
dx_pu = 0.025/x; 
dL_pu = 0.025/L;
dF_pu =  (dE_pu+db_pu+3*dd_pu+dx_pu+3*dL_pu)*10**-3;

print "limiting error in force (N) = +/-", dF_pu
Magnitude of Force (N) =  27.702
limiting error in force (N) = +/- 0.0395789473684

Example 3.12 Page No : 81

In [14]:
# calculate the power loss and relative error 

# Variables
I = 64.*10**-3;
R = 3200.;

# Calculations and Results
P = (I**2)*R;
print "Power(W) = ", P
Re = 2*0.75+0.2;
print "Relative error (%) = ", Re
Power(W) =  13.1072
Relative error (%) =  1.7

Example 3.13 Page No : 83

In [15]:
# Calculate the true power as a percentage of measured power

# Variables
I = 30.4;
R = 0.015;

# Calculations
I_true = I*(1+0.012);
R_true = R*(1-0.003);
P_true = (I_true**2)*R_true;
P_measured = (I**2)*R;
R = P_true*100/P_measured;

# Results
print "true power as a percentage of measured power(%) =  ", R
true power as a percentage of measured power(%) =   102.1071568

Example 3.14 Page No : 85

In [16]:
#calculate the total resistance, error of each register and fractional error of total resistance

# Variables
R1 = 250.;
R2 = 500.;
R3 = 375.;

# Calculations and Results
R_true = 1/((1/R1)+(1/R2)+(1/R3));
print " True value of resistance(ohm) = ", R_true

dR1 =  0.025*R1;
dR2 = -0.36*R2;
dR3 = 0.014*R3;
R1_effective = R1+dR1;
R2_effective = R2+dR2;
R3_effective = R3+dR3;
R_effective = 1/((1/R1_effective)+(1/R2_effective)+(1/R3_effective));
print " Effective value of resistance(ohm) = ", R_effective

Fractional_error = (R_true-R_effective)/R_true;
print "Fractional_error", Fractional_error
 True value of resistance(ohm) =  115.384615385
 Effective value of resistance(ohm) =  103.548741621
Fractional_error 0.102577572617

Example 3.15 Page No : 87

In [17]:
import math 
#
print "When all the components have 0% error then resonant frequency (Hz)",

# Variables
L = 160.*10**-6;
C = 160.*10**-12;
fr = (1./(2*math.pi))*(1/(L*C))**0.5;
print fr

# Calculations and Results
print "When all the components have +10% error then resonant frequency (Hz)",
L_new = (160.*10**-6)+0.1*L;
C_new = (160.*10**-12)+0.1*C;
fr_new = (1./(2*math.pi))*(1/(L_new*C_new))**0.5;
print fr_new

error = (fr_new-fr)/fr;
print "error = ", error

print "When all the components have -10% error then resonant frequency (Hz)",
L_new = (160.*10**-6)-0.1*L;
C_new = (160.*10**-12)-0.1*C;
fr_new = (1./(2*math.pi))*(1/(L_new*C_new))**0.5;
print fr_new

error = (fr_new-fr)/fr;
print "error = ", error
When all the components have 0% error then resonant frequency (Hz) 994718.394324
When all the components have +10% error then resonant frequency (Hz) 904289.449386
error =  -0.0909090909091
When all the components have -10% error then resonant frequency (Hz) 1105242.66036
error =  0.111111111111

Example 3.16 Page No : 89

In [18]:
import math 
# calculate the Volume and relative error 

# Variables
L = 250.;
d = 50.;

# Calculations and Results
V = ((math.pi/4)*d**2)*L;
print "Volume(mm3) = ", V
Re = 2*0.2-0.5;
print "Relative error (%) = ", Re
Volume(mm3) =  490873.852123
Relative error (%) =  -0.1

Example 3.17 Page No : 91

In [19]:
# calculate the per unit change in the value of spring for different temperature ranges

# Variables
dG_pu = -240*10**-6;
dD_pu = 11.8*10**-6;

# Calculations and Results
print "for temperature change of 20 degree C to 50 degree C (%)  = ",
d_th = 30;
dK_pu = (dG_pu+dD_pu)*d_th*100;
print dK_pu

print "for temperature change of 20 degree C to -50 degree C (%)  = ",
d_th = -70;
dK_pu = (dG_pu+dD_pu)*d_th*100;
print dK_pu
for temperature change of 20 degree C to 50 degree C (%)  =  -0.6846
for temperature change of 20 degree C to -50 degree C (%)  =  1.5974

Example 3.18 Page No : 93

In [20]:
# Calculate apparent resistance, actual resistance and error

# Variables
Et = 100.;
It = 5.*10**-3;

# Calculations and Results
Rt = Et/It;
print "apparent value of resistance (ohm) = ", Rt
Rv = 1000.*150;

Rx = Rt*Rv/(Rv-Rt);
print "true value of resistance(ohm)", Rx

Er_percentage = (Rt-Rx)/Rx*100;
print "percentage error = ", Er_percentage
apparent value of resistance (ohm) =  20000.0
true value of resistance(ohm) 23076.9230769
percentage error =  -13.3333333333

Example 3.19 Page No : 95

In [21]:
# Calculate apparent resistance, actual resistance and error

# Variables
Et = 40.;
It = 800.*10**-3;

# Calculations and Results
Rt = Et/It;
print "apparent value of resistance (ohm) = ", Rt
Rv = 1000.*150;
Rx = Rt*Rv/(Rv-Rt);
print "true value of resistance(ohm)", Rx
Er_percentage = ((Rt-Rx)/Rx)*100;
print "percentage error = ", Er_percentage
apparent value of resistance (ohm) =  50.0
true value of resistance(ohm) 50.0166722241
percentage error =  -0.0333333333333

Example 3.20 Page No : 97

In [22]:
#Calculate the error and percentage error in the measurement of deflection

# Variables
l = 0.2;
E = 200*10**9;
b = 20.*10**-3;
d = 5.*10**-3;
D = (4.*l**3)/(E*b*d**3);
F = 1*9.81;

# Calculations and Results
x_true =  D*F;
print "True value of deflection", x_true
x_indicated = D*10.31/(1+.1*D);
print "Indicated value of deflection", x_indicated
Er = x_indicated-x_true;
print "error = ", Er
Er_percentage = Er*100/x_true;
print "Percentage error = ", Er_percentage
True value of deflection 0.00062784
Indicated value of deflection 0.000659835777051
error =  3.1995777051e-05
Percentage error =  5.09616734375

Example 3.21 Page No : 99

In [25]:
import math 
from numpy import array
#to find the mean,deviations from the mean, Average deviation, standard deviation and variance

x = [532. ,548, 543, 535, 546, 531, 543, 536];
X = sum(x);
n = 8; 
a = 0.;

# Calculations and Results
Mean = X/n;
print "mean (kHZ)", X/n
d = []
for i in range(n):
    d.append(x[i]-Mean)
    print "deviations  = ", d[i]
    a = a+(abs(d[i]))
 
d_average = a/n;
print "Average deviation (kHz) = ", d_average
d_2 = sum(array(d)**2);
s = math.sqrt(d_2/(n-1))
print "standard deviation(kHz)", s
V = s**2;
print "varaince (kHZ)2 = ", V
mean (kHZ) 539.25
deviations  =  -7.25
deviations  =  8.75
deviations  =  3.75
deviations  =  -4.25
deviations  =  6.75
deviations  =  -8.25
deviations  =  3.75
deviations  =  -3.25
Average deviation (kHz) =  5.75
standard deviation(kHz) 6.54107898482
varaince (kHZ)2 =  42.7857142857

Example 3.22 Page No : 101

In [28]:
import math
from numpy import array
#to find the mean,standard deviation, probable error and range

# Variables
x = [41.7, 42, 41.8, 42, 42.1, 41.9, 42, 41.9, 42.5, 41.8];
X = sum(x) 
print X
d = [-.27, .03, -.17, .03, .13, -.07, .03, -.07, .53, -.17];

# Calculations and Results
d_2 = sum(array(d)**2);
n = 10.;
print "mean length(deg C)", X/n
print "standard deviation(if data is infinite)(deg C)", math.sqrt(d_2/n)
print "standard deviation(deg C)", math.sqrt(d_2/(n-1))
r1 = .6745*math.sqrt(d_2/(n-1));
print "probable error of 1 reading(deg C)", r1
print "probable error of mean(deg C)", r1/math.sqrt(n-1)
print "range(deg C)", max(x)-min(x)
419.7
mean length(deg C) 41.97
standard deviation(if data is infinite)(deg C) 0.21
standard deviation(deg C) 0.221359436212
probable error of 1 reading(deg C) 0.149306939725
probable error of mean(deg C) 0.0497689799083
range(deg C) 0.8

Example 3.23 Page No : 103

In [31]:
import math 
from numpy import array
#to find the arithematic mean, maen deviation,standard deviation, prpobable error of 1 reading, standard deviation and probable error of mean, standard deviation of standard deviation

# Variables
T = [397, 398, 399, 400, 401, 402, 403, 404, 405];
f = [1, 3, 12, 23, 37, 16, 4, 2, 2];

# Calculations and Results
Tf = sum(abs(array(T).transpose()*f));
print "mean temp(deg C)", Tf/sum(f)
d = [-3.78, -2.78, -1.78, -.78, .22, 1.22, 2.22, 3.22, 4.22];
d = array(d)
print "mean deviation(deg C)", sum(array(f).transpose()*d)/sum(f)
print "standard deviation(deg C)", math.sqrt(sum(array(f).transpose()*d**2)/sum(f))
print "probable error of 1 reading(deg C)", .6745*math.sqrt(sum(array(f).transpose()*d**2)/sum(f))
print "probable error of mean(deg C)", (.6745*math.sqrt(sum(array(f).transpose()*d**2)/sum(f)))/math.sqrt(sum(f))
print "standard deviation of mean(deg C)", (math.sqrt(sum(array(f).transpose()*d**2)/sum(f)))/math.sqrt(sum(f))
print "standard deviation of standard deviation(deg C)", (math.sqrt(sum(array(f).transpose()*d**2)/sum(f)))/math.sqrt(sum(f)*2)

 
 mean temp(deg C) 400
mean deviation(deg C) -1.7763568394e-17
standard deviation(deg C) 1.38260623462
probable error of 1 reading(deg C) 0.932567905249
probable error of mean(deg C) 0.0932567905249
standard deviation of mean(deg C) 0.138260623462
standard deviation of standard deviation(deg C) 0.0977650244208

Example 3.24 Page No : 105

In [33]:
import math
#to find probable no of resistors

# Variables
x = .15;    #deviation 
o = .1;    #standard deviation
t = x/o;
A = .4432    #area under gaussian curve corresponding to t

# Calculations
n = 2*A*1000;

# Results
print "no of resistors", math.floor(n)
no of resistors 886.0

Example 3.25 Page No : 107

In [34]:
import math 
#to find no of 100 rsding exceed 30mm

# Variables
x = 30-26.3;    #mean value 26.3
r = 2.5;
o = r/.6745;
t = x/o;
A = .3413;#area under gaussian curve corresponding to t

# Calculations
n = 2*A*100;
nn = 100-math.floor(n);

# Results
print "no of readings exceed", nn/2
no of readings exceed 16.0

Example 3.26 Page No : 109

In [35]:
import math 
#to find no of rods of desired length

# Variables
n = 25000.;    #no of rods
n1 = 12500.; #length>10mm
n2 = 2000.;    #length>10.25
a = n1-n2;    #10<length<10.25
p = a/n;
t = 1.41;    #umath.sing p

# Calculations
t1 = t*2;
p1 = .4975;
b = p1*n;    #9.5<length<10

# Results
print "total no of rods", a+math.floor(b)
total no of rods 22937.0

Example 3.27 Page No : 111

In [36]:
import math 
#to find standard deviation and probability of error

# Variables
p = .2;
x = .8;
t = .5025;

# Calculations and Results
sd = x/t;
print "stndard deviation", sd
x = 1.2;
t = x/sd;
p = 2*.2743;
print "probability of error", p
stndard deviation 1.592039801
probability of error 0.5486

Example 3.28 Page No : 113

In [37]:
import math 
#to find no of expected readings

# Variables
x = 20;
h = 0.04;

# Calculations
sd = 1/(math.sqrt(2)*h);
t = x/sd;
P = .3708;

# Results
print "no of expected readings", math.ceil(2*P*x)
no of expected readings 15.0

Example 3.29 Page No : 115

In [38]:
import math 
#to calculate precision index of instrument

# Variables
t = .675;
x = 2.4;

# Calculations and Results
sd = x/t;
h = 1/(math.sqrt(2)*sd);
print "precision index", h
t = (50-44)/sd;
p = .45;
n = 8*30;    #sept month no of measurements
a = ((.5-p)*n);
print "no of false alarms", a

rn = a/2;    #reduced no of false alarms
p1 = rn/n;
P = .5-p1;
t = 1.96;
sd = (50-44)/t;
h = 1/(math.sqrt(2)*sd);
print "precision index", h
precision index 0.198873782209
no of false alarms 12.0
precision index 0.230988215188

Example 3.30 Page No : 117

In [39]:
#to find confidence interval for given confidence levels

# Variables
cl = [.5, .9, .95, .99];
s = .22;
d = [.7, 1.83, 2.26, 3.25];
def ci(b):
    return s*b;

# Calculations
CI = [0,0,0,0]
CI[0] = ci(d[0]);
CI[1] = ci(d[1]);
CI[2] = ci(d[2]);
CI[3] = ci(d[3]);

# Results
print "confidence interval", CI
confidence interval [0.154, 0.4026, 0.4972, 0.715]

Example 3.31 Page No : 119

In [41]:
import math 
from numpy import array
#to point out the reading that can be rejected by chavenets criterion

# Variables
x = array([5.3, 5.73, 6.77, 5.26, 4.33, 5.45, 6.09, 5.64, 5.81, 5.75])*10**-3;
d = array([-.313, .117, 1.157, -.353, -1.283, -.163, .477, .027, .197, .137])*10**-3;
n = 10.;

# Calculations
X = sum(x)/n;
s = math.sqrt(sum(d**2)/(n-1));
a = abs(d)/s
print a


for i in range(10):
    if a[i]>1.96:
        print "rejected value", x[i]
[ 0.49953805  0.18672828  1.84653522  0.56337678  2.04762722  0.26014282
  0.76127684  0.04309114  0.31440574  0.21864765]
rejected value 0.00433

Example 3.32 Page No : 121

In [44]:
import math 
from numpy import array
#calculate standard deviation

# Variables
x = array([.9 ,2.3, 3.3, 4.5, 5.7, 6.7]);
y = array([1.1, 1.6, 2.6, 3.2, 4 ,5]);
n = 6.;

# Calculations
a = ((n*sum(x*y)-(sum(x)*sum(y)))/((sum(x**2)*n)-sum(x)**2));
b = ((sum(y)*sum(x**2)-(sum(x)*sum(x*y)))/((sum(x**2)*n)-sum(x)**2));

sdy = math.sqrt((1/n)*sum((a*x+b-y)**2));
sdx = sdy/a;

sa = math.sqrt(n/(n*sum(x**2)-sum(x)**2))*sdy;
sb = math.sqrt(sum(x**2)/(n*sum(x**2)-sum(x)**2))*sdy;

# Results
print "s_a", sa
print "s_b", sb
s_a 0.0354898238647
s_b 0.155116651415

Example 3.34 Page No : 123

In [45]:
import math 
#determine value of total current considering errors as limiting errors ans as smath.radians(numpy.arcmath.tan(rd deviations

# Variables
I1 = 200.;
I2 = 100.;
dI1 = 2.;
dI2 = 5.;

# Calculations and Results
I = I1+I2;
dI = ((I1/I)*(dI1/I1)+(I2/I)*(dI2/I2));
print "error considered as limiting errors"
print "I", I
print "dI", dI*I
sdI = math.sqrt(dI1**2+dI2**2);
print "error considered as standard deviations"
print "I", I
print "sdI", sdI
error considered as limiting errors
I 300.0
dI 7.0
error considered as standard deviations
I 300.0
sdI 5.38516480713

Example 3.35 Page No : 125

In [46]:
#determine probable error in the computed value of resistnce

# Variables
r_V = 12.;
I = 10.;
r_Rv = r_V/I;
V = 100.;
r1 = 2.;

# Calculations
r_Ri = V*r1/I**2;
r_R = math.sqrt(r_Rv**2+r_Ri**2);

# Results
print "r_R", r_R
r_R 2.33238075794

Example 3.37 Page No : 127

In [48]:
import math 
#to find Cq and its possible errors

# Variables
d = 12.5;
A = (math.pi/4)*d**2*10**-6;
W = 392.;
t = 600.;
p = 1000.;
g = 9.81;
h = 3.66;

# Calculations and Results
Cq = W/(t*p*A*math.sqrt(2*g*h));
print "Cq", Cq
dW = .23/W;
dt = 2/t;
dp = .1/100;
dA = 2*.002;
dg = .1/100;
dh = .003/h;
dd = .002;
dCq = Cq*(dW+dt+dp+dA+dg/2+dh/2);
print "%age absolute error", dCq*100/Cq

sdCq = Cq*math.sqrt(dW**2+dt**2+dp**2+4*dd**2+.25*(dg**2+dh**2));
print "%age standard deviation error", sdCq*100/Cq
Cq 0.628253425224
%age absolute error 0.982990409278
%age standard deviation error 0.537339132325

Example 3.38 Page No : 129

In [49]:
import math 

# Variables
V = 110.2;
I = 5.3;

# Calculations and Results
P = V*I
print "power(W) dissipated", P
w_v = .2;
w_i = 0.06;
dp = math.sqrt((w_v*I)**2+(w_i*V)**2);
print "uncertainity in power(%)", dp*100/P
power(W) dissipated 584.06
uncertainity in power(%) 1.14653078526

Example 3.39 Page No : 131

In [50]:
import math 
#to find uncertainity in combined resistance in both series and in parrallel

# Variables
R1 = 100.;
R2 = 50.;
wR1 = .1;
wR2 = 0.03;

# Calculations and Results
print "series conn"
R = R1+R2
print "resistance(ohm)", R
dR1 = 1;
dR2 = 1;
wR = math.sqrt((dR1*wR1)**2+(dR2*wR2)**2)
print "uncertainity in resistance(ohm)", wR

print "parrallel conn"
R = R1*R2*(R1+R2)**-1
print "resistance(ohm)", R
dR1 = (R2/(R1+R2))-((R1*R2)/(R1+R2)**2);
dR2 = (R1/(R1+R2))-((R1*R2)/(R1+R2)**2);
wR = math.sqrt((dR1*wR1)**2+(dR2*wR2)**2)
print "uncertainity in resistance(ohm)", wR
series conn
resistance(ohm) 150.0
uncertainity in resistance(ohm) 0.104403065089
parrallel conn
resistance(ohm) 33.3333333333
uncertainity in resistance(ohm) 0.0173561103909

Example 3.40 Page No : 133

In [51]:
import math 
#to calculate uncertainity in measurement

# Variables
l = 150;
dl = 0.01;
b = 50;

# Calculations and Results
wA = l*dl;
print "when no uncertainity in measurement of length"
print "uncertainity in measurement of area(m*m)", wA

print "when no certainity in measurement of length"
wA = 1.5*1.5;
wB = 0.01;
wL = math.sqrt((wA**2-(l*wB)**2)/b**2);
print "uncertainity in measurement of length(m)", wL
when no uncertainity in measurement of length
uncertainity in measurement of area(m*m) 1.5
when no certainity in measurement of length
uncertainity in measurement of length(m) 0.0335410196625

Example 3.41 Page No : 135

In [53]:
import math 
#to calculate uncertainity in power

# Variables
E = 100.;
dE = .01;
I = 10.;
dI = 0.01;
R = 10.;
dR = .01;

# Calculations and Results
dP = math.sqrt(4*dE**2+dR**2)*100;    #P = E**2/R
print "%age uncertainity in power measurement", dP

dP = math.sqrt(dE**2+dI**2)*100;    #P = E*I
print "%age uncertainity in power measurement", dP
%age uncertainity in power measurement 2.2360679775
%age uncertainity in power measurement 1.41421356237