Posts

Showing posts from September, 2023

Module #5 Assignment

Image
 9/25/2023 1. The director of manufacturing at a cookies needs to determine whether a new machine is production a particular type of cookies according to the manufacturer's specifications, which indicate that cookies should have a mean of 70 and standard deviation of 3.5 pounds. A sample pf 49 of cookies reveals a sample mean breaking strength of 69.1 pounds. A.  State the null and alternative hypothesis  H0: The machine is producing cookies in line with the manufacturer's specifications. H1: The machine is not producing cookies in line with the manufacturer's specifications. B.  Is there evidence that the machine is not meeting the manufacturer's specifications for average strength? Use a 0.05 level of significance For this I used the z test and ended up with the value of -1.4. After determining critical values, -1.4 is within the range. Therefore, we fail to reject the null hypothesis.  C.  Compute the p value and interpret its meaning p value =...

Module #4 Assignment

 9/18/2023 A. Based on Table 1 What is the probability of: B B1 A 10 20 A1 20 40 A1 . Event A 10/(10 + 20) = 10 / 30 = 1/3 A2 . Event B? 20 / (10 + 20) = 20 /30 = 2/3 A3.  Event A or B (1/3) + (2/3) - (10/30) = (3/3) - (10/30) = 1 - 1/3 = 2/3 A4 . P(A or B) = P(A) + P(B) (1/3) + (2/3) = 3/3 = 1 B. Applying Bayes' Theorem  Jane is getting married tomorrow, at an outdoor ceremony in the desert. In recent years, it has rained only 5 days each year. Unfortunately, the weatherman has predicted rain for tomorrow. When it actually rains, the weatherman correctly forecasts rain 90% of the time. When it doesn't rain, he incorrectly forecasts rain 10% of the time. What is the probability that it will rain on the day of Jane's wedding?  Solution: The sample space is defined by two mutually-exclusive events - it rains or it does not rain. Additionally, a third event occurs when the weatherman predicts rain. Notation for these events appears below. Event A1. It rains on...

Module #3 Assignment

 9/11/2023 This week I am analyzing two sets of data: Set#1:  10, 2, 3, 2, 4, 2, 5 Set#2:  20, 12, 13, 12, 14, 12, 15 Set #1: x <- c(10, 2, 3, 2, 4, 2, 5) mean(x) : 4 median(x) : 3 For the mode I had to do some research, but ended up with this:  freq_table <- table(x) mode_values <- as.numeric(names(freq_table[freq_table == max(freq_table)])) cat("Mode(s):", mode_values, "\n") The result : 2 range(x) : 8 IQR(x) : 2.5 var(x) : 8.33 sd(x) : 2.89 Set #2: y <- c(20, 12, 13, 12, 14, 12, 15) mean(y) : 14 median(y) : 13 freq_tables <- table(y) mode_value <- as.numeric(names(freq_table[freq_table == max(freq_table)])) cat("Mode(s):", mode_values, "\n") result : 12 range(y) : 8  IQR(y) : 2.5 var(y) : 8.33 sd(y) :2.89 -It's interesting to me that the data sets share the same range, IQR, variance and standard deviation according to my results. This must mean they have similar variability. 

Module #2 Assignment

9/4/23   This week I evaluated the functions: assignment2<- c(6,18,14,22,27,17,22,20,22) myMean <- function(assignment2){return(sum(assignment2)/length(assignment2))} The first creates a vector called assignment2. Second, a function to find mean is assigned to 'myMean'. In this function, the sum of all the numbers in the vector is calculated with sum(assignment2) and then divided by the number of elements in the vector with length(assignment2). When this function is called with the assignment 2 vector, it returns the mean which is 18.667.