Conditioning Problem Set

pdf

School

University of California, Berkeley *

*We aren’t endorsed by this school

Course

20

Subject

Aerospace Engineering

Date

Apr 3, 2024

Type

pdf

Pages

3

Uploaded by HighnessNeutronSeal65

Report
9/17/23, 2:16 PM Conditioning https://stat20.datahub.berkeley.edu/user/lijahliu/rstudio/p/5075c682/ 1/3 library (tidyverse) library (stat20data) ggplot (penguins, aes ( x = bill_length_mm, y = bill_depth_mm, color = species)) + geom_point () + lims ( x = c ( 30 , 60 ), y = c ( 12 , 23 ))
9/17/23, 2:16 PM Conditioning https://stat20.datahub.berkeley.edu/user/lijahliu/rstudio/p/5075c682/ 2/3 # A tibble: 187 × 8 species island bill_length_mm bill_depth_mm flipper_length_mm body_mass_g <fct> <fct> <dbl> <dbl> <int> <int> 1 Gentoo Biscoe 46.1 13.2 211 4500 2 Gentoo Biscoe 50 16.3 230 5700 3 Gentoo Biscoe 48.7 14.1 210 4450 4 Gentoo Biscoe 50 15.2 218 5700 5 Gentoo Biscoe 47.6 14.5 215 5400 6 Gentoo Biscoe 46.5 13.5 210 4550 7 Gentoo Biscoe 45.4 14.6 211 4800 8 Gentoo Biscoe 46.7 15.3 219 5200 9 Gentoo Biscoe 43.3 13.4 209 4400 10 Gentoo Biscoe 46.8 15.4 215 5150 # 177 more rows # 2 more variables: sex <fct>, year <int> # A tibble: 135 × 8 species island bill_length_mm bill_depth_mm flipper_length_mm body_mass_g <fct> <fct> <dbl> <dbl> <int> <int> 1 Gentoo Biscoe 50 16.3 230 5700 2 Gentoo Biscoe 50 15.2 218 5700 3 Gentoo Biscoe 50 15.3 220 5550 4 Gentoo Biscoe 50 15.9 224 5350 5 Chinstrap Dream 50 19.5 196 3900 6 Gentoo Biscoe 49.9 16.1 213 5400 7 Gentoo Biscoe 49.8 16.8 230 5700 8 Gentoo Biscoe 49.8 15.9 229 5950 9 Chinstrap Dream 49.8 17.3 198 3675 10 Chinstrap Dream 49.7 18.6 195 3600 # 125 more rows # 2 more variables: sex <fct>, year <int> filter (penguins, species != "Adelie" ) penguins %>% filter (species != "Adelie" , bill_length_mm >= 40 , bill_length_mm <= 50 ) %>% arrange ( desc (bill_length_mm))
9/17/23, 2:16 PM Conditioning https://stat20.datahub.berkeley.edu/user/lijahliu/rstudio/p/5075c682/ 3/3 # A tibble: 3 × 3 species bill_length_mean bill_depth_mean <fct> <dbl> <dbl> 1 Adelie 38.8 18.3 2 Chinstrap 48.8 18.4 3 Gentoo 47.6 15.0 bill_size `summarise()` has grouped output by 'species'. You can override using the `.groups` argument. # A tibble: 5 × 4 # Groups: species [3] species island bill_size_mean bill_size_sd <fct> <fct> <dbl> <dbl> 1 Chinstrap Dream 67.3 4.17 2 Gentoo Biscoe 62.6 3.82 3 Adelie Torgersen 57.5 3.57 4 Adelie Biscoe 57.3 3.21 5 Adelie Dream 56.8 3.22 penguins %>% group_by (species) %>% summarize ( bill_length_mean = mean (bill_length_mm), bill_depth_mean = mean (bill_depth_mm)) penguins %>% group_by (species, island) %>% mutate ( bill_size = bill_length_mm + bill_depth_mm) %>% summarize ( bill_size_mean = mean (bill_size), bill_size_sd = sd (bill_size) ) %>% arrange ( desc (bill_size_mean))
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help