00:00:25 Silvana Larrea: Hi Kelsey! Good morning! 00:17:52 Silvana Larrea: Ha: At least one of these p´s differ 00:19:40 Jessica Fields (she/her/hers): Should we actually fill in the expected counts in the table? Or just write them in as a response to the question as text 00:21:35 Jessica Fields (she/her/hers): And should we round to full people? 00:22:19 Jessica Fields (she/her/hers): Ok thanks! 00:26:12 Leslie Giglio: Fixed n # of observations, All observations are independent of one another 00:32:09 Leslie Giglio: Are these the expected count requirements? 00:40:49 Silvana Larrea: chisq.test (x = c(45, 80, 34, 151), p = c(0.25, 0.25, 0.25, 0.25)) 00:46:00 Leslie Giglio: Ho: P(underweight)= 2%, P(Normal Weight)= 39%, P(Overweight)= 36%, P(Obese)= 23% 00:47:03 Silvana Larrea: At least one of these p´s differ from the specified Ho, for k being underweight, normal weight, overweight, or obese 00:50:49 Brisa Hernandez: We’re looking for under the curve ? 00:50:59 Samantha Goldstein: use q so that p is a parameter 00:51:03 Brisa Hernandez: Oh than well use q 00:51:27 Samantha Goldstein: qchisq(p = 0.05, df = 3, lower.tail = F) 00:53:52 Leslie Giglio: Could you also do pchisq() and just calculate the test-statistic and plug into the p= ? 01:00:39 Silvana Larrea: chisq.test (x = c(20,932,1374,1000), p = c(0.02, 0.39, 0.36, 0.23)) 01:01:46 Anai Ramos: 0.00 01:03:13 Silvana Larrea: Lesser 01:04:51 Camila Solorzano Barrera: You reject 01:20:08 Maya Spencer: idk what to do after ungroup 01:20:55 Maya Spencer: ahhh 01:21:10 Maya Spencer: anger_level 01:25:07 Maya Spencer: I keep getting this error: “Error in UseMethod("group_by") : no applicable method for 'group_by' applied to an object of class "NULL” 01:25:21 Brisa Hernandez: Me too 01:25:27 Maya Spencer: our code is identical I can still show tho 01:25:30 Valerie Lobato: Me too 01:25:34 Razi Corne: same 01:25:57 Maya Spencer: yup that worked 01:25:59 Maya Spencer: weird thank u 01:26:03 Valerie Lobato: Thank you 01:27:00 Silvana Larrea: chd_by_anger_level <- chd_by_anger_level %>% mutate(sample_size = sum(actual_count)) 01:32:59 Silvana Larrea: 190 01:33:30 Ralston Tuason: 3110 01:33:30 Silvana Larrea: 4731 01:33:51 Ralston Tuason: ohhh oops 01:35:31 Maya Spencer: mutate(expected_count= ((row_total * column_total)/sample_size)) 01:36:26 Samantha Goldstein: could we also use pull()? 01:38:13 Samantha Goldstein: proportion_small_exp_counts <- sum(chd_by_anger_level %>% pull(expected_count) < 5) / 6 01:38:31 Samantha Goldstein: that might be really convoluted it just seemed the intuitive way 01:40:41 Samantha Goldstein: sum(chd_by_anger_level %>% pull(expected_count) < 1) 01:44:12 Maya Spencer: can you scroll up please 01:45:51 Silvana Larrea: Anger level? 01:49:32 Maya Spencer: can we go through it 01:49:36 Silvana Larrea: %>% cond_prop_anger = actual_count/row_total 01:56:34 Maya Spencer: can someone type their code for the conditional probabilities bc mine looks the same but wont pass 01:56:57 Anai Ramos: same^ 01:58:28 Julia Roberts: chd_by_anger_level <- chd_by_anger_level %>% group_by(heart_disease) %>% mutate(cond_prop_anger = (actual_count / row_total)) chd_by_anger_level 01:59:17 Maya Spencer: I have ^ exactly and its not passing 01:59:25 Leslie Giglio: same^ 01:59:40 Razi Corne: same 01:59:55 Silvana Larrea: I tried this code with the same results. chd_by_anger_level <- chd_by_anger_level %>% mutate (cond_prop_anger = actual_count/row_total) 02:00:24 Maya Spencer: yes 02:00:25 Maya Spencer: both 02:00:27 Razi Corne: both 02:00:28 Leslie Giglio: 11 and 12 02:01:01 Maya Spencer: values are the same 02:01:41 Maya Spencer: is it possible to type that code in the chat please? 02:01:48 Kelsey MacCuish: chd_by_anger_level <- chd_by_anger_level %>% group_by(heart_disease) %>% mutate(cond_prop_anger = actual_count/sum(actual_count)) 02:02:49 Anai Ramos: I reran the code above and it worked! 02:03:05 Maya Spencer: still not working ughh 02:03:34 Valerie Lobato: What was the code for 9? 02:03:52 Maya Spencer: I ran everything above :( 02:04:09 Leslie Giglio: For #9: p9 <- c(69.73094, 3040.29606, 106.07623, 4624.92377, 14.19283, 618.80717) 02:04:16 Valerie Lobato: Thank you!! 02:05:40 Maya Spencer: what should I do if 11 still wont run 02:06:04 Anai Ramos: Is position = “dodge” or “dodged”? 02:06:36 Leslie Giglio: My 11 isn’t running either ^ :( 02:09:16 Silvana Larrea: Maybe using “tribble” and not “tibble”? I used tribble and it worked 02:12:03 Ralston Tuason: wait, what was 14? 02:13:00 Silvana Larrea: p14 <- pchisq(q = 16.077, df = 3 - 1, lower.tail = F) 02:13:07 Ralston Tuason: thank you! 02:13:10 Silvana Larrea: :) 02:13:44 Leslie Giglio: Yes! 02:13:45 Maya Spencer: yes 02:14:34 Leslie Giglio: chd_by_anger_level <- chd_by_anger_level %>% group_by(heart_disease) %>% mutate (cond_prop_anger = actual_count/sum(actual_count)) chd_by_anger_level 02:14:41 Maya Spencer: code: chd_by_anger_level <- chd_by_anger_level %>% group_by(heart_disease) %>% mutate(cond_prop_anger= actual_count/sum(actual_count)) 02:17:12 Maya Spencer: OHHH 02:17:19 Maya Spencer: so it redefines it 02:18:49 Maya Spencer: thank u 02:22:27 Leslie Giglio: Sorry Kelsey still a little confused on 11. Have another class so was multitasking 02:23:53 Maya Spencer: I submitted the lab even though my test for 12 didn’t pass - that’s all good right? 02:24:50 Maya Spencer: perfect thank u 02:25:10 Silvana Larrea: Thank you Kelsey! 02:25:18 Ralston Tuason: thank you!!!! 02:25:21 Razi Corne: thank you!