Posts

Showing posts from September, 2025

Module 5 Assignment

Image
  Question 1: A. The null hypothesis is that the new machine is able to produce cookies with a mean of 70 pounds according to the specification from the manufacture. The alternative hypothesis is that the new machine is not able to produce cookies with a mean of 70 pounds according to the specification from the manufacture. B. To determine if the machine is not meeting the manufacturer's specifications for average strength, I used the test statistic formula to give me the result. The result is -1.8 based on the formula: z = (69.1 - 70) / (3.5 / sqrt(49)) = -1.8 Here is the code in R: C. The equation that I used to compute the p-value was: 2 * (1-pnorm(abs(test_statistic))) The p-value is .07186064 and since the p-value is greater than the alpha value, the null hypothesis is not rejected since there is not enough evidence that the new machine is not meeting the manufacturer's specifications. D. If the standard deviation was 1.75 pounds, then the new z-score is -3.6. This puts th...

Module 4 Assignment

  A1. Event A: 30/90= 1/3 A2. Event B: 30/90= 1/3 A3. Event A or B= 5/9 A4. P(A or B)= 2/3 B1. This answer is True B2. This answer is True because Bayes Theorem states that low base rate of rain makes false positive dominate. C.  > dbinom(10,size = 10,prob = .80) [1] 0.1073742

Module 3 LIS 4273

  > set1 <- c(10,2,3,2,4,2,5) > set2 <- c(20,12,13,12,14,12,15) > # Set 1 > mean(set1,trim = 0,na.rm = FALSE) [1] 4 > median(set1,trim = 0,na.rm = FALSE) [1] 3 > mode = function(){ + return(names(sort(-table(set1)))[1]) + } > mode() [1] "2" > sd(set1,na.rm = FALSE) [1] 2.886751 > range(set1,trim = 0,na.rm = FALSE) [1] 0 10 > quantile(set1,trim = 0,na.rm = FALSE) 0% 25% 50% 75% 100% 2.0 2.0 3.0 4.5 10.0 > var(set1) [1] 8.333333 > sd(set1,na.rm = TRUE)/mean(set1,na.rm = TRUE)*100 [1] 72.16878 > summary(set1) Min. 1st Qu. Median Mean 3rd Qu. Max. 2.0 2.0 3.0 4.0 4.5 10.0 > # Set 2 > mean(set2,trim = 0,na.rm = FALSE) [1] 14 > median(set2,trim = 0,na.rm = FALSE) [1] 13 > mode = function(){ + return(names(sort(-table(set2)))[1]) + } > mode() [1] "12" > sd(set2,na.rm = FALSE) [1] 2.886751 > range(set2,trim = 0,na.rm = FALSE) [1] 0 20 > quantile(set2,trim...

Module 2 Assignment LIS4273

   >  assignment2 <- c(6,18,14,22,27,17,22,20,22) >  myMean <- function(assignment2) {return(sum(assignment2)/length(assignment2))} > myMean(assignment2) [1] 18.66667 The function called assignment2 is a numeric vector in R. It contains the given data points for the function myMean to perform its sets of commands.myMean takes one argument, assignment2, and calculate the sum and length of all the elements in the vector. The function returns the result after performing each command. In the end, the result of myMean(assignment2) is 18.66667.