1. Learn
  2. /
  3. Courses
  4. /
  5. Introduction to Julia

Exercise

Using the Statistics package

Now that you know how to import and use packages, you can analyze the data from the last chapter even further.

The array body_temps_c, which you created in the last chapter, is available in the environment. This array contains some measurements of body temperatures in degrees Celsius.

Another array named heart_rates is also available in your environment and contains the heart rates of the same sample of people measured in beats per minute.

You want to find the average value of each of these arrays. You know that inside the Statistics package, there is a function called mean(), which will calculate exactly what you want.

Instructions

100 XP
  • Import the Statistics package under the name sts.
  • Use the mean() function from the Statistics package to find the mean of body_temps_c.
  • Print the mean body temperature.
  • Use the mean() function from the Statistics package to find the mean of heart_rates.