Tuesday, September 5, 2023

LIS4273 - Module 3 Assignment

 For this assignment, I will be examining the following two sets of data that each consist of 7 observations.

Set #1: 10, 2, 3, 2, 4, 2, 5

Set #2: 20, 12, 13, 12, 14, 12, 15

For these sets, I will compute the mean, median, and mode under Central Tendency as well as compute the range, interquartile, variance, and standard deviation under Variation. Lastly, I will compare the results between Set #1 and Set #2 by discussing the differences between the two sets.

Question 1:

Compute the mean, median, and mode under Central Tendency for both sets.

Set #1

Set #2

Question 2:

Compute the range, interquartile, variance, and standard deviation under Variation for both sets.

Set #1

Set #2

Question 3:

Compare the results between Set #1 and Set #2 by discussing the differences between the two sets.

To begin this discussion about the differences between Set1 and Set2, we can first see differences beginning to arise when we look at the results of Set1's and Set2's mean and median. Naturally, these two sets will render differing results because the vectors contain different values and are thus, not alike. 

Moving on to the mode, Set1 and Set2 are both classified as numeric by R because it seems R was unable to find a mode in either dataset. 

As for the range, both Set1 and Set2 produce differing results because once again, the two datasets contain different numeric values. In other words, the largest value in Set1 is 10 while the largest value in Set2 is 20. However, when we subtract the max value from the min values in both Set1 and Set2, both datasets result in a range of 8. 

Transitioning to the interquartile and variance calculation, we can note that the outputs of both sets are identical. Lastly, with the standard deviation of Set1 and Set2, the outputs are once again identical.

~ Katie

Monday, August 28, 2023

LIS4273 Module 2 Assignment (New)

For this assignment, I will evaluate the function myMean and the variable assignment which contains a vector of numeric values. Due to some inconsistencies between the Module 2 assignment text and Module 2 example code, I will evaluate the code described in the assignment text as well as the example code and their associated outputs.

Assignment text input:

# A vector of numeric values assigned to assignment

assignment <- c(6, 18, 14, 22, 27, 17, 19, 22, 20, 22)

myMean <- function(assignment2){

  return(sum(assignment2) / length(assignment2))

}

Output:

Assignment example code input:

# Missing the value 19 from the vector and called assignment2 rather than assignment

 assignment2 <- c(6, 18, 14, 22, 27, 17, 22, 20, 22)

myMean <- function(assignment2) {return(sum(assignment2)/length(assignment2))}

Output:

To describe what the function assignment2 does, we can see that it is an argument passed through the function. When we call the myMean function and insert the variable assignment or assignment2, it returns the simple mean of the chosen vector variable. The myMean function takes in a vector as input, and returns the sum of the vector values divided by the length of the vector.

Below are the following outputs of assignment text and assignment example code if we were to call the function and insert a variable to perform a calculation. 

Assignment text input:

myMean(assignment)

Output:

Assignment example code input:

myMean(assignment2)

Output:

As you can see, the outputs vary because the assignment vector contains the value 19 and holds 10 values as compared to the assignment2 vector containing only 9 values and is missing the value 19.

~ Katie 

Sunday, August 20, 2023

LIS 4370 R Programming - sentimentTextAnalyzer2 Final Project

For this class's major final project, I set out to make the process of analyzing textual files and URL links for sentiment insights much...