Lab04

html

School

University of British Columbia *

*We aren’t endorsed by this school

Course

119

Subject

Economics

Date

Feb 20, 2024

Type

html

Pages

9

Uploaded by MajorTreeLyrebird3

Report
Lab 4 - The Pendulum II In [24]: # Make sure to run this cell before running any other code cells %reset -f import numpy as np import data_entry2 Edit the following cell to provide the information requested: Your name: Partha Pritom Ghosh Your student number: 12303244 Partner's name: Eric Yee Part A - Intro and announcements Optional summary of the TA grading feedback (these will not be graded) Maintaining the uncertainty significant figures and the decimal values of the measured values write briefly and stick to the main points Part B - t-score mini lesson Optional notes from the class discussion (these will not be graded) Part C - Improvement rounds (at least 2) Write some notes below detailing your initial measurement plan, including ideas discussed at your table The equation for the avergae time period uncertainty is: Standard Deviation of the Period / square root of the number of trials Following the equation, if we increase the number of trials from 21(previously used) to 30 (newly made), the denominator increases and as a result our uncertainty decreases. Time period means that one time when the pendulum is released from a inital position and then after a swing return to its initial position Keeping the number of swings with 10 as before. It is because we are sufficient with time to get our new 30 trials and do not miss any. For improving in collecting our data, we will be starting our countdown for the time after 3 seconds and stopping the timer when it reaches the appex of the 10 swings to its original position. This would help us measure the time and keep the time track more precious and accurate. For collecting our sets of data for a full round we would require: 2 seconds per wring * 10 swings * 30 trails = 600 seconds without time acocunted per round + inital countdown. We will try this method for both of our 10 degree and 20 degree collection of datas.
Use the cell below to load in a blank spreadsheet to fill in with your initial round of data. (Note that you should have 2 columns of data, of equal length.) In [25]: de1 = data_entry2.sheet("lab04_1") Sheet name: lab04_1.csv Use the cell below for your analysis code. Insert additional cells below as needed. (Note that you can copy in and update your analysis code from lab03.) In [26]: Mswings = 10 #number of cycles fixed Ntrials = 30 #number of data collected t10ave = np.mean(t10_1Vec) / Mswings # average period for 10 degree print("average period for 10 degree is=", t10ave, "s") t20ave = np.mean(t20_1Vec) / Mswings #average period for 20 degree print("average period for 20 degree is=", t20ave, "s") t10_s = np.std(t10_1Vec, ddof=1) #standard deviation for 10 degrees print("standard deviation for 10 degrees:", t10_s, "s") t20_s = np.std(t20_1Vec, ddof=1) #standard deviation for 20 degrees print("standard deviation for 20 degrees:", t20_s, "s") u10tave = ((np.std(t10_1Vec, ddof=1)) / np.sqrt(Ntrials)) / Mswings #uncertainty in the average period for 10 degree print("uncertainty in the average period for 10 degree is=", u10tave, "s") u20tave = ((np.std(t20_1Vec, ddof=1)) / np.sqrt(Ntrials)) / Mswings #uncertainty in the average period for 20 degree print("uncertainty in the average period for 20 degree is=", u20tave, "s") relut10ave = (u10tave / t10ave) / Mswings # relative uncertainty in t10ave print("relative uncertainty in t10ave is=", relut10ave) relut20ave = (u20tave / t20ave) / Mswings # relative uncertainty in t20ave print("relative uncertainty in T20ave is=", relut20ave) t_score = np.abs((t20ave - t10ave) / (np.sqrt(((u10tave)**2) + ((u20tave)**2)))) print("t_score is:", t_score) average period for 10 degree is= 1.7949666666666666 s average period for 20 degree is= 1.8120999999999998 s standard deviation for 10 degrees: 0.15849471509373347 s standard deviation for 20 degrees: 0.04985150362620076 s uncertainty in the average period for 10 degree is= 0.002893704356739745 s uncertainty in the average period for 20 degree is= 0.0009101597687206914 s relative uncertainty in t10ave is= 0.00016121215009042385 relative uncertainty in T20ave is= 5.022679591196355e-05 t_score is: 5.64810470248492 Reflect on the results of your first round below
In terms of reflection based on our previous lab, we got a higher t_score of 5.65s compared to the preivous lab where we got 3.89s. Data for 10 degrees Average Period = 1.7950 $\pm$ 0.00290 seconds Relative Uncertainty = 0.16% Data for 20 degrees Average Period = 1.81210 $\pm$ 0.00091 seconds Relative Uncertainty = 0.050% t_score is t_score = 5.6 Comparing with other group, they got: relative uncertainty in t10ave is = 0.00095 relative uncertainty in T20ave is = 0.00057 t_score is: = 2.3 By comparing the data, the other group used 10 number of swings and 20 number of trials to get the set of data. This is important in order to determine if our datas are actually similar or not. We got a lower uncertainty compared to the other group meaning our sets of data more precise and a higher t_score compared to the other group means we are very confident that the results are different for that given relative uncertainty. For the other group, they got a slightly higher uncertainty meaning there sets of data less precise and a t_score of 2.3 means they are somewhat confident that there results are different for that given relative uncertainty. The other group started the time immediately and took the time count from the moment of releasing the pendulum to the pendulum coming to the initial position again and followed the steps as we did to come to a conclusion. 2nd Round Calculations In [27]: de2 = data_entry2.sheet("lab04_2") Sheet name: lab04_2.csv
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
In [28]: #Calculations for 2nd round Mswings = 10 #number of cycles fixed Ntrials = 30 #number of data collected t10ave = np.mean(t10_2Vec) / Mswings # average period for 10 degree print("average period for 10 degree is=", t10ave, "s") t20ave = np.mean(t20_2Vec) / Mswings #average period for 20 degree print("average period for 20 degree is=", t20ave, "s") t10_s = np.std(t10_2Vec, ddof=1) #standard deviation for 10 degrees print("standard deviation for 10 degrees:", t10_s, "s") t20_s = np.std(t20_2Vec, ddof=1) #standard deviation for 20 degrees print("standard deviation for 20 degrees:", t20_s, "s") u10tave = ((np.std(t10_2Vec, ddof=1)) / np.sqrt(Ntrials)) / Mswings #uncertainty in the average period for 10 degree print("uncertainty in the average period for 10 degree is=", u10tave, "s") u20tave = ((np.std(t20_2Vec, ddof=1)) / np.sqrt(Ntrials)) / Mswings #uncertainty in the average period for 20 degree print("uncertainty in the average period for 20 degree is=", u20tave, "s") relut10ave = (u10tave / t10ave) / Mswings # relative uncertainty in t10ave print("relative uncertainty in t10ave is=", relut10ave) relut20ave = (u20tave / t20ave) / Mswings # relative uncertainty in t20ave print("relative uncertainty in T20ave is=", relut20ave) t_score = np.abs((t20ave - t10ave) / (np.sqrt(((u10tave)**2) + ((u20tave)**2)))) print("t_score is:", t_score) average period for 10 degree is= 1.7932000000000001 s average period for 20 degree is= 1.8076 s standard deviation for 10 degrees: 0.09041666004555317 s standard deviation for 20 degrees: 0.04492138727246496 s uncertainty in the average period for 10 degree is= 0.0016507748093741851 s uncertainty in the average period for 20 degree is= 0.0008201485707851508 s relative uncertainty in t10ave is= 9.205748435055683e-05 relative uncertainty in T20ave is= 4.5372237817279865e-05 t_score is: 7.812137948308994 Reflections Data for 10 degrees Average Period = 1.7932 $\pm$ 0.0017 seconds Relative Uncertainty = 0.092% Data for 20 degrees Average Period = 1.80760 $\pm$ 0.00082 seconds Relative Uncertainty = 0.045% t_score is
t_score = 7.8 Comparing with other group, they got: relative uncertainty in t10ave is = 0.110% relative uncertainty in T20ave is = 0.064% t_score is: = 3.5 For the second round, the other group used 15 swings for 20 trails. It was necessary to know in order for comparsion if the sets of data are actually close or not. We achieved a t_score of 7.8 which is higher than our first round which was a t_score of 5.6, thus showing we were able to decrease our uncertainty level, hence increasing the precision for our sets of data more. Whereas the other group also was able to reduce there uncertainty from 2.3 to 3.5 t_score increase. YOUR SUMMARY OF RESULTS AND SUBMIT First Round t_score = 5.6 Second Round t_score = 7.8 The increase in t_scores over the rounds and a relative t_score of greater than 5 ensures that we are confident that our results are different for that of relative uncertainty. In terms of improvements, we increases the number of trials to 30 and measured the time with a countdown of 3 seconds as following the uncertainty of average time period equation, increasing the number of trails decreases the uncertainty hence increasing the t_score. Also, this time we counted the time loudly and ensured the time count from the position the pendulum was released to when it returns to its original position after 10 swings respectively. Our experimental goal of: Determine if the period of a pendulum depends on amplitude by comparing the period with initial release angles of 10° and 20° and determining if there is a period difference between two angles We can conclude, yes there is a difference in the periods as we are confident which is shown by our higher t_score and lower uncertainty levels compared to the other groups we have compared, thus showing that we were able to achieve a more better sets of result this time compared to our previous lab, where we did not complete 2 rounds of data, thus repeating sets of data corrects any errors and makes the error chance less. From lab 3, lab 4 datas are much more consistent and more precious. Our improvements and process made it a successful solution for us means increasing the number of trails. Submit Steps for submission: 1. Click: Run => Run_All_Cells 2. Read through the notebook to ensure all the cells executed correctly and without error.
3. File => Save_and_Export_Notebook_As->HTML 4. Upload the HTML document to the lab submission assignment on Canvas. In [ ]: In [29]: # trick to display tables in html output display_sheets() Sheet: de1 File: lab04_1.csv t10_1 t20_1 Units seconds seconds 0 18.17 18.12 1 17.77 18.12 2 17.94 18.14 3 17.95 17.96 4 18.00 18.13 5 17.98 18.09 6 17.95 18.07 7 17.94 18.14 8 18.08 18.10 9 18.18 18.16 10 17.98 18.12 11 17.99 18.17 12 17.86 18.12 13 17.83 18.14 14 17.91 18.19
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
t10_1 t20_1 15 18.06 18.12 16 17.74 18.22 17 18.18 18.05 18 17.71 18.12 19 18.23 18.10 20 17.58 18.17 21 17.91 18.07 22 17.84 18.17 23 18.09 18.17 24 17.78 18.12 25 18.07 18.14 26 18.16 18.07 27 17.82 18.07 28 17.79 18.16 29 18.00 18.11 Sheet: de2 File: lab04_2.csv t10_2 t20_2 Units seconds seconds 0 17.95 18.04 1 17.88 18.14 2 17.84 18.16
t10_2 t20_2 3 17.96 18.04 4 18.04 18.10 5 18.04 18.10 6 17.84 18.20 7 18.01 18.06 8 18.01 18.09 9 17.84 18.05 10 17.86 18.07 11 18.09 18.02 12 17.96 18.10 13 17.96 18.10 14 17.96 18.12 15 17.80 18.04 16 17.96 18.02 17 17.96 18.04 18 17.86 18.05 19 18.06 18.16 20 18.07 18.05 21 17.70 18.09 22 17.83 18.02 23 17.99 18.06 24 17.90 18.07
t10_2 t20_2 25 17.91 18.06 26 17.91 18.08 27 17.96 18.03 28 17.84 18.07 29 17.97 18.05
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help