Uploaded by Joshin Johnkutty

Phy110L - Lab 0 - Graphing Instructions Fall WINDOWS 2023 (1)

advertisement
Quinnipiac University
Lab 0 – Graphing in Excel
Force vs Displacement
6
Force (N)
5
y = 31,022x + 0,28
R² = 0,9932
4
3
2
1
0
0
0,02
0,04
0,06
0,08
0,1
0,12
0,14
0,16
Displacement (x)
PHY110 Lab – General Physics Lab
Objectives
1. Format a table in excel
2. Use the calculator feature in excel to calculate an average
3. Generate at XY Plot with best fit line
4. Linearize and graph nonlinear equation
5. Calculate the spring constant of a spring from the slope of the graph
6. Identify and interpret the y-intercept
7. Analyze the R2 value of a graph
Introduction
Graphing
In physics, we ultimately seek to identify behavioral trends or relationships from the collected
data, which can be compared to a numerical equation or model. The most common way of
accomplishing this is by creating an XY scatter plot of the data. In an XY graph, the independent
variable is plotted on the X-axis and the dependent variable is plotted on the Y -axis, as seen in
Figure 1.
Figure 1: Sample scatter plot created in Microsoft Excel. Notice that the Y-axis and X-axis are labeled with their
corresponding units. The experimental data have square plot markers, and there is a solid line of best fit (which is
different from a connect-the-dots type of line). The equation of the line of best fit and the R2 is displayed on the
chart
Each (X,Y) pair in a data table represents a single point on the graph. The total number of points
on the graph will equal the number of trials performed in the experiment. If a single trial consists
of many repeated measurements, then each data point is represented by the average measurement
result for each trail. Excel uses an algorithm to calculate the best model based on your data.
Although we use the variables X and Y to describe the axes, any recorded data can be represented
on a graph. In today's experiment, we will investigate the graphical relations between the different
sets of data. The easiest graphical trend to analyze is a linear relationship, i.e., the line of best line.
Physical quantities that obey a linear relationship will follow the mathematical
y = mx+b
where x is the independent variable, y is the dependent variable, m is the slope of the line and b is
the y-intercept (where the line crosses the y-axis at x=0). By definition, the slope m of a line is
constant and is calculated by finding the change of y over the change of x.
In physics, the slope and y-intercept have physical meaning. The slope of a displacement vs. time
graph is velocity. Since the y axis represents displacement and the x axis represent time,
π‘š=
βˆ†π‘¦ βˆ†π‘‘
=
=𝑣
βˆ†π‘₯ βˆ†π‘‘
Therefore, the velocity of the object can be determined by reading the equation of the line from
the graph. In Figure 1, the equation of the line is y = 0.1974 x + 0.0104. The slope, or the velocity
is 0.1974 m/s. The other feature in the linear equation is the y-intercept. To interpret this feature,
look at the physical meaning of x and ask what the initial conditions would be if x were zero. For
Figure 1, x represents time. If time is zero, then there is no motion or passing of motion, therefore
y which represents displacement should also be zero. Figure 1 shows the y-intercept close to zero
as it should model for the situation. These conditions are dependent of the physical scenario you
are evaluating.
If the system is not linear, then an equation can be modeled into a linear relationship. The period
of the pendulum can be modeled mathematically as
𝐿
𝑇 = 2πœ‹√𝑔 (1)
Where L (m) is the length of the pendulum and g is the acceleration due to gravity constant,
9.81m/s2. As one can see, the relationship between the period and the length is nonlinear due to
the square root in the equation. If we plot equation T vs L, it will give a square root function as
expected.
Figure 2 – Period vs Length graph is nonlinear. It makes a curve represented by a square root
model.
If we square both sides of the equation (1) , we get the equation below. We can use this to model
a linear relationship on a graph by graphing T2 vs L.
𝑇2 =
𝑇2 = (
4πœ‹ 2 𝐿
𝑔
4πœ‹ 2
𝑔
(2)
) 𝐿 (3)
Using the linear model y = mx + b, one can determine the y-intercept and the slope of this
linearized relationship. One the equation is linearized, the slope can be used to measure physical
quantities. In this case, the y = T2, the x = L. Therefore the slope of the graph is π‘š =
4πœ‹ 2
𝑔
.
Figure 3 – A nonlinear relationship is linearized to make a linear model of the physical
phenomenon.
According to the graph from Figure 3, the slope of the graph is 3.7204. The slope can be set to the
equation π‘š =
4πœ‹ 2
𝑔
to solve for a numerical value. In this case, we can solve for “g” to evaluate the
execution on the experiment.
π‘š=
4πœ‹ 2
𝑔
𝑠2
4πœ‹ 2
3.7204
=
π‘š
𝑔
𝑔 =
𝑔 =
4πœ‹ 2
𝑠2
3.7204 π‘š
39.44
π‘š
= 10.60 2
2
𝑠
𝑠
3.7204 π‘š
The accepted value of g = 9.81 m/s2. Although the experimental value is not exactly 9.81 m/s2, one
can see that the experiment, given the conditions, yielded an acceptable value of g with a percent
error of 8.05%. It is expected that there is error in the experiment that would prevent an exact value
of 9.81 m/s2.
Lastly, another useful feature of the graph is the R2 value. This is called the correlation coefficient.
This value is calculated through excel to measure the linear quality of the data. This value ranges
from 0 to 1, where 1 means the data makes a perfect linear line and 0 makes no line at all. The
figure below shows how the value for R2changes as the data changes. The R2 is a quantitative way
to determine how well the data fits the linear model. If the R2 value is close to 1, it also signifies
that the slope is constant. Figure 4 demonstrates the different graphical models and their
corresponding R2 value.
Figure 4 - Shows graphs with decreasing R2 values. R2 is generally desired when modeling or claiming a model
behaves with a linear relationship.
Graphing and Using Excel
In this lab activity, you will
1. Graph a non-linear equation
2. Graph a linearized equation
3. Use a physics equation and relate it to the best fit line equation to solve for a physical
parameter
Period & Mass of a Spring
Part 1. Formatting and using the calculator feature of excel to calculate an average
The equation for the period, T, the time it takes to make one cycle in
seconds, of a mass on a spring is represented by a nonlinear equation,
π‘š
𝑇 = 2πœ‹√ π‘˜
(1)
Where T is the period in seconds, m is the mass in kilogram, and k is the
spring constant (how strong the spring is) in N/m. This is nonlinear
relationship due to the square root in the equation. When graphing T vs m, it
will yield a curved line like Figure 3.
The following data is taken from students measuring the period of different
masses. They measured the period with stopwatches and hung different
masses to the spring. Three trials were taken to yield a more accurate
measurement of the period.
* Your instructor may set up the apparatus for you to take the data yourself. If not, use the data
provided below.
1.
Copy the data table into excel as shown. Side note: when inputting values into excel, leave out the
units. Excel will not be able to graph or complete calculations with units present. It can only use numbers.
Label the units about the column.
Period of a Mass on a Spring
m (kg)
Trial 1 T(s)
Trial 2 T(s)
Trial 3 T(s)
0.00
0.0
0.0
0.0
0.05
2.84
2.97
2.9
0.1
3.79
3.56
3.67
0.2
4.81
4.86
4.85
0.3
5.68
5.7
5.71
0.4
6.68
6.58
6.64
0.5
7.3
7.36
7.57
It should look like this in excel
Avg Trial T(s)
2. Change the number of decimal places in the mass column by using the “number” feature
in excel. Highlight the numbers (only, not the heading), and click on the left arrow to add
more decimals to the values. Set to three decimal places. See below.
3. Change the number of decimals in the trials column as well to reflect two decimal places.
Generally we set the significant figure to the precise of the measuring device. Since this
stopwatch has a precise of hundredths place, we will record two decimals for the times. It
is also important to maintain consistency for recorded data for professional data
tables.
4. Fix the spacing between cells so that Trial 1 T(s) is all on one line. Move the cursor in
between the cells you want to move above the table in where the letter are. Click and drag
the mouse as wide as you would like the column to be. Again, it is important to generate
professional data tables.
5. The final result should look like the model below. Ensure the columns are evenly spaced
and professional looking. There should not be awkward spaces or very wide/narrow
columns.
6. To calculate the average, we will use an equation built into excel. In the average column
next to Period Trial 3. Type “=” and start typing the word “average. You will see a
formula list pop up. Double click the word “Average”.
7. Once the paratheses is present, highlight the row of the three period trials and add a
paratheses to the end to close the function.
8. Then press enter. It should return a zero, since the average of three zeros is zero.
9. There is a small green box at the corner of the value. You should be able to click and drag
the corner to highlight the boxes below.
Small
green box
10. After dragging it should yield all of the averages for the rest of the data. If you have any
trouble as a lab partner or instructor for help. Dragging the green box is a way for excel
to make repeated calculations.
Part 2. Graphing using excel I
The equation for the period, T, the time it takes to make one cycle in seconds, of a mass on a
spring is represented by a nonlinear equation,
π‘š
𝑇 = 2πœ‹√ π‘˜
(1)
We will make a graph of period (T) on the y-axis vs mass (m) on the x-axis to see the nonlinear
relationship of the mass and period of a spring.
a. Click on an empty cell, then the INSERT tab, and then the icon with the graph/dots
for the scatter plot option. Select the option for just the data plots and an empty graph
will appear. Move the empty graph off the data
b. To add data to your graph, click on the empty graph and press SELECT DATA. (this
can also be done by right clicking on the graph and pressing SELECT DATA).
c. A window will appear. PC users: Ignore “chart data range” and select the button
“ADD”
d. Skip SERIES NAME. Select “Series X values” by clicking the up arrow icon.
e. We will highlight the x-axis values for the graph. In this case, x represents the mass.
Highlight the mass values. Do no highlight the column title. Excel can only graph
numbers, not letters. Click the downward arrow when done highlighting.
f. Repeat for the y-axis. First, delete the “={1}” out of the “Series Y values” box. Then
click on the upward arrow.
g. Highlight the values of the “Avg Trial T(s)” column. This is the “y” in our equation.
Then click the downward arrow
h. You should see the points appear on the graph and both X and Y series values. Have
your instructor check your graph if it does not appear like this. Select OK and then
OK on the next screen when ready.
i. It Should appear like this when done. It is always wise to double check that the values
match the scale of the graph and that the intended values are on the correct part of the
graph. The x values should match the mass values. The y values should match the
Avg T (period) values. For example, the first data point should be (0.0, 0.0). Check
the graph to see if that matches.
j. Add Chart Title, Chart axis, equation of the line and regression. The easiest way is to
use a pre chart layout.
a. Click on the chart to show “Quick Layout”. Then select layout 9 or the one
that shows the fx on the graph to represent the statistical information
presented on the graph. It should show the following graphical features.
k. Fill/Format the following data
a. Chart Title – Format Y vs X, bold face the title
b. Axis Title – Format should be Label (units)
c. Move the Equation of the line and R2 off of the data
d. Change font to “Times News Roman”
**This is the proper way to format the graphs in physics lab for the rest of the semester.
Average Period vs Mass on a Spring
9,00
Average Period (s)
8,00
y = 12,657x + 1,6484
R² = 0,8815
7,00
6,00
5,00
4,00
Ряд1
3,00
ЛинСйная (Ряд1)
2,00
1,00
0,00
0,000
0,100
0,200
0,300
0,400
0,500
0,600
Mass (kg)
Part 3. Graphing using excel II
In this section, you will generate another graph on excel to compare its R2 value. We will use the
same mathematical relationship, the mass on a spring.
π‘š
𝑇 = 2πœ‹√ π‘˜
(1)
However, as seen previous, this does not make a linear graph. It generates a square root curve
due to the square root in the equation. One can get rid of the square root to make it linear and by
graphing the square value of Period. To make it linear, one must get rid of the square root by
squaring both sides, yielding
π‘š
𝑇 2 = 4πœ‹ 2 𝐾 .
(2)
Since we are physically measuring the period and mass, the equation can be rearranged to
separate out the mass.
𝑇2 = (
4πœ‹ 2
𝐾
)π‘š .
(3)
When comparing to the linear model,
𝑦 = π‘šπ‘₯ + 𝑏
We can associate the variations from the mass on a spring equation to the variables of the linear
model as shown. Note m = slope and m = mass. They are the same variable, but have different
meanings.
y = T2, m =
4πœ‹ 2
𝐾
, x = m, and b=0.
When generating the graph on excel, we need to square the average times and use that as the yaxis. The mass is still the same, so we will highlight the same masses as the x-axis.
11. Calculate T2 by using the equation feature in excel. Label the next column Avg Trial T2
(s2). Calculate T2 by typing “=” and then click on the value 0. G4 represents where to get
the value for the equation. Finish by adding a “^2” to signify the squared feature for the
formula. Press enter to calculate the value. Be sure to format your table by adding
borders, superscript and merging the top row cell. The formatting should be identical to
the table below.
For macs how to superscript in excel:
Select the text you'd like to format. For this, double click a cell and select the text using
the mouse. Or you can go the old-fashioned way - click the cell and press F2 to enter edit
mode.
Open the Format Cells dialog by pressing Ctrl + 1 or right-click the selection and choose
Format Cells… from the context menu.
For more: https://www.ablebits.com/office-addins-blog/2018/05/16/how-to-superscriptsubscript-excel/
12. Highlight and drag the values down to complete the column with the squared values of
period.
13. Using the steps and formatting in the Part 1, Graph Period2 vs. Mass. Copy and paste the
graph to the lab data sheet. Include a linear trendline with equation of the line and R2
value.
Analysis Questions
1. Structuring Scientific Arguments. This is meant to help you understand how to support your
claims while answering analysis questions in the course. Please use this guide and write a
paragraph with the following parts.
Use Claim – Evidence – Reasoning (CER) to describe which graph has a better linear
relationship, Period vs Mass, or Period2 vs Mass.
a. Claim – State in one sentence which graph has a better linear relationship
b. Evidence – Give numerical data from each graph that supports your claim. Explain why
the data you chose supports the claim
c. Reasoning – Connect to the theory – why is one a better linear relationship than the
other? Refer to the introduction for guidance.
2. Computation with Data. When answering analysis questions or any calculated questions, show
the equation, show the values in the equation and show the answer with units. If necessary, add a
statement or sentence describing the calculation.
Solve for the “K” constant using the slope of Graph 2, Period2 vs Mass. Refer to the
introduction for guidance on how to get the “K” value.
π‘†π‘™π‘œπ‘π‘’ πΊπ‘Ÿπ‘Žπ‘β„Ž 2 =
4πœ‹ 2
𝐾
.
3. Reflection. Understanding concepts involve reflection on process and scientific concepts.
Describe your experience using excel. What processes were straightforward and what processes
did you find challenging? What would be helpful to learn or reinforce for future labs? Use a
paragraph to describe your experience.
Download