Question
Data statistics function Interface: def dataStatistics(data, statistic): # Insert your code here return result Input arguments data: An N 3 matrix with columns Temperature, Growth
Data statistics function Interface: def dataStatistics(data, statistic):
# Insert your code here
return result
Input arguments data: An N 3 matrix with columns Temperature, Growth rate, and Bacteria.
statistic: A string specifying the statistic that should be calculated.
Output arguments result: A scalar containing the calculated statistic.
Description This function must calculate one of several possible statistics based on the data.
A statistic here denotes a single number which describes an aspect of the data, as for example a mean (average) value. The statistic that must be calculated depends on the value of the string statistic. The following table shows the different possible values of statistic and a description of how to calculate the corresponding statistic.
statistic Description: Mean Temperature ->Mean (average) Temperature.
Mean Growth rate-> Mean (average) Growth rate.
Std Temperature ->Standard deviation of Temperature.
Std Growth rate ->Standard deviation of Growth rate.
Rows ->The total number of rows in the data.
Mean Cold Growth rate-> Mean (average) Growth rate when Temperature is less than 20 degrees.
Mean Hot Growth rate ->Mean (average) Growth rate when Temperature is greater than 50 degrees.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started