Posts

Showing posts from September, 2025

Module 4 Probability theory

 Robert Dees  LIS4273 September 21st, 2025 Module 4 assignment Probability Part A A1. 1/3 A2. 1/3 A3. 5/9 A4. These are not equal since A and B are not mutually exclusive they overlap. Part B  B1. It is true that Marie will more than likely not be rained on during her wedding day  B2, Rain is rare, even with the forecast, most days it is predicted to rain it still doesn't rain.  Part C dbinom(10, size = 10, prob = 0.8) Bayes result for rain given a rain forecast is about 0.113. Ten straight successes with the traditional method is about 0.1074.

Module 3 assignemnt

  1. Central Tendency Set #1: 10, 2, 3, 2, 4, 2, 5 Mean = 4.0 Median = 3.0 Mode = 2 Set #2: 20, 12, 13, 12, 14, 12, 15 Mean = 14.0 Median = 13.0 Mode = 12 2. Variation Set #1 Range = 8 IQR = 2.5 Variance = 8.33 Standard Deviation = 2.89 Set #2 Range = 8 IQR = 2.5 Variance = 8.33 Standard Deviation = 2.89 3. Comparison Set #1 stays pretty low overall with an average of 4, a median of 3, and a mode of 2. Set #2 is higher across the board with an average around 14, a median of 13, and a mode of 12. Basically, Set #2 looks like Set #1 just shifted up by about 10 points. The spread is the same in both sets though. They have the exact same range, IQR, variance, and standard deviation. That means the consistency of the data is identical, even though one set has smaller values and the other has larger ones. So overall, the difference is just where the numbers sit . Set #1 clusters around lower values, while Set #2 clusters higher...

Module # 2 assignment

 # Create the dataset  assignment2 <- c(6, 18, 14, 22, 27, 17, 19, 22, 20, 22) # Define custom mean function myMean <- function(x) {   return(sum(x) / length(x)) } # Run the function on assignment2 myMean(assignment2) # Compare with R's built-in mean mean(assignment2) Output > # Create the dataset > assignment2 <- c(6, 18, 14, 22, 27, 17, 19, 22, 20, 22) > > # Define custom mean function > myMean <- function(x) { + return(sum(x) / length(x)) + } > > # Run the function on assignment2 > myMean(assignment2) [1] 18.7 > > # Compare with R's built-in mean > mean(assignment2) [1] 18.7 I made a numeric vector called assignment2 with ten numbers: 6, 18, 14, 22, 27, 17, 19, 22, 20, and 22. I then wrote a function called my Mean that adds up the values and divides by how many there are. That is the basic way to calculate the arithmetic mean. When I ran the function, it returned 18.7, which is the same result as R’s built-in mean fu...