BaşlayınÜcretsiz Başlayın

Computing percentiles

In this exercise, you will compute the percentiles of petal length of Iris versicolor.

Bu egzersiz

Statistical Thinking in Python (Part 1)

kursunun bir parçasıdır
Kursu Görüntüle

Egzersiz talimatları

  • Create percentiles, a NumPy array of percentiles you want to compute. These are the 2.5th, 25th, 50th, 75th, and 97.5th. You can do so by creating a list containing these ints/floats and convert the list to a NumPy array using np.array(). For example, np.array([30, 50]) would create an array consisting of the 30th and 50th percentiles.
  • Use np.percentile() to compute the percentiles of the petal lengths from the Iris versicolor samples. The variable versicolor_petal_length is in your namespace.
  • Print the percentiles.

Uygulamalı interaktif egzersiz

Bu örnek kodu tamamlayarak bu egzersizi bitirin.

# Specify array of percentiles: percentiles


# Compute percentiles: ptiles_vers


# Print the result
Kodu Düzenle ve Çalıştır