Exercises for Submission: You may only write for-loops for this lab. Do not add any other type of loop. For this lab, students are given some skeleton code that must be filled in (named: L5 starter.py). Do not delete or change any of the code that is currently written. Ensure to read the comments fully for information regarding the functions and where code must be added. A car rental company is interested in tracking the temperate in the passenger seat of their fleet of cars to understand which cars might need to be inspected soon. They have decided to place temperature sensors in 100 of their cars and record the temperate of each car for 30 days. They have stored all the data is a csv file which contains 100 rows and 30 columns, corresponding to the 100 cars and 30 days respectively. This is provided as L5_Data.csv. Download this file into the same directory as the script you are creating for this lab. They have contracted you to do some analysis on the data. Part 1: For each row of data, you should calculate the following two quantities: 1. Mean 2. Standard Deviation Check out the following link for formulas: https://byjus.com/statistics-formulas/ In the script, you will need to fill out the appropriate functions to calculate these values. Each function should take in a list of floats and return a value corresponding to the quantity. The functions should not print anything, ask for any values, or write to a file. You must implement the formula descripted in the link. Part 2: Once you calculate the two statistical quantities, store them to another csv file called 'L5_Statistics.csv'. Your csv should contain the data in the following format (numbers are not reflective of the data, and are just examples for demonstration purposes): Row Standard Deviation High Temperature 1 2 Mean 35.12 23.52 9.15 7.98 0 Your output CSV should contain headers in the first row as shown above. The first column should contain the row number, the second column should contain the mean of the row read from the original file, the third column should contain the standard deviation of the row read from the original file, and the fourth column should be a 1 or 0 based on the computed mean value. If the mean is greater than 30, the value should be 1, otherwise it should be 0.
Exercises for Submission: You may only write for-loops for this lab. Do not add any other type of loop. For this lab, students are given some skeleton code that must be filled in (named: L5 starter.py). Do not delete or change any of the code that is currently written. Ensure to read the comments fully for information regarding the functions and where code must be added. A car rental company is interested in tracking the temperate in the passenger seat of their fleet of cars to understand which cars might need to be inspected soon. They have decided to place temperature sensors in 100 of their cars and record the temperate of each car for 30 days. They have stored all the data is a csv file which contains 100 rows and 30 columns, corresponding to the 100 cars and 30 days respectively. This is provided as L5_Data.csv. Download this file into the same directory as the script you are creating for this lab. They have contracted you to do some analysis on the data. Part 1: For each row of data, you should calculate the following two quantities: 1. Mean 2. Standard Deviation Check out the following link for formulas: https://byjus.com/statistics-formulas/ In the script, you will need to fill out the appropriate functions to calculate these values. Each function should take in a list of floats and return a value corresponding to the quantity. The functions should not print anything, ask for any values, or write to a file. You must implement the formula descripted in the link. Part 2: Once you calculate the two statistical quantities, store them to another csv file called 'L5_Statistics.csv'. Your csv should contain the data in the following format (numbers are not reflective of the data, and are just examples for demonstration purposes): Row Standard Deviation High Temperature 1 2 Mean 35.12 23.52 9.15 7.98 0 Your output CSV should contain headers in the first row as shown above. The first column should contain the row number, the second column should contain the mean of the row read from the original file, the third column should contain the standard deviation of the row read from the original file, and the fourth column should be a 1 or 0 based on the computed mean value. If the mean is greater than 30, the value should be 1, otherwise it should be 0.
MATLAB: An Introduction with Applications
6th Edition
ISBN:9781119256830
Author:Amos Gilat
Publisher:Amos Gilat
Chapter1: Starting With Matlab
Section: Chapter Questions
Problem 1P
Related questions
Question
Part 1 only.
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 3 steps with 1 images
Recommended textbooks for you
MATLAB: An Introduction with Applications
Statistics
ISBN:
9781119256830
Author:
Amos Gilat
Publisher:
John Wiley & Sons Inc
Probability and Statistics for Engineering and th…
Statistics
ISBN:
9781305251809
Author:
Jay L. Devore
Publisher:
Cengage Learning
Statistics for The Behavioral Sciences (MindTap C…
Statistics
ISBN:
9781305504912
Author:
Frederick J Gravetter, Larry B. Wallnau
Publisher:
Cengage Learning
MATLAB: An Introduction with Applications
Statistics
ISBN:
9781119256830
Author:
Amos Gilat
Publisher:
John Wiley & Sons Inc
Probability and Statistics for Engineering and th…
Statistics
ISBN:
9781305251809
Author:
Jay L. Devore
Publisher:
Cengage Learning
Statistics for The Behavioral Sciences (MindTap C…
Statistics
ISBN:
9781305504912
Author:
Frederick J Gravetter, Larry B. Wallnau
Publisher:
Cengage Learning
Elementary Statistics: Picturing the World (7th E…
Statistics
ISBN:
9780134683416
Author:
Ron Larson, Betsy Farber
Publisher:
PEARSON
The Basic Practice of Statistics
Statistics
ISBN:
9781319042578
Author:
David S. Moore, William I. Notz, Michael A. Fligner
Publisher:
W. H. Freeman
Introduction to the Practice of Statistics
Statistics
ISBN:
9781319013387
Author:
David S. Moore, George P. McCabe, Bruce A. Craig
Publisher:
W. H. Freeman