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

Three binwidths

Before you take these plots for granted, it's a good idea to see how things change when you alter the binwidth. The binwidth determines how smooth your distribution will appear: the smaller the binwidth, the more jagged your distribution becomes. It's good practice to consider several binwidths in order to detect different types of structure in your data.

Bu egzersiz, kursun bir parçasıdır

Exploratory Data Analysis in R

Kursa Göz Atın

Egzersiz talimatları

Create the following three plots, adding a title to each to indicate the binwidth used:

  • A histogram of horsepower (i.e. horsepwr) with a binwidth of 3.
  • A second histogram of horsepower with a binwidth of 30.
  • A third histogram of horsepower with a binwidth of 60.

Uygulamalı etkileşimli egzersiz

Bu egzersizi bu örnek kodu tamamlayarak deneyin.

# Create hist of horsepwr with binwidth of 3
cars %>%
  ggplot(aes(___)) +
  geom_histogram(binwidth = ___) +
  ggtitle(___)

# Create hist of horsepwr with binwidth of 30


# Create hist of horsepwr with binwidth of 60

Kodu Düzenle ve Çalıştır