Bar Graph on Quiz Results - Grade Ranges

Bar Graph on Quiz Results - Grade Ranges

by Helen Norris -
Number of replies: 14
I have set a quiz with 6 questions with a maximum grade of 6 (1 point per question). The quiz results bar graph of students achieving grade ranges displays ranges as follows:
0-1, 1-1, 1-2, 2-2, 2-3, etc. If I increase the maximum grade, say to 12 (2 points per question), on the editing quiz tab, the bar graph then shows the grade ranges as 0-1, 1-2, 2-3, 3-4.

Does anyone know why this is? The second display is the one that I want and I don't understand why the first one is as it is.

I would be grateful for help asap on this one. Thank you!
Average of ratings: -
In reply to Helen Norris

Re: Bar Graph on Quiz Results - Grade Ranges

by Tim Hunt -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
Well, the code that decides how many bands to show is in

http://cvs.moodle.org/moodle/mod/quiz/report/overview/overviewgraph.php?view=markup&pathrev=MOODLE_19_STABLE

The bit just after the comment

//pick a sensible number of bands depending on quiz maximum grade. I guess it is not

being all that sensible. Perhaps we need a better algorithm.
In reply to Tim Hunt

Re: Bar Graph on Quiz Results - Grade Ranges

by Helen Norris -
Thanks, Tim.
In reply to Helen Norris

Re: Bar Graph on Quiz Results - Grade Ranges

by Teresa Gibbison -

Hi Tim

Do you know of any future plans to "find a better algorithm" to determine the bands in the quiz results graph?

We have quizzes with a maximum grade of 10, zero decimal places in grades and see 0-1, 1-2, 2-3, 3-4, etc as the range.

This is not helpful as it's not clear whether this contains the results for '1' or '2' or both.

Cheers
Teresa

In reply to Teresa Gibbison

Re: Bar Graph on Quiz Results - Grade Ranges

by Tim Hunt -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

Would you like to suggest an algorithm?

Or even just suggest what the bands should be for your specific case.

In reply to Tim Hunt

Re: Bar Graph on Quiz Results - Grade Ranges

by Jean-Michel Védrine -

Call me a purist, but for me this graph is not a band graph it's an histogram and bands are in fact bins.

According to wikipedia (see above link Number of bins and width) There is no "best" number of bins, and different bin sizes can reveal different features of the data so finding a best algorithm is not an easy task. Wikipedia page suggest several formulas.

I too find the label of bins quite confusing.

The algorithm is in fact using the formula bin = floor(grade/binwidth) so is following the "common use" and for instance "1 - 2" means that 1 is included but 2 is excluded. The last bin is a special case because the upper limit is also included because it's the quiz max grade.

As a side note, some countries use the exact inverse rule: they include the bigger value and exclude the smaller for each bin except the first one വിക്രുതഹാസം.

Last remark: looking at this (ugly) graph remind me of Joseph's message in the developer's forum about including a better graph library in Moodle

In reply to Jean-Michel Védrine

Re: Bar Graph on Quiz Results - Grade Ranges

by Tim Hunt -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

There may not be a theoretical 'best' number of bins, in an abstract sense, but we have a specific purposes here: we want to automatically draw a histogram of these results of this quiz as a 600px-wide image to display in a web browser (or print). And while we don't need a 'best' set of bins, we need a choice that is good. And then we need a way to display that axis so it is not confusing. That is our problem, and I think it is well-enough defined.

In reply to Jean-Michel Védrine

Re: Bar Graph on Quiz Results - Grade Ranges

by Marcus Green -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers

Jean-Michel you appear to be quoting Wikipedia as a reference on a site used extensively by academic. Is this wise പുഞ്ചിരി

In reply to Marcus Green

Re: Bar Graph on Quiz Results - Grade Ranges

by Joseph Rézeau -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers Picture of Translators

@Marcus,

I am of opinion that is quite OK to quote Wikipedia on a forum. Things would be quite different in a research paper, a thesis, etc. of course, if only because Wikipedia articles do not have authors.

Joseph

In reply to Tim Hunt

Re: Bar Graph on Quiz Results - Grade Ranges

by Teresa Gibbison -

Hi Tim

I've asked the staff member who queried this what they think they'd like but have not had a reply.  I cannot suggest an algorithm but I believe the main point he was making was that it is unclear if a student's score of '2' would be included in the '1 - 2' band or the '2 - 3' band or both...  

Would it be possible to have them appear as  "0.00 - 0.99, 1.00 - 1.99, 1.99 - 2.00 etc" so it is clear.  I also think if there are less than 10 then "1, 2, 3, 4, etc" would work too.

Cheers
Teresa

In reply to Teresa Gibbison

Re: Bar Graph on Quiz Results - Grade Ranges

by Tim Hunt -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

The problem with 0.00 - 0.99 and 1.00 - 1.99 is that it is then not clear where a score of 0.995 would go. That would be displayed as 1.00 when rounded to 2 decimal places, but would acutally go in the '0.00 - 0.99' bin.

An accurate way to label the axis is something like 0 ≤ < 1, but that strikes my overly mathematically pedantic.

 

In reply to Tim Hunt

Re: Bar Graph on Quiz Results - Grade Ranges

by Teresa Gibbison -

Hi Tim

Here is the response from the staff member I was working with regarding this - I hope it helps:

"0, 1, 2, 3, etc" would be ideal,
otherwise "0.00 - 0.99, 1.00 - 1.99, etc" as you suggest
or perhaps "0.00 - 0.49, 0.50 - 1.49, etc".

The number of bars should by M+1 where M is the maximum
grade for the quiz, or (M+1)/K where K is the smallest
integer such that (M+1)/K is less or equal to the maximum
number of bars they want to show.

In reply to Teresa Gibbison

Re: Bar Graph on Quiz Results - Grade Ranges

by Tim Hunt -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

Thanks for asking about this.

I think the key thing there is the +1.

I don't think the K thing is quite right. I think that we alwasys want the 'step size' to be something like ..., 0.1, 0.2, 0.5, 1.0, 2.0, 5.0, 10.0, 20.0, .... - and we chose the value there that gives us the number of bars we want, say between 7 and 15.

Acutally, I once wrote some very nice code that did that. I wonder where that was? If I can find it, I will reuse it. Otherwise, I will have to re-code it.

In reply to Tim Hunt

Re: Bar Graph on Quiz Results - Grade Ranges

by Brian Rigwald -

Since it is showing "grade ranges", shouldn't it be tied to the letter grades set up, so you can see the distribution across that? 

If you have 93% as an A, then the number of students with percentages 93-100 would be shown in the A grade range.  90-92% in the A- grade range, etc...