Posts

Showing posts from February, 2024

Module 7 Assignment

Image
Daniel Tafmizi Lis 4273 Dr. Ajani  February 23, 2024 Module 7 Assignment Question 1) x <- c(16, 17, 13, 18, 12, 14, 19, 11, 11, 10) y <- c(63, 81, 56, 91, 47, 57, 76, 72, 62, 48) Y = a + bX +e 1.1 Define the relationship model between the predictor and the response variable: model <- lm(y~x)  R equation for x,y relationship. Y is the target, x is the predictor   Relationship Model :  Y = 19.206 + 3.269X, RSE =10.48 the relationship has a positive correlation 1.2 Calculate the coefficients? summary(model)  gives information about the relationship model regression coefficient = 3.269, intercept coefficient = 19.206 question 2) discharge <- c(3.600,1.800,3.333,2.283,4.533,2.883) waiting <- c(79,54,74,62,85,55) visit <- data.frame(discharge, waiting) model2 <- lm(discharge ~ waiting, data=visit) summary(model2) Relationship Model : Y= -1.53317 + 0.06756X, RSE = 0.4724, the relationship has a positive correlation coeffs = coefficients(model2); coeffs # extracts coeffici

Module 6 assignment

Image
Daniel Tafmizi Lis 4273 Dr. Ajani  February 18, 2024 Module 6 Assignment #A) Consider a population consisting of the following values, which represents the number of  #ice cream purchases during the academic year for each of the five housemates.8, 14, 16, 10, 11 iceCream <- c(8,14,16,10,11) #Creates numerical vector #b. Select a random sample of size 2 out of the five members.  #See the example I used in my Power-point presentation slide # 13. randomSample <- sample(iceCream, 2) #Gets random sample of two values 10 & 8 were chosen # c. Compute the mean and standard deviation of your sample. mean(randomSample) # mean of sample = 9 sd(randomSample) # standard deviation of sample = 1.414214 mean(iceCream) # mean of population = 11.8 sd(iceCream) # standard deviation of population = 3.193744 #d. Compare the Mean and Standard deviation of your sample to the entire population of this set (8,14, 16, 10, 11). # The random sample taken chose the two lowest values of the population. Be

Module 5 Assignment

Image
Daniel Tafmizi Lis 4273 Dr. Ajani  February 11, 2024 Module 5 Assignment 1 ) The director of manufacturing at a cookies company needs to determine whether a new machine is able to produce 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 of 49 cookies reveals a sample mean breaking strength of 69.1 pounds. A.   Null Hypothesis: The new machine falls within the manufacturers' specifications for cookie breaking strength. Alternative Hypothesis: The new machine does not fall within the manufacturers' specifications for cookie breaking strength. B.  Is there evidence that the machine is not meeting the manufacturer's specifications for average strength? Use a 0.05 level of significance.  No, the new machine is meeting the manufacturers' specifications. C.  Compute the p value and interpret its meaning The P-value is .0719, which is greater than

Module 4 Assignment

 Daniel Tafmizi Lis 4273 Dr. Ajani  February 4, 2024 Module 4 Assignment Question A) A1: 33% A2: 33% A3: 66% A4: 55% Question B)  Trick question, Jane is getting married not Marie and wow is my brain hurting. Jokes aside, I believe this answer is True. We are looking to see if it will rain based on the weatherman's report. We need to get the value of the weatherman's conditional probability, which is seen in (0.014)(0.9). Then we need to see how his predictions play out in the real world through prior probability, which is seen in [ (0.014)(0.9) + (0.986)(0.1) ]. Dividing these gives us our probability that the weatherman is right .1 out of .986 is much greater than .9 of .014. Thus it stands to reason that the probability would be low. Bayes' theory is cool and I would like to spend more time with it. Question C) > dbinom(x=10, size=10, prob=.2) [1] 1.024e-07