A few weeks ago, I was teaching MAD with the Mammal data set. After working through the steps to find the MAD, in the case table and plots, a student noticed an error. The absolute deviations for the three mammals with missing data were calculated as zero hours. The actual MAD is 4.73, but we got 4.2 hours.
This was a great teaching moment as I talked about examining data sets with the pre-service teachers (it made sense to delete the three cases).
When I plotted the MAD on a new dot plot, the statistic was accurate. By adding count to the plot, it became a little more obvious.
My question is, why did the absolute deviation column report zero when the deviation column is “empty” for those mammals? This would be tricky to notice in a large data set.
Thanks for this! You and your students found a bug in the abs function. The difference of the missing value and the mean is correctly evaluated as a missing value, but abs incorrectly reports zero instead of missing. Please convey our thanks to your class!
The bug fix will probably appear in less than two weeks. I’m sorry your teaching moment will be taken away. 😉