Sie sind auf Seite 1von 10

How Precise Are You?

Calculating Difference on Resistors

Prepared by:

Magpantay, Leo Dominick C.

De Guzman Jan Mark

Perena, John Deniel

Sale, Rechelle Mae G.

Mendoza, Kristine Irish

Preparation for Tertiary Studies Course

Engineering Data Analysis

Electrical and Computer Engineering Department

Batangas State University

Lecturer: Engr. Joshua Manoy


I. Introduction

A resistor is an electrical component that limits or regulates the flow of electrical current in an
electronic circuit. It is also used to provide a specific voltage for active devices like transistors. Resistors
are often color-coded to visually represent their resistance levels. The first few stripes were the digits and
followed by a single stripe that represents the multiplier. For a 4-band resistor, the final band represents
the tolerance.

II. Methodology

The resistors will be measured manually using the color codes and digitally using the digital
ohmmeter. The data will be tabulated and will be treated statistically to show if there is a significant
difference between these values.

III. Scope of the report

This report only focuses on the resistor’s value and not on other factors such as temperature
coefficients and tolerances. The considered period is more or less a whole month starting from November,
2019. This report is also focused only on small resistors and not on big ones.

IV. Findings

Resistor No. Calculated Measured


1 470 467
2 2200 2206
3 1000 998
4 10000 9970
5 220 217.7
6 220 218.2
7 4700 4640
8 5100 5050
9 3300 3256
10 2000 1970
Total 29210 28992.9
Mean 2921 2899.29
Median 2100 2088
Mode 220 #N/A
Variance 9313921.111 9225793.832
Standard Deviation 3051.871739 3037.399189
Table 1. Central Tendency of Data
The measures of central tendency of the given data is done using Microsoft Excel. The
mean is calculated using the command “=AVERAGE(B2:B11)”. Median is calculated using the
command “=MEDIAN(B2:B11)”and mode is also calculated using the command
“MODE.SNGL(B2:B11)”. On the other hand, the variance is calculated using the command
“=VAR.S(B2:B11)” and the standard deviation, “=SQRT(B16)”. The commands were both
applicable to both set of values, Calculated and Measured but depends on the cell location.

Box and Whiskers Plot

Figure 1. Box and Whisker Plot of Calculated


Figure 2. Box and Whisker Plot of Measured

Percent Difference

Resistor No. Measured Calculated Percent differences


1 470 467 1%
2 2200 2206 0%
3 1000 998 0%
4 10000 9970 0%
5 220 217.7 1%
6 220 218.2 1%
7 4700 4640 1%
8 5100 5050 1%
9 3300 3256 1%
10 2000 1970 2%
Table 2. Percent Difference
Figure 3. Data distribution graph

The data distribution graph is done using python’s numpy library. It is


programmed in window’s command prompt.

C:\WINDOWS\system32>python
Python 3.8.0 (tags/v3.8.0:fa919fd, Oct 14 2019, 19:37:50) [MSC v.1916 64 bit (AMD64)]
on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import numpy as np
>>> import pandas as pd
>>> import seaborn as sns
>>> from scipy import stats
>>> from scipy.stats import skew
>>> x = pd.Series(np.array([0.006382979
... , 0.002727273
... , 0.002
... , 0.003
... , 0.010454545
... , 0.008181818
... , 0.012765957
... , 0.009803922
... , 0.013333333
... , 0.015
... ]), name='Percent Difference')
>>> x
0 0.006383
1 0.002727
2 0.002000
3 0.003000
4 0.010455
5 0.008182
6 0.012766
7 0.009804
8 0.013333
9 0.015000
Name: Percent Difference, dtype: float64
>>> ax = sns.displot(x,bins=30, kde=True)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
AttributeError: module 'seaborn' has no attribute 'displot'
>>> ax = sns.distplot(x, bins=30, kde=True)
>>> ax
<matplotlib.axes._subplots.AxesSubplot object at 0x000001DF162AD6D0>
>>> print('Skewness:', skew(x))
Skewness: -0.09780046970907351
>>> import matplotlib.pyplot as plt
>>> plt.show()
>>> ax = sns.distplot(x, bins=50,kde=True)
>>> plt.show()
>>> ax = sns.distplot(x, bins=25,kde=True)
>>> plt.show()
>>> ax = sns.distplot(x, bins=25,kde=True, norm_hist=True)
>>> plt.show()
T-test
The paired sample t-test is done using Microsoft Excel by utilizing Data Analysis functions. The
hypotheses were H0: There is no significant difference between the measured and calculated values of
the resistors. H1: There is a significant difference between the measured and calculated values of the
resistors. The level of significance is 0.05 and the degree of freedom, n-1 = 9.

Column1 Column2 Column3


t-Test: Paired Two Sample for Means

Variable 1 Variable 2
Mean 2921 2899.29
Variance 9313921.11 9225793.83
Observations 10 10
Pearson Correlation 0.99998025
Hypothesized Mean
Difference 0
Df 9
t Stat 2.86156809
P(T<=t) one-tail 0.00936622
t Critical one-tail 1.83311293
P(T<=t) two-tail 0.01873244
t Critical two-tail 2.26215716
Table 3. T-test table

V. Conclusion
When varying resistor values are measured and calculated, differences were shown. Table 1
shows the measures of central tendency of the given data. The calculated (manual) has a mean of 2921
ohms, median of 2100 and mode of 220. Its variance is approximately 9313921.11 ohms 2 and standard
deviation of about 3051.87 ohms.
On the other hand, the measured(digital) has a mean of 2899.29 ohms, median of 2088 and no
mode. Its variance is approximately 9225793.83 ohms2 and standard deviation of about 3037.40 ohms.
These values are likely close to each other but still it needs to be treated statistically to prove its
significance.
Figure 1 and figure 2 both show the box and whisker plot of the data and both are much alike and
similar as shown.
Table 2 shows the percent difference between the measured and calculated values of the resistor.
The most frequent value is about 1% and the maximum percent difference is about 2%. It can also be seen
in the data distribution graph that the data are skewed negatively with skewness value at approximately
-0.0978. It means that majority of the data or scores fall toward the higher side of the scale and
there are very few low scores.
With given hypotheses, the null hypothesis: there is no significant difference between the
measured and calculated values of the resistor. The alternative hypothesis, on the other hand is
there is a significant difference between the measured and calculated values of the resistor. The
conditions were: If the P value is larger than the t-value, reject the null hypothesis and accept the
alternative hypothesis. As shown in table 3, the t-value at approximately 1.833 at one-tail test is
greater than the P-value 0.0094, so the null hypothesis is accepted and the alternative hypothesis
is rejected. Same with two-tailed test with P-value at approximately 0.0187 and t-value at
approximately 0.0187. With P-value<t-value, reject the alternative hypothesis and accept the null
hypothesis.
It is concluded that there is no significant difference between the measured and
calculated values of the resistors. It means that both values are reliable with minimal errors
included. That’s why resistors do have tolerances to let consumers or users estimate the exact
values of each resistor. These differences will not affect the efficiency of the resistors and are still
reliable and function well.
VI. DCOVA
References:

 https://whatis.techtarget.com/definition/resistor
 https://towardsdatascience.com/histograms-and-density-plots-in-python-
f6bda88f5ac0?gi=e4447ffe036a
 https://www.machinelearningplus.com/plots/matplotlib-histogram-python-examples/
 https://www.excel-easy.com/data-analysis.html
 https://www.statisticshowto.datasciencecentral.com/probability-and-statistics/skewed-
distribution/
 https://study.com/academy/lesson/skewed-distribution-examples-definition-quiz.html

Das könnte Ihnen auch gefallen