Homework 5

.pdf

School

University of Washington *

*We aren’t endorsed by this school

Course

EDDD 8

Subject

Statistics

Date

May 31, 2024

Type

pdf

Pages

13

Uploaded by JusticeFlower13326

11/10/22, 1 : 11 PM Homework 5 Page 1 of 13 file:///Users/tinasong/Downloads/Homework5Template.html Homework 5 Tina Song 2022-11-10 Problem 1 Part 1a) ## [1] 0.2659855 About 26.6% of students have midterm scores less than or equal to 70. Part 1b) ## [1] 0.03039636 About 3.04% of students have midterm scores greater than 90. Part 1c) ## [1] 0.2597759 About 26% of students have midterm scores between 80 and 95. Code Hide library(tidyverse) library(openintro) library(infer) Hide pnorm(70, 75, 8) Hide 1 - pnorm(90, 75, 8) Hide pnorm (95, 75, 8) - pnorm(80, 75, 8)
11/10/22, 1 : 11 PM Homework 5 Page 2 of 13 file:///Users/tinasong/Downloads/Homework5Template.html Part 1d) P(X x) = 0.99 ## [1] 93.61078 99% of students have midterm scores below about 94 points. Part 1e) P(X > x)=0.80 ## [1] 68.26703 80% of students have midterm scores above about 68 points. Part 1f) We do not know if the population (the class) is normally distributed. Since n 30, we can assume that x-bar ~ approx Normal( , / sqrt(n)) x- bar ~ approx Normal(75, 8 / sqrt(30)) Part 1g) ## [1] 0.08545176 If the mean of the population is 75, the probability that the mean from a sample size of 30 exceeds 77 is about 8.55%. Problem 2 Hide qnorm(0.99, 75, 8, lower.tail = TRUE) Hide qnorm(0.80, 75, 8, lower.tail = FALSE) Hide 1 - pnorm (77, 75, 8/sqrt(30))
11/10/22, 1 : 11 PM Homework 5 Page 3 of 13 file:///Users/tinasong/Downloads/Homework5Template.html Problem 1 Problem 2 Problem 4 Problem 5 Problem 3 one 30 lb. bag: Xi ~ N( = 30.7, = 1.12) one 10 lb. bag: Yi ~ N( = 10.5, = 0.15) three 10 lb. bag (independent RVs): mean = 10.5 + 10.5 + 10.5 = 31.5 SD^2 = (0.15)^2 + (0.15)^2 + (0.15)^2 = 0.0675 W = Yi + Yi + Yi W ~ N(31.5, sqrt(0.0675)) Di ! erence: K = W - Xi mean = 31.5 - 30.7 = 0.8 SD: sqrt(0.0675 + (1.12)^2) K ~ N(0.8, sqrt(0.0675 + (1.12)^2) P(W - Xi) > 0 P(K) > 0 ## [1] 0.7567261 The probability is 75.67%. Problem 3 Part 3a) X ~ Uniform(10,22) a = 10, b = 22 height: 1 / (b-a) Part 3b) E(X) = (b+a) / 2 Part 3c) P(12 < X < 19) = P(12 X 19) ## [1] 0.5833333 Part 3d) P(X = x) = 0 P(X = 15) = 0 Problem 4 Hide 1 - pnorm(0, 0.8, sqrt(0.0675 + (1.12)^2)) 1/(22 - 10) = 0.0833 (22 + 10)/2 = 16 (19 - 12)/(22 - 10) = 0.5833 Hide punif(19, 10 ,22) - punif(12, 10, 22)
11/10/22, 1 : 11 PM Homework 5 Page 4 of 13 file:///Users/tinasong/Downloads/Homework5Template.html Read in Data ## Rows: 12 Columns: 2 ## ── Column specification ────────────────────────────── ────────────────────────── ## Delimiter: "," ## chr (1): Pie ## dbl (1): ZOD ## ## Use `spec()` to retrieve the full column specificati on for this data. ## Specify the column types or set `show_col_types = FA LSE` to quiet this message. Part 4a) Hide ZOD <- read_csv("ZODTwoGroups.csv") Hide ZOD$Pie <- factor(ZOD$Pie) Hide p <- ggplot(ZOD, aes(x=Pie, y=ZOD)) + geom_boxplot() + xlab("Pie") + ylab("ZOD") p
11/10/22, 1 : 11 PM Homework 5 Page 5 of 13 file:///Users/tinasong/Downloads/Homework5Template.html Cherry pie’s ZOD data values have more variability. There appears to be a di ! erence between the ZODs for the two groups. Part 4b) ## `summarise()` has grouped output by 'replicate'. You c an override using the ## `.groups` argument. Hide set.seed(15) PermsOut <- ZOD %>% rep_sample_n(size = nrow(ZOD), reps = 1000, replace = FALSE) %>% mutate(ZOD_perm = sample(ZOD)) %>% group_by(replicate, Pie) %>% summarize(mean_ZOD_perm = mean(ZOD_perm), mean_ZOD = m ean(ZOD)) %>% summarize(diff_mean = diff(mean_ZOD_perm), diff_orig = diff(mean_ZOD)) Hide PermsOut
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