
Discussion Assignment
Unit 2
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?
It’s not possible to calculate an average value for the fruit in the problem. The fruit is a nominal
categorical variable. It would be possible if we were to assign a numeric value to each fruit.
Using “factors” would be appropriate to code the fruit.
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?
The average of the quiz scores equals 68. The score is a numeric value.
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?
Once again, we can’t calculate the average (mean) for the grades until they have a numeric value.
The letter grades are factors until they change into numeric values.
4) How would you explain the difference in mean values obtained in #2 and #3 above?
If F scores as 50% on the quiz, then the average would be higher than the 68% as in problem #2.
It could push the average grade to 80%. The variables used in problem #2 were in numeric form,
and we were able to calculate the mean. The variables in problem #3 needed to be modified into
a numeric form to calculate the mean (Yakir, 2011).
References
Yakir, B. (2011). Introduction to statistical thinking (with R, without calculus). The Hebrew
University of Jerusalem, Department of Statistics.