ComeçarComece de graça

Mean vs. median

In the video, you learned that the mean is the sum of all the data points divided by the total number of data points, and the median is the middle value of the dataset where 50% of the data is less than the median, and 50% of the data is greater than the median. In this exercise, you'll compare these two measures of center.

pandas is loaded as pd, numpy is loaded as np, and food_consumption is available.

Este exercício faz parte do curso

Introduction to Statistics in Python

Ver curso

Exercício interativo prático

Experimente este exercício completando este código de exemplo.

# Import matplotlib.pyplot with alias plt
____

# Subset for food_category equals rice
rice_consumption = ____

# Histogram of co2_emission for rice and show plot
____
____
Editar e executar o código