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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!