• Home
  • University of the People
  • Data Structures (proctored course) CS 3303
  • Data Analysis and Statistics

Data Analysis and Statistics

University: University of the people Course: MATH 1280 Introduction to Statistics Discussion forum unit 2 Factors are qualitative data that are associated with categorization or the description of an attribute. Factors are often (but not always) represented with words, like colors or names of things. On the other hand, numeric data are generated by numeric measurements. R can store values as factors or numbers, but sometimes you have a choice of how to represent values. 1) I have two apples, one banana, one cherry. Does it make sense to calculate the "average= of these things? Would you code that as a factor or a numeric value in R? 2) I have four quiz scores: 94, 93, 85, and 0. What is the mean (average) of my quiz scores? Would you code this as a factor or a numeric value in R? 3) In another class, I received these grades on my quizzes: two As, one B, and one F. What is the mean (average) of my grades? Would you code that as a factor or a numeric value in R? 4) How would you explain the difference in mean values obtained in #2 and #3 above? SAMPLE SOLUTION: 1. I have two apples, one banana, and one cherry. Does it make sense to calculate the "average= of these things? Would you code that as a factor or numeric value in R? Prior to anything else, it's important to keep in mind that factors are qualitative data connected to attribute categorization or description. Though not usually, words like colours or item names are frequently used to denote components. On the other hand, numerical measurements produce numerical data. Although R may store values as either factors or numbers, there are some situations where you must select between the two. Qualitative data is what factors are. Because the fruits stated are not numbers and hence cannot be submitted to numerical analysis, calculating an average is not possible. We would code the same as the factor in R. Therefore, there is no way to calculate an average because the colours are not numbers and hence cannot be analyzed numerically. "Factors= would be used to code the colours. So, It doesn't make sense to calculate the average of these coloured fruits, because the colours are not numbers, hence not subject to numerical analysis. The colours can be coded as factors. 2. I have four quiz scores: 94, 93, 85, and 0. What is the mean (average) of my quiz scores? Would you code this as a factor or a numeric value in R? From this example we can see that the data type is numeric, so we can code them as a numeric value in R. Each piece of data is a number and quantitative We have given the scores 94,93,85,0 We can calculate the mean or the average of scores by adding all the given scores and dividing by the total number of scores given ( we have 4 scores are given ) So