1. Using the data file used previously, make a histogram of the number of muons passing through the muon detector per second. You can limit the displayed histogram to be between 0 and 18, inclusive. Remember that the data records are recorded every second and that for any record whose first value is 40,000 or above, the amount that exceeds 40,000 tells you how many muons per second passed completely though the dector. For example, 400002 means 2 muons passed throiuhg the detector in the second described by the secod integer of the same data record. Ignore records whoe first integer is below 40,000. You worked already on this task in class. 2. Now fit this histogram withal a poisson distriibution taking care to fit to the center of the bins as described in class. Your plot should contain the histogram, data points and a curve through the the data points. Determine the value (lambda) from the fit and its corresponding uncertainty. For our poisson distribution, lambda tells you the mean number of passing muons per second. 3. Calculate 200-230 prime numbers starting from 3. Plot the the values of the primes as a function of their ordinal number. For example, th prime 3 corresponds to 1, 5 to 2, 7 to 3, and so on. You can use your own code or a built-in method to determine the primes. Place the primes in an array and print the array so we can verify you did the calculation correctly. DO NOT print out the primes line by line or your pdf will be a mile long. 4. Plot the primes as a function of their ordinal number. For example, th prime 3 corresponds to 1, 5 to 2, 7 to 3, and so on. This plot will have a curvatue to it. Fit the plot with a line, a quadratic and a cubic. What are the vales of each paramter in those cruves and their uncertainties? What do you think is the best fit, accounting foruncertainty and simplicity of the curve? In [12]: #Problem 3 from numpy.random import random tnp. linspace (-1, 1, 201) plt.subplot(2, 2, 1); plt.hist (random(500) 21, t) plt.subplot(2, 2, 2); plt.plot(t, t**2, t, t**3 - t) plt.subplot(2, 2, 3); plt.scatter ((random (100) plt.subplot(2, 2, 4); plt.plot(t plt.suptitle('Data Visualization') 2) -1, (random(100) * 2) np.cos (10 *t), tnp.sin(10 * t)) Out [12]: Text (0.5, 0.98, 'Data Visualization') ttps://hpc.m3.smu.edu/node/c002/8909/lab/tree/saltzman_hw2.ipynb 0/3/24, 4:35 PM In []: 8 6 4 saltzman_hw2 Data Visualization 1.0 0.5 0.0 2 0 -1.0 -0.5 0.0 0.5 1.0 -1.0 -0.5 0.0 0.5 1.0 1.0 0.75 0.50 0.5 0.25 0.0 0.00 -0.5 +0.25 0.50 -1.0 -1.0 -0.5 0.0 0.5 1.0 -1.0 -0.5 0.0 0.5 1.0
1. Using the data file used previously, make a histogram of the number of muons passing through the muon detector per second. You can limit the displayed histogram to be between 0 and 18, inclusive. Remember that the data records are recorded every second and that for any record whose first value is 40,000 or above, the amount that exceeds 40,000 tells you how many muons per second passed completely though the dector. For example, 400002 means 2 muons passed throiuhg the detector in the second described by the secod integer of the same data record. Ignore records whoe first integer is below 40,000. You worked already on this task in class. 2. Now fit this histogram withal a poisson distriibution taking care to fit to the center of the bins as described in class. Your plot should contain the histogram, data points and a curve through the the data points. Determine the value (lambda) from the fit and its corresponding uncertainty. For our poisson distribution, lambda tells you the mean number of passing muons per second. 3. Calculate 200-230 prime numbers starting from 3. Plot the the values of the primes as a function of their ordinal number. For example, th prime 3 corresponds to 1, 5 to 2, 7 to 3, and so on. You can use your own code or a built-in method to determine the primes. Place the primes in an array and print the array so we can verify you did the calculation correctly. DO NOT print out the primes line by line or your pdf will be a mile long. 4. Plot the primes as a function of their ordinal number. For example, th prime 3 corresponds to 1, 5 to 2, 7 to 3, and so on. This plot will have a curvatue to it. Fit the plot with a line, a quadratic and a cubic. What are the vales of each paramter in those cruves and their uncertainties? What do you think is the best fit, accounting foruncertainty and simplicity of the curve? In [12]: #Problem 3 from numpy.random import random tnp. linspace (-1, 1, 201) plt.subplot(2, 2, 1); plt.hist (random(500) 21, t) plt.subplot(2, 2, 2); plt.plot(t, t**2, t, t**3 - t) plt.subplot(2, 2, 3); plt.scatter ((random (100) plt.subplot(2, 2, 4); plt.plot(t plt.suptitle('Data Visualization') 2) -1, (random(100) * 2) np.cos (10 *t), tnp.sin(10 * t)) Out [12]: Text (0.5, 0.98, 'Data Visualization') ttps://hpc.m3.smu.edu/node/c002/8909/lab/tree/saltzman_hw2.ipynb 0/3/24, 4:35 PM In []: 8 6 4 saltzman_hw2 Data Visualization 1.0 0.5 0.0 2 0 -1.0 -0.5 0.0 0.5 1.0 -1.0 -0.5 0.0 0.5 1.0 1.0 0.75 0.50 0.5 0.25 0.0 0.00 -0.5 +0.25 0.50 -1.0 -1.0 -0.5 0.0 0.5 1.0 -1.0 -0.5 0.0 0.5 1.0
Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
Related questions
Question
100%
Please show the code for each part of this assignment using python in a jupyter notebook. The data file previoulsy used that is referenced in the first part is included
Expert Solution
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
Step by step
Solved in 2 steps
Recommended textbooks for you
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education