開始使用免費開始

平均數、中位數與分配形狀

在影片中,你學到:平均數是所有資料點的總和除以資料點的總數;中位數是資料集的中間值,會有 50% 的資料小於中位數,50% 的資料大於中位數。在這個練習中,你會比較這兩種集中趨勢的量測。

已載入 pandaspdnumpynp,並提供 food_consumption

本練習屬於課程

Python 統計學入門

檢視課程

動手互動練習

試著完成這個範例程式碼,體驗一下這個練習。

# Import matplotlib.pyplot with alias plt
____

# Subset for food_category equals rice
rice_consumption = ____

# Histogram of co2_emission for rice and show plot
____
____
編輯並執行程式碼