Posts

Showing posts from September, 2023

A Rough Road to the End (starring corrgram()!)

Image
  Part I: A.       Null hypothesis: The cookie-making machine is making less than 70 cookies. Alternative hypothesis: The cookie-making machine is making either exactly 70, or more than 70 cookies. B.       Z = (M – μ) / √(σ^2 / n) = (69.1 – 69) ) / √((3.5)^2 / 55) = (69.1 – 69) ) / √(12.25/ 55) = 0.1 / 0.47 Z = 0.21 (Greater than LOS of 0.05, so null hypothesis is not rejected.) C. A p-value of ~0.58 is mostly neutral, not leaning greatly towards 1 nor 0. Therefore, it is not statistically significant and the null hypothesis cannot be rejected. D.       Z = (M – μ) / √(σ^2 / n) = (69.1 – 69) ) / √((1.75)^2 / 55) = (69.1 – 69) ) / √(3.06/55) = 0.1 / 0.0556 Z = 1.79 (Greater than LOS of 0.05, so null hypothesis is still not rejected.) E.       Z = (M – μ) / √(σ^2 / n) = (69 – 69) ) / √((3.5)^2 / 55) = (69 – 69) ) / √(12.25/ 55) = 0 / 0.47 Z = 0 (Less than LOS of 0.05, so null hypothesis is rejected.) Part II: Part III:

Poking with Probability

Image
  A1. For Event A, both values in the row for it add up to 30. Dividing this by the total value of 90 for all the listed data gives us a 1 in 3 chance of Event A occurring. A2. The values in the B column, much like the row A, also add up to 30. Dividing by the total of 90 gives us a 1 in 3 chance of Event B occurring. A3. To get the probability of either Event A or Event B occurring, we need to add the probabilities of both occurring together, and subtract that from the probability of both occurring at the same time. So, 1 of 3 plus another 1 of 3 (1/3 + 1/3) is equal to 2 of 3 (2/3). Now, to get the probability of both events occurring, we multiply both probabilities together (1/3 * 1/3), which gives us 1/9. 2/3 can be rewritten as 6/9, and subtracting the 1/9 probability of both events occurring leaves us with 5/9, or a roughly 56% chance of either Event A or Event B occurring. A4. As noted in the previous question the probability of A plus the probability of B (1/3 + 1/3) is equal t

Mean, Median, Mode, oh my!

Image
  Despite nearly all the other functions leading to differing results between both sets of values, Variance, Interquartile and Standard Deviations actually returned equal values for both.

First Assignment!

Image
  In this R coding example, myMean is a function that takes the input of a given set of values (in this case, the assignment2 array), and calculates the mean of the set of values by adding all of them together (168) and dividing that by the number of values given (9).