calculations Archives | SnapSurveys Support documentation for Snap Surveys products Fri, 15 Nov 2024 11:58:34 +0000 en-GB hourly 1 https://wordpress.org/?v=6.4.5 https://www.snapsurveys.com/support-snapxmp/wp-content/uploads/2020/07/favicon-32x32-1.png calculations Archives | SnapSurveys 32 32 Calculating marks in a quiz, test or assessment https://www.snapsurveys.com/support-snapxmp/snapxmp/calculating-marks-in-a-quiz/ Mon, 10 May 2021 12:11:58 +0000 https://www.snapsurveys.com/support-snapxmp/?post_type=epkb_post_type_1&p=4842 Using a weight matrix gives the ability to differentiate between correct or incorrect responses to a question. In this example, four multiple choice questions are used, each with four possible answers. Using weighted variables we identify the response for a correct answer as those weighted as one and for an incorrect answer as those weighted […]

The post Calculating marks in a quiz, test or assessment appeared first on SnapSurveys.

]]>
Using a weight matrix gives the ability to differentiate between correct or incorrect responses to a question.

In this example, four multiple choice questions are used, each with four possible answers. Using weighted variables we identify the response for a correct answer as those weighted as one and for an incorrect answer as those weighted as zero. Using these numbers the total number of correct responses can be calculated.

Insert the questions

  1. Create a multiple choice question with a single response.
Create the quiz or test questions
  1. Select Q1 and click Clone CloneIcon.png to set up three more multiple choice questions called Q2, Q3 and Q4, each with four possible answers (codes) and with a single response.

Create the weights

  1. Click on the weights WeightsIcon.png  button to open the Weights window.
  2. Select New Weight NewIcon.png to create a new weight. In Name enter ScoreA. This will be used for each question where A is the correct answer.
    In Code List, enter a Value of 1 for Code 1 and 0 for Code 2, 3 and 4.
Create the weight indicating a correct answer
  1. Click Save SaveIcon.png  to save the new weight and close the Weight Details window.
  2. Repeat steps 2 to 3 to create three more similar weights for ScoreB, ScoreC and ScoreD where the value of 1 is in codes 2, 3 and 4 respectively.
Weights for scoring the quiz questions

Create the derived variable

  1. Open the Variables window  VariablesIcon.png and click  NewIcon.png  to add a new variable which will be used to total the number of correct responses.
  2. In Name enter Total.
  3. Set the Type to Derived and the Response to Quantity.
  4. In the Code list set the value for OK as ScoreA(Q1)+ScoreB(Q2)+ScoreC(Q3)+ScoreD(Q4)

The OK value is used as the total score. This depends on the correct answers for each question. In the example, Q1 has the answer A (the first answer), Q2 has the answer B (the second answer), Q3 has the answer C (the third answer) and Q4 has the answer D (the fourth answer).

Derived variable to calculate the total score

Display the result

You can display the total score to the participant.

  1. Place the cursor in the text area of a question, title or instruction where you want the total to appear.
  2. Right click on the cursor and click Insert and then click Variable Field.
  3. In the New variable field window select Total in the Variable list and click OK.
New variable field used to display the total

The variable field appears like this in your questionnaire.

The total score shown in design mode

When your survey is completed it will appear like this in the browser.

The total score shown in a live interview

If there is a topic you would like a worksheet on, email to snapideas@snapsurveys.com

The post Calculating marks in a quiz, test or assessment appeared first on SnapSurveys.

]]>
Setting an initial value https://www.snapsurveys.com/support-snapxmp/snapxmp/initial-value/ Mon, 19 Apr 2021 10:54:47 +0000 https://www.snapsurveys.com/support-snapxmp/?post_type=epkb_post_type_1&p=4679 An initial value can be set for a question. This value is selected or displayed as the default answer to the question, when a participant is completing the questionnaire. The Initial Value field can be set to a code, literal constant or an expression using values from the preceding questions, depending on the question style. […]

The post Setting an initial value appeared first on SnapSurveys.

]]>
An initial value can be set for a question. This value is selected or displayed as the default answer to the question, when a participant is completing the questionnaire. The Initial Value field can be set to a code, literal constant or an expression using values from the preceding questions, depending on the question style.

The initial value is set in the Variable Details window or Variable Properties window.

In the Variable Details window, the Initial Value field is shown when you click Toggle Definitions ToggleDefnIcon.PNG .

Enter an initial value in the Variable Details window

The Initial Value property is also available in the Variable Properties dialog opened from the Questionnaire window.

Entering an initial value in the Variable Properties dialog

Note that the Initial Value is not available for Paradata variables or Note variables.

Using the Initial Value property

In this example, the questionnaire is set up to ask about the number of people in the participant’s party. The values that the participant enters can be used to set the initial value for a question about the number of people in the party who ordered food.

In this questionnaire, Q2 is an Open Series question asking for the number of adults and children in a group of people at a restaurant and Q3 is an Open Ended question asking how many people in the party ordered food. Usually everyone orders food so the default for Q3 is the total number of people in Q2.

The questions are created using the following step by step instructions:

  1. Open the survey in the Questionnaire window with Design mode set.
  2. Click New Question SnapDesktopPlusIcon.PNG   on the Questionnaire toolbar to insert a question.
  3. Select the Open Series style from the Style Selection Box on the toolbar.
  4. In the area marked “Click here for text”, enter “How many people were in your party today?”
  5. Click Variable Properties SnapDesktopVariableProp.PNG on the Questionnaire toolbar. This opens the Variable Properties dialog.
  6. In the Variable Properties change the
    • Response: Quantity
    • Label: Adults
  7. Insert another entry with the properties
    • Response: Quantity
    • Label: Children.
Open Series question with a quantity response
  1. Insert another Open Ended question to be used to show the number of people who ordered food. Again set the Response to Quantity.
Open Ended question with a quantity response
  1. Click Variable Properties SnapDesktopVariableProp.PNG on the Questionnaire toolbar. This opens the Variable Properties dialog.
  2. Type Q2a+Q2b in the Initial Value to show the total number of people in the party. When an expression is used this automatically sets the Read Only property to Yes. Setting the Read Only property to Yes prevents a respondent overwriting or answering the question.
Enter an initial value in the Variable Properties dialog
  1. This question needs to be on the following page so insert a page break above this question.
Adding a page break
  1. When the questionnaire is running the participant enters the numbers in each question.
Open Series question shown in an interview
  1. On the next page of the questionnaire the total number of people is used as the default.
Open Ended question shown with an initial value in an interview

The post Setting an initial value appeared first on SnapSurveys.

]]>