How to implement a floor function in the factoring strategy

Added by Adin Ramirez over 8 years ago

I want to know if it's possible to implement a floor function to do the scoring. For example, if I want to penalize a set of wrong answers instead of each wrong answer.
That is, for every 3 wrong answers remove one correct one. Now, I'm able to remove 1/3 per wrong answer, but I will like something that counts or does a floor operation.

Suggestions?


Replies (8)

RE: How to implement a floor function in the factoring strategy - Added by Alexis Bienvenüe over 8 years ago

You can get a floor at -1 for example with p=-1.

RE: How to implement a floor function in the factoring strategy - Added by Adin Ramirez over 8 years ago

What I ment by floor function is a rounding function to obtain the rounded down value.

For example, if I have 10 questions I want to deduct one point for every 3 wrong questions without counting not answered ones.
Then, assume that a student answered 9 of 10, and from that 9, 5 are correct and 4 are incorrect. Then I will deduct one point from the 4 wrong answers, because floor(4/3) = 1.
Thus, the final score is 5-floor(4/3) = 4 marks. However, in the current form I can deduct 1/3 for each wrong answer.

So, how can I achieve the former?

RE: How to implement a floor function in the factoring strategy - Added by Frédéric Bréal over 8 years ago

may be this

\begin{questionmult}{test}\scoring{formula=(NMC>3 ? NBC-int(NBC/3):NBC)}
...
\end{questionmult}

RE: How to implement a floor function in the factoring strategy - Added by Adin Ramirez over 8 years ago

But that score is for a multiple answer question with more than one correct answer, right?

What if I have normal

\begin{question} ... \end{question}

type of questions. I want to count the results of those (as a whole), and not the answers for only one.

RE: How to implement a floor function in the factoring strategy - Added by Frédéric Bréal over 8 years ago

First, sorry for my english.

But that score is for a multiple answer question with more than one correct answer, right?

You may choose a only one correct answer.

I want to count the results of those (as a whole), and not the answers for only one.

Sorry, i don't know.

RE: How to implement a floor function in the factoring strategy - Added by Adin Ramirez over 8 years ago

I think I'm not explaining myself.

The strategy that I failed to convey was ment for the whole test.
That is assuming that each question grants 1 point when answered correctly (regardless of the number of options), and a non-answered question gives no penalty.
However, every 3 wrong answers (for example) I would like deduct one point.

So, if the correction was:
Correct answers: 5
Wrong answers: 4
Blank answers: 1
Total questions: 10

The student score (for the whole exam) should be 5 - floor(4/3) = 4 points.

I would like to know how can I implement that using the functions provided by AMC.

RE: How to implement a floor function in the factoring strategy - Added by Alexis Bienvenüe over 8 years ago

So, you can get it like this :
  1. questions scores should be 1 for correct answers, 0 for blank, and -1/3 for wrong answers (for example with \scoring{d=1,b=0,m=-1,p=-1/3})
  2. In Edit/Preferences/Project/Global mark rules, set _Grain_=1 and _Rounding type_=ceiling.

RE: How to implement a floor function in the factoring strategy - Added by Adin Ramirez over 7 years ago

Hi,

I'm still struggling with this issue.

For example, if I have a test with 25 questions, and I have the following students with the expected results

C: 24, W: 1, B: 0, ES: 24 (marks 19.2)
C: 23, W: 2, B: 0, ES: 23 (marks 18.4)
C: 22, W: 3, B: 0, ES: 21 (marks 16.8)

That is, correct (C), wrong (W), and blank (B) answers, the expected score (ES) and the marks as you compute them with the max grade in the preference settings.

The closest I could get was when using: \scoringDefaultS{v=0,e=-1/3,m=-1/3,b=1}, as the one you put on the previous answer gave me 0 in the marks.

However, with that scoring strategy I obtain

C: 24, W: 1, B: 0, ES: 23.67 (marks 18.936)
C: 23, W: 2, B: 0, ES: 23.34 (marks 18.672)
C: 22, W: 3, B: 0, ES: 21.01 (marks 16.808)

And those values are totally different from what I am expecting. I will like to do a floor on ES not on the marks. How can I achieve that?

(1-8/8)