एक वैरिएबल का वितरण

R में Exploratory Data Analysis

Andrew Bray

Assistant Professor, Reed College

मार्जिनल बनाम कंडीशनल

ggplot(cars, aes(x = hwy_mpg)) +
  geom_histogram()
`stat_bin()` using `bins = 30`. Pick better value with `binwidth`.
Warning message:
Removed 14 rows containing non-finite values (stat_bin). 

ch2_2.003.png

R में Exploratory Data Analysis

मार्जिनल बनाम कंडीशनल

ggplot(cars, aes(x = hwy_mpg)) +
  geom_histogram() +
  facet_wrap(~pickup)
`stat_bin()` using `bins = 30`. Pick better value with `binwidth`.
Warning message:
Removed 14 rows containing non-finite values (stat_bin).

ch2_2.006.png

R में Exploratory Data Analysis

डेटा पाइपलाइन बनाना

cars2 <- cars %>%
  filter(eng_size < 2.0)

ggplot(cars2, aes(x = hwy_mpg)) +
  geom_histogram()
R में Exploratory Data Analysis

डेटा पाइपलाइन बनाना

cars %>%
  filter(eng_size < 2.0) %>%
  ggplot(aes(x = hwy_mpg)) +
  geom_histogram()
R में Exploratory Data Analysis

फ़िल्टर किया और फ़ैसटेड हिस्टोग्राम

cars %>%
  filter(eng_size < 2.0) %>%
  ggplot(aes(x = hwy_mpg)) +
  geom_histogram()
`stat_bin()` using `bins = 30`. Pick better value with `binwidth`.

ch2_2.011.png

R में Exploratory Data Analysis

चौड़ा बिन विड्थ

cars %>%
  filter(eng_size < 2.0) %>%
  ggplot(aes(x = hwy_mpg)) +
  geom_histogram(binwidth = 5)

ch2_2.013.png

R में Exploratory Data Analysis

डेंसिटी प्लॉट

cars %>%
  filter(eng_size < 2.0) %>%
  ggplot(aes(x = hwy_mpg)) +
  geom_density()

ch2_2.015.png

R में Exploratory Data Analysis

चौड़ा बैंडविड्थ

cars %>%   
  filter(eng_size < 2.0) %>%
  ggplot(aes(x = hwy_mpg)) +
  geom_density(bw = 5)

ch2_2.017.png

R में Exploratory Data Analysis

अभ्यास करते हैं!

R में Exploratory Data Analysis

Preparing Video For Download...