Question: 3) [19 points] This problem will return to the data from the previous assignments analyzing reactor temperature measurements. Note the excessive variability (or noise)
![3) [19 points] This problem will return to the data from the previous assignments analyzing reactor](https://dsd5zvtm8ll6.cloudfront.net/si.experts.images/questions/2022/05/627a6b25c2e7d_989627a6b258eb5a.jpg)
3) [19 points] This problem will return to the data from the previous assignments analyzing reactor temperature measurements. Note the excessive variability (or noise) in the data. This variability can make it difficult to interpret the data. A simple approach to reduce the variability is to calculate a moving average, which will "smooth" the data. For this problem, the smoothed data will be the average of three data points: the data at the current time and the data from the previous two times. For instance, in the sample data given to you, the smoothed value at time 19 is the average of the data at 17, 18 and 19 minutes. The calculation is shown below: 255.699 = (255.847 + 255.937 + 255.312) 3 At the beginning of the data set there will be fewer data values than the number used in the averaging. In this case, the smoothed temperature is the average of all available data points. In the example, the smoothed data for minute 1 is the raw data and the smoothed value for minute 2 is the average of data at minutes 1 and 2. a) [14 points] Write a program that will input the raw (unsmoothed) data and output the smoothed data to the spreadsheet as shown in the example. The program should be able to work on data sets of any length (and not just the 22 data points in the example data). 1 # datapoints 2 3 time 4 5 6 7 8 10 NEBES&CESSES 11 12 13 14 15 16 17 18 19 20 21 B data smooth 1 255.243 255.243 2 255.936 255.590 3 255.797 255.659 4 255.861 255.865 5 255.193 255.617 6 255.947 255.667 7 255.681 255.607 8 255.842 255,824 9 255.124 255.549 10 255.516 255.494 11 255.246 255.295 12 255.719 255.494 13 255.067 255.344 14 255.811 255.532 15 255.006 255.294 255.410 255.244 16 255.413 17 255.312 18 255.937 255.554 19 255,847255.699 20 255.503 255.762 21 255.829 255.726 22 255.983 255.771 b) [5 points] Copy your program from part a). Modify it so the user can enter the # of data points to be averaged at each time step. The figure below shows an example where 4 values are averaged. Note in the example that the data for the first three minutes are the averages of all available data to that point. A 1 # datapoints 2 3 time ST 5 6 7 8 00 O 10 11 12 13 data 1 255.243 4 5 6 7 8 9 B 10 smooth 255.243 255.936 255.590 255.659 255.709 255.697 255.947 255.699 255.681 255.670 255.842 255.666 255.797 255.861 255.193 255.124255.649 255.516 255.541 DEE D4E NEE 433 User enters number of data points to be averaged for each minute. Average of data at minutes 1 and 2 Average of data at minutes 1, 2 and 3 Four minutes of data averaged. Smoothed data at minute 9 is calculated from the average of raw data from minutes 6,7,8, and 9.
Step by Step Solution
3.40 Rating (156 Votes )
There are 3 Steps involved in it
Detailed Explanation I can help you write a Python program that uses a dataset to calculate moving averages Lets start by writing a function that can determine a moving average for a specified dataset ... View full answer
Get step-by-step solutions from verified subject matter experts
