// Numbas version: exam_results_page_options {"name": "Statistics Quiz: Part 1", "metadata": {"description": "

Welcome the the first stats quiz! It's very short. 

Write down on a sheet of paper the data you are given, along with your detailed calculations. Submit a picture on google classroom. 

Let me know if you have any questions!

Good luck!

", "licence": "All rights reserved"}, "duration": 1500, "percentPass": 0, "showQuestionGroupNames": false, "showstudentname": true, "question_groups": [{"name": "Group", "pickingStrategy": "all-ordered", "pickQuestions": 1, "questions": [{"name": "Measure of central tendency and variability", "extensions": ["stats"], "custom_part_types": [{"source": {"pk": 2, "author": {"name": "Christian Lawson-Perfect", "pk": 7}, "edit_page": "/part_type/2/edit"}, "name": "List of numbers", "short_name": "list-of-numbers", "description": "

The answer is a comma-separated list of numbers.

\n

The list is marked correct if each number occurs the same number of times as in the expected answer, and no extra numbers are present.

\n

You can optionally treat the answer as a set, so the number of occurrences doesn't matter, only whether each number is included or not.

", "help_url": "", "input_widget": "string", "input_options": {"correctAnswer": "join(\n if(settings[\"correctAnswerFractions\"],\n map(let([a,b],rational_approximation(x), string(a/b)),x,settings[\"correctAnswer\"])\n ,\n settings[\"correctAnswer\"]\n ),\n settings[\"separator\"] + \" \"\n)", "hint": {"static": false, "value": "if(settings[\"show_input_hint\"],\n \"Enter a list of numbers separated by {settings['separator']}.\",\n \"\"\n)"}, "allowEmpty": {"static": true, "value": true}}, "can_be_gap": true, "can_be_step": true, "marking_script": "bits:\nlet(b,filter(x<>\"\",x,split(studentAnswer,settings[\"separator\"])),\n if(isSet,list(set(b)),b)\n)\n\nexpected_numbers:\nlet(l,settings[\"correctAnswer\"] as \"list\",\n if(isSet,list(set(l)),l)\n)\n\nvalid_numbers:\nif(all(map(not isnan(x),x,interpreted_answer)),\n true,\n let(index,filter(isnan(interpreted_answer[x]),x,0..len(interpreted_answer)-1)[0], wrong, bits[index],\n warn(wrong+\" is not a valid number\");\n fail(wrong+\" is not a valid number.\")\n )\n )\n\nis_sorted:\nassert(sort(interpreted_answer)=interpreted_answer,\n multiply_credit(0.5,\"Not in order\")\n )\n\nincluded:\nmap(\n let(\n num_student,len(filter(x=y,y,interpreted_answer)),\n num_expected,len(filter(x=y,y,expected_numbers)),\n switch(\n num_student=num_expected,\n true,\n num_studentThe separate items in the student's answer

", "definition": "let(b,filter(x<>\"\",x,split(studentAnswer,settings[\"separator\"])),\n if(isSet,list(set(b)),b)\n)"}, {"name": "expected_numbers", "description": "", "definition": "let(l,settings[\"correctAnswer\"] as \"list\",\n if(isSet,list(set(l)),l)\n)"}, {"name": "valid_numbers", "description": "

Is every number in the student's list valid?

", "definition": "if(all(map(not isnan(x),x,interpreted_answer)),\n true,\n let(index,filter(isnan(interpreted_answer[x]),x,0..len(interpreted_answer)-1)[0], wrong, bits[index],\n warn(wrong+\" is not a valid number\");\n fail(wrong+\" is not a valid number.\")\n )\n )"}, {"name": "is_sorted", "description": "

Are the student's answers in ascending order?

", "definition": "assert(sort(interpreted_answer)=interpreted_answer,\n multiply_credit(0.5,\"Not in order\")\n )"}, {"name": "included", "description": "

Is each number in the expected answer present in the student's list the correct number of times?

", "definition": "map(\n let(\n num_student,len(filter(x=y,y,interpreted_answer)),\n num_expected,len(filter(x=y,y,expected_numbers)),\n switch(\n num_student=num_expected,\n true,\n num_studentHas every number been included the right number of times?

", "definition": "all(included)"}, {"name": "no_extras", "description": "

True if the student's list doesn't contain any numbers that aren't in the expected answer.

", "definition": "if(all(map(x in expected_numbers, x, interpreted_answer)),\n true\n ,\n incorrect(\"Your answer contains \"+extra_numbers[0]+\" but should not.\");\n false\n )"}, {"name": "interpreted_answer", "description": "A value representing the student's answer to this part.", "definition": "if(lower(studentAnswer) in [\"empty\",\"\u2205\"],[],\n map(\n if(settings[\"allowFractions\"],parsenumber_or_fraction(x,notationStyles), parsenumber(x,notationStyles))\n ,x\n ,bits\n )\n)"}, {"name": "mark", "description": "This is the main marking note. It should award credit and provide feedback based on the student's answer.", "definition": "if(studentanswer=\"\",fail(\"You have not entered an answer\"),false);\napply(valid_numbers);\napply(included);\napply(no_extras);\ncorrectif(all_included and no_extras)"}, {"name": "notationStyles", "description": "", "definition": "[\"en\"]"}, {"name": "isSet", "description": "

Should the answer be considered as a set, so the number of times an element occurs doesn't matter?

", "definition": "settings[\"isSet\"]"}, {"name": "extra_numbers", "description": "

Numbers included in the student's answer that are not in the expected list.

", "definition": "filter(not (x in expected_numbers),x,interpreted_answer)"}], "settings": [{"name": "correctAnswer", "label": "Correct answer", "help_url": "", "hint": "The list of numbers that the student should enter. The order does not matter.", "input_type": "code", "default_value": "", "evaluate": true}, {"name": "allowFractions", "label": "Allow the student to enter fractions?", "help_url": "", "hint": "", "input_type": "checkbox", "default_value": false}, {"name": "correctAnswerFractions", "label": "Display the correct answers as fractions?", "help_url": "", "hint": "", "input_type": "checkbox", "default_value": false}, {"name": "isSet", "label": "Is the answer a set?", "help_url": "", "hint": "If ticked, the number of times an element occurs doesn't matter, only whether it's included at all.", "input_type": "checkbox", "default_value": false}, {"name": "show_input_hint", "label": "Show the input hint?", "help_url": "", "hint": "", "input_type": "checkbox", "default_value": true}, {"name": "separator", "label": "Separator", "help_url": "", "hint": "The substring that should separate items in the student's list", "input_type": "string", "default_value": ",", "subvars": false}], "public_availability": "always", "published": true, "extensions": []}], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Kariane Ouellet", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/4505/"}], "tags": [], "metadata": {"description": "No description", "licence": "All rights reserved"}, "statement": "

The country of Genovia had its first case of coronavirus 12 days ago. They have been testing travellers and people with symptoms ever since and reported their number of positive cases every day:

\n

1, {day2}, {day3}, {day4}, {day5}, {day6},

\n

{day7}, {day8}, {day9}, {day10}, {day11}, {day12}.

\n

Using the data provided, answer the three questions below.

\n

", "advice": "

No solution.

", "rulesets": {}, "variables": {"day2": {"name": "day2", "group": "Ungrouped variables", "definition": "random(1..5)", "description": "", "templateType": "anything"}, "day3": {"name": "day3", "group": "Ungrouped variables", "definition": "random(2..6)", "description": "", "templateType": "anything"}, "day4": {"name": "day4", "group": "Ungrouped variables", "definition": "random(3..7)", "description": "", "templateType": "anything"}, "day5": {"name": "day5", "group": "Ungrouped variables", "definition": "random(5..10)", "description": "", "templateType": "anything"}, "day6": {"name": "day6", "group": "Ungrouped variables", "definition": "random(6..12)", "description": "", "templateType": "anything"}, "day7": {"name": "day7", "group": "Ungrouped variables", "definition": "random(8..15)", "description": "", "templateType": "anything"}, "day8": {"name": "day8", "group": "Ungrouped variables", "definition": "random(10..20)", "description": "", "templateType": "anything"}, "day9": {"name": "day9", "group": "Ungrouped variables", "definition": "random(12..25)", "description": "", "templateType": "anything"}, "day10": {"name": "day10", "group": "Ungrouped variables", "definition": "random(16..30)", "description": "", "templateType": "anything"}, "data": {"name": "data", "group": "Ungrouped variables", "definition": "[1,day2,day3,day4,day5,day6,day7,day8,day9,day10,day11,day12]", "description": "", "templateType": "anything"}, "mean": {"name": "mean", "group": "Ungrouped variables", "definition": "mean(data)", "description": "", "templateType": "anything"}, "median": {"name": "median", "group": "Ungrouped variables", "definition": "median(data)", "description": "", "templateType": "anything"}, "mode": {"name": "mode", "group": "Ungrouped variables", "definition": "mode(data)", "description": "", "templateType": "anything"}, "day11": {"name": "day11", "group": "Ungrouped variables", "definition": "day8", "description": "", "templateType": "anything"}, "day12": {"name": "day12", "group": "Ungrouped variables", "definition": "random(18..35)", "description": "", "templateType": "anything"}, "range": {"name": "range", "group": "Ungrouped variables", "definition": "range(data)", "description": "", "templateType": "anything"}, "sd": {"name": "sd", "group": "Ungrouped variables", "definition": "sqrt(var)", "description": "", "templateType": "anything"}, "var": {"name": "var", "group": "Ungrouped variables", "definition": "(sum([1,day2^2,day3^2,day4^2,day5^2,day6^2,day7^2,day8^2,day9^2,day10^2,day11^2,day12^2])-12*mean^2)/11", "description": "", "templateType": "anything"}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["day2", "day3", "day4", "day5", "day6", "day7", "day8", "day9", "day10", "day11", "day12", "data", "mean", "median", "mode", "range", "sd", "var"], "variable_groups": [], "functions": {}, "preamble": {"js": "", "css": ""}, "parts": [{"type": "1_n_2", "useCustomName": true, "customName": "Question 1", "marks": 0, "showCorrectAnswer": false, "showFeedbackIcon": false, "scripts": {}, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "adaptiveMarkingPenalty": 0, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "prompt": "

Is this the data of a sample or a population?

", "minMarks": 0, "maxMarks": 0, "shuffleChoices": true, "displayType": "radiogroup", "displayColumns": 0, "showCellAnswerState": false, "choices": ["Sample", "Population"], "matrix": ["2", 0], "distractors": ["", ""]}, {"type": "gapfill", "useCustomName": true, "customName": "Question 2", "marks": 0, "showCorrectAnswer": true, "showFeedbackIcon": true, "scripts": {}, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "adaptiveMarkingPenalty": 0, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "prompt": "

Calculate the measures of central tendency. Enter the numerical values and keep 2 decimal places.

\n

a) Mean: [[0]]

\n

b) Median: [[1]]

\n

c) Mode (could be more than one): [[2]]

", "gaps": [{"type": "numberentry", "useCustomName": false, "customName": "", "marks": "2", "showCorrectAnswer": false, "showFeedbackIcon": false, "scripts": {}, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "adaptiveMarkingPenalty": 0, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "minValue": "mean-0.02", "maxValue": "mean+0.02", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"type": "numberentry", "useCustomName": false, "customName": "", "marks": "2", "showCorrectAnswer": false, "showFeedbackIcon": false, "scripts": {}, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "adaptiveMarkingPenalty": 0, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "minValue": "median-0.02", "maxValue": "median+0.02", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"type": "list-of-numbers", "useCustomName": false, "customName": "", "marks": "2", "showCorrectAnswer": false, "showFeedbackIcon": false, "scripts": {}, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "adaptiveMarkingPenalty": 0, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "settings": {"correctAnswer": "mode", "allowFractions": false, "correctAnswerFractions": false}}], "sortAnswers": false}, {"type": "gapfill", "useCustomName": true, "customName": "Question 3", "marks": 0, "showCorrectAnswer": true, "showFeedbackIcon": true, "scripts": {}, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "adaptiveMarkingPenalty": 0, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "prompt": "

Calculate the measures of spread of the data. Keep 2 decimal places.

\n

a) Range: [[0]]

\n

b) Variance: [[1]]

\n

c) Standard Deviation: [[2]]

", "gaps": [{"type": "numberentry", "useCustomName": false, "customName": "", "marks": "2", "showCorrectAnswer": false, "showFeedbackIcon": false, "scripts": {}, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "adaptiveMarkingPenalty": 0, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "minValue": "range", "maxValue": "range", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"type": "numberentry", "useCustomName": false, "customName": "", "marks": "2", "showCorrectAnswer": false, "showFeedbackIcon": false, "scripts": {}, "variableReplacements": [{"variable": "mean", "part": "p1g0", "must_go_first": true}], "variableReplacementStrategy": "originalfirst", "adaptiveMarkingPenalty": 0, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "minValue": "var-0.3", "maxValue": "var+0.3", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"type": "numberentry", "useCustomName": false, "customName": "", "marks": "2", "showCorrectAnswer": false, "showFeedbackIcon": false, "scripts": {}, "variableReplacements": [{"variable": "var", "part": "p2g1", "must_go_first": false}], "variableReplacementStrategy": "originalfirst", "adaptiveMarkingPenalty": 0, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "minValue": "sd-0.1", "maxValue": "sd+0.1", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}], "sortAnswers": false}]}, {"name": "Measure of central tendency and variability", "extensions": ["stats"], "custom_part_types": [{"source": {"pk": 2, "author": {"name": "Christian Lawson-Perfect", "pk": 7}, "edit_page": "/part_type/2/edit"}, "name": "List of numbers", "short_name": "list-of-numbers", "description": "

The answer is a comma-separated list of numbers.

\n

The list is marked correct if each number occurs the same number of times as in the expected answer, and no extra numbers are present.

\n

You can optionally treat the answer as a set, so the number of occurrences doesn't matter, only whether each number is included or not.

", "help_url": "", "input_widget": "string", "input_options": {"correctAnswer": "join(\n if(settings[\"correctAnswerFractions\"],\n map(let([a,b],rational_approximation(x), string(a/b)),x,settings[\"correctAnswer\"])\n ,\n settings[\"correctAnswer\"]\n ),\n settings[\"separator\"] + \" \"\n)", "hint": {"static": false, "value": "if(settings[\"show_input_hint\"],\n \"Enter a list of numbers separated by {settings['separator']}.\",\n \"\"\n)"}, "allowEmpty": {"static": true, "value": true}}, "can_be_gap": true, "can_be_step": true, "marking_script": "bits:\nlet(b,filter(x<>\"\",x,split(studentAnswer,settings[\"separator\"])),\n if(isSet,list(set(b)),b)\n)\n\nexpected_numbers:\nlet(l,settings[\"correctAnswer\"] as \"list\",\n if(isSet,list(set(l)),l)\n)\n\nvalid_numbers:\nif(all(map(not isnan(x),x,interpreted_answer)),\n true,\n let(index,filter(isnan(interpreted_answer[x]),x,0..len(interpreted_answer)-1)[0], wrong, bits[index],\n warn(wrong+\" is not a valid number\");\n fail(wrong+\" is not a valid number.\")\n )\n )\n\nis_sorted:\nassert(sort(interpreted_answer)=interpreted_answer,\n multiply_credit(0.5,\"Not in order\")\n )\n\nincluded:\nmap(\n let(\n num_student,len(filter(x=y,y,interpreted_answer)),\n num_expected,len(filter(x=y,y,expected_numbers)),\n switch(\n num_student=num_expected,\n true,\n num_studentThe separate items in the student's answer

", "definition": "let(b,filter(x<>\"\",x,split(studentAnswer,settings[\"separator\"])),\n if(isSet,list(set(b)),b)\n)"}, {"name": "expected_numbers", "description": "", "definition": "let(l,settings[\"correctAnswer\"] as \"list\",\n if(isSet,list(set(l)),l)\n)"}, {"name": "valid_numbers", "description": "

Is every number in the student's list valid?

", "definition": "if(all(map(not isnan(x),x,interpreted_answer)),\n true,\n let(index,filter(isnan(interpreted_answer[x]),x,0..len(interpreted_answer)-1)[0], wrong, bits[index],\n warn(wrong+\" is not a valid number\");\n fail(wrong+\" is not a valid number.\")\n )\n )"}, {"name": "is_sorted", "description": "

Are the student's answers in ascending order?

", "definition": "assert(sort(interpreted_answer)=interpreted_answer,\n multiply_credit(0.5,\"Not in order\")\n )"}, {"name": "included", "description": "

Is each number in the expected answer present in the student's list the correct number of times?

", "definition": "map(\n let(\n num_student,len(filter(x=y,y,interpreted_answer)),\n num_expected,len(filter(x=y,y,expected_numbers)),\n switch(\n num_student=num_expected,\n true,\n num_studentHas every number been included the right number of times?

", "definition": "all(included)"}, {"name": "no_extras", "description": "

True if the student's list doesn't contain any numbers that aren't in the expected answer.

", "definition": "if(all(map(x in expected_numbers, x, interpreted_answer)),\n true\n ,\n incorrect(\"Your answer contains \"+extra_numbers[0]+\" but should not.\");\n false\n )"}, {"name": "interpreted_answer", "description": "A value representing the student's answer to this part.", "definition": "if(lower(studentAnswer) in [\"empty\",\"\u2205\"],[],\n map(\n if(settings[\"allowFractions\"],parsenumber_or_fraction(x,notationStyles), parsenumber(x,notationStyles))\n ,x\n ,bits\n )\n)"}, {"name": "mark", "description": "This is the main marking note. It should award credit and provide feedback based on the student's answer.", "definition": "if(studentanswer=\"\",fail(\"You have not entered an answer\"),false);\napply(valid_numbers);\napply(included);\napply(no_extras);\ncorrectif(all_included and no_extras)"}, {"name": "notationStyles", "description": "", "definition": "[\"en\"]"}, {"name": "isSet", "description": "

Should the answer be considered as a set, so the number of times an element occurs doesn't matter?

", "definition": "settings[\"isSet\"]"}, {"name": "extra_numbers", "description": "

Numbers included in the student's answer that are not in the expected list.

", "definition": "filter(not (x in expected_numbers),x,interpreted_answer)"}], "settings": [{"name": "correctAnswer", "label": "Correct answer", "help_url": "", "hint": "The list of numbers that the student should enter. The order does not matter.", "input_type": "code", "default_value": "", "evaluate": true}, {"name": "allowFractions", "label": "Allow the student to enter fractions?", "help_url": "", "hint": "", "input_type": "checkbox", "default_value": false}, {"name": "correctAnswerFractions", "label": "Display the correct answers as fractions?", "help_url": "", "hint": "", "input_type": "checkbox", "default_value": false}, {"name": "isSet", "label": "Is the answer a set?", "help_url": "", "hint": "If ticked, the number of times an element occurs doesn't matter, only whether it's included at all.", "input_type": "checkbox", "default_value": false}, {"name": "show_input_hint", "label": "Show the input hint?", "help_url": "", "hint": "", "input_type": "checkbox", "default_value": true}, {"name": "separator", "label": "Separator", "help_url": "", "hint": "The substring that should separate items in the student's list", "input_type": "string", "default_value": ",", "subvars": false}], "public_availability": "always", "published": true, "extensions": []}], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Kariane Ouellet", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/4505/"}], "tags": [], "metadata": {"description": "No description", "licence": "All rights reserved"}, "statement": "

The country of Genovia had its first case of coronavirus 12 days ago. They have been testing travellers and people with symptoms ever since and reported their number of positive cases every day:

\n

1, {day2}, {day3}, {day4}, {day5}, {day6},

\n

{day7}, {day8}, {day9}, {day10}, {day11}, {day12}.

\n

Using the data provided, answer the three questions below.

\n

", "advice": "

No solution.

", "rulesets": {}, "variables": {"day2": {"name": "day2", "group": "Ungrouped variables", "definition": "random(1..5)", "description": "", "templateType": "anything"}, "day3": {"name": "day3", "group": "Ungrouped variables", "definition": "random(2..6)", "description": "", "templateType": "anything"}, "day4": {"name": "day4", "group": "Ungrouped variables", "definition": "random(3..7)", "description": "", "templateType": "anything"}, "day5": {"name": "day5", "group": "Ungrouped variables", "definition": "random(5..10)", "description": "", "templateType": "anything"}, "day6": {"name": "day6", "group": "Ungrouped variables", "definition": "random(6..12)", "description": "", "templateType": "anything"}, "day7": {"name": "day7", "group": "Ungrouped variables", "definition": "random(8..15)", "description": "", "templateType": "anything"}, "day8": {"name": "day8", "group": "Ungrouped variables", "definition": "random(10..20)", "description": "", "templateType": "anything"}, "day9": {"name": "day9", "group": "Ungrouped variables", "definition": "random(12..25)", "description": "", "templateType": "anything"}, "day10": {"name": "day10", "group": "Ungrouped variables", "definition": "random(16..30)", "description": "", "templateType": "anything"}, "data": {"name": "data", "group": "Ungrouped variables", "definition": "[1,day2,day3,day4,day5,day6,day7,day8,day9,day10,day11,day12]", "description": "", "templateType": "anything"}, "mean": {"name": "mean", "group": "Ungrouped variables", "definition": "mean(data)", "description": "", "templateType": "anything"}, "median": {"name": "median", "group": "Ungrouped variables", "definition": "median(data)", "description": "", "templateType": "anything"}, "mode": {"name": "mode", "group": "Ungrouped variables", "definition": "mode(data)", "description": "", "templateType": "anything"}, "day11": {"name": "day11", "group": "Ungrouped variables", "definition": "day8", "description": "", "templateType": "anything"}, "day12": {"name": "day12", "group": "Ungrouped variables", "definition": "random(18..35)", "description": "", "templateType": "anything"}, "range": {"name": "range", "group": "Ungrouped variables", "definition": "range(data)", "description": "", "templateType": "anything"}, "sd": {"name": "sd", "group": "Ungrouped variables", "definition": "sqrt(var)", "description": "", "templateType": "anything"}, "var": {"name": "var", "group": "Ungrouped variables", "definition": "(sum([1,day2^2,day3^2,day4^2,day5^2,day6^2,day7^2,day8^2,day9^2,day10^2,day11^2,day12^2])-12*mean^2)/11", "description": "", "templateType": "anything"}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["day2", "day3", "day4", "day5", "day6", "day7", "day8", "day9", "day10", "day11", "day12", "data", "mean", "median", "mode", "range", "sd", "var"], "variable_groups": [], "functions": {}, "preamble": {"js": "", "css": ""}, "parts": [{"type": "1_n_2", "useCustomName": true, "customName": "Question 1", "marks": 0, "showCorrectAnswer": false, "showFeedbackIcon": false, "scripts": {}, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "adaptiveMarkingPenalty": 0, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "prompt": "

Is this the data of a sample or a population?

", "minMarks": 0, "maxMarks": 0, "shuffleChoices": true, "displayType": "radiogroup", "displayColumns": 0, "showCellAnswerState": false, "choices": ["Sample", "Population"], "matrix": ["2", 0], "distractors": ["", ""]}, {"type": "gapfill", "useCustomName": true, "customName": "Question 2", "marks": 0, "showCorrectAnswer": true, "showFeedbackIcon": true, "scripts": {}, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "adaptiveMarkingPenalty": 0, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "prompt": "

Calculate the measures of central tendency. Enter the numerical values and keep 2 decimal places.

\n

a) Mean: [[0]]

\n

b) Median: [[1]]

\n

c) Mode (could be more than one): [[2]]

", "gaps": [{"type": "numberentry", "useCustomName": false, "customName": "", "marks": "2", "showCorrectAnswer": false, "showFeedbackIcon": false, "scripts": {}, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "adaptiveMarkingPenalty": 0, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "minValue": "mean-0.02", "maxValue": "mean+0.02", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"type": "numberentry", "useCustomName": false, "customName": "", "marks": "2", "showCorrectAnswer": false, "showFeedbackIcon": false, "scripts": {}, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "adaptiveMarkingPenalty": 0, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "minValue": "median-0.02", "maxValue": "median+0.02", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"type": "list-of-numbers", "useCustomName": false, "customName": "", "marks": "2", "showCorrectAnswer": false, "showFeedbackIcon": false, "scripts": {}, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "adaptiveMarkingPenalty": 0, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "settings": {"correctAnswer": "mode", "allowFractions": false, "correctAnswerFractions": false}}], "sortAnswers": false}, {"type": "gapfill", "useCustomName": true, "customName": "Question 3", "marks": 0, "showCorrectAnswer": true, "showFeedbackIcon": true, "scripts": {}, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "adaptiveMarkingPenalty": 0, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "prompt": "

Calculate the measures of spread of the data. Keep 2 decimal places.

\n

a) Range: [[0]]

\n

b) Variance: [[1]]

\n

c) Standard Deviation: [[2]]

", "gaps": [{"type": "numberentry", "useCustomName": false, "customName": "", "marks": "2", "showCorrectAnswer": false, "showFeedbackIcon": false, "scripts": {}, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "adaptiveMarkingPenalty": 0, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "minValue": "range", "maxValue": "range", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"type": "numberentry", "useCustomName": false, "customName": "", "marks": "2", "showCorrectAnswer": false, "showFeedbackIcon": false, "scripts": {}, "variableReplacements": [{"variable": "mean", "part": "p1g0", "must_go_first": true}], "variableReplacementStrategy": "originalfirst", "adaptiveMarkingPenalty": 0, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "minValue": "var-0.3", "maxValue": "var+0.3", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"type": "numberentry", "useCustomName": false, "customName": "", "marks": "2", "showCorrectAnswer": false, "showFeedbackIcon": false, "scripts": {}, "variableReplacements": [{"variable": "var", "part": "p2g1", "must_go_first": false}], "variableReplacementStrategy": "originalfirst", "adaptiveMarkingPenalty": 0, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "minValue": "sd-0.1", "maxValue": "sd+0.1", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}], "sortAnswers": false}]}]}, {"name": "Group B", "pickingStrategy": "all-ordered", "pickQuestions": 1, "questions": [{"name": "Measure of central tendency and variability", "extensions": ["stats"], "custom_part_types": [{"source": {"pk": 2, "author": {"name": "Christian Lawson-Perfect", "pk": 7}, "edit_page": "/part_type/2/edit"}, "name": "List of numbers", "short_name": "list-of-numbers", "description": "

The answer is a comma-separated list of numbers.

\n

The list is marked correct if each number occurs the same number of times as in the expected answer, and no extra numbers are present.

\n

You can optionally treat the answer as a set, so the number of occurrences doesn't matter, only whether each number is included or not.

", "help_url": "", "input_widget": "string", "input_options": {"correctAnswer": "join(\n if(settings[\"correctAnswerFractions\"],\n map(let([a,b],rational_approximation(x), string(a/b)),x,settings[\"correctAnswer\"])\n ,\n settings[\"correctAnswer\"]\n ),\n settings[\"separator\"] + \" \"\n)", "hint": {"static": false, "value": "if(settings[\"show_input_hint\"],\n \"Enter a list of numbers separated by {settings['separator']}.\",\n \"\"\n)"}, "allowEmpty": {"static": true, "value": true}}, "can_be_gap": true, "can_be_step": true, "marking_script": "bits:\nlet(b,filter(x<>\"\",x,split(studentAnswer,settings[\"separator\"])),\n if(isSet,list(set(b)),b)\n)\n\nexpected_numbers:\nlet(l,settings[\"correctAnswer\"] as \"list\",\n if(isSet,list(set(l)),l)\n)\n\nvalid_numbers:\nif(all(map(not isnan(x),x,interpreted_answer)),\n true,\n let(index,filter(isnan(interpreted_answer[x]),x,0..len(interpreted_answer)-1)[0], wrong, bits[index],\n warn(wrong+\" is not a valid number\");\n fail(wrong+\" is not a valid number.\")\n )\n )\n\nis_sorted:\nassert(sort(interpreted_answer)=interpreted_answer,\n multiply_credit(0.5,\"Not in order\")\n )\n\nincluded:\nmap(\n let(\n num_student,len(filter(x=y,y,interpreted_answer)),\n num_expected,len(filter(x=y,y,expected_numbers)),\n switch(\n num_student=num_expected,\n true,\n num_studentThe separate items in the student's answer

", "definition": "let(b,filter(x<>\"\",x,split(studentAnswer,settings[\"separator\"])),\n if(isSet,list(set(b)),b)\n)"}, {"name": "expected_numbers", "description": "", "definition": "let(l,settings[\"correctAnswer\"] as \"list\",\n if(isSet,list(set(l)),l)\n)"}, {"name": "valid_numbers", "description": "

Is every number in the student's list valid?

", "definition": "if(all(map(not isnan(x),x,interpreted_answer)),\n true,\n let(index,filter(isnan(interpreted_answer[x]),x,0..len(interpreted_answer)-1)[0], wrong, bits[index],\n warn(wrong+\" is not a valid number\");\n fail(wrong+\" is not a valid number.\")\n )\n )"}, {"name": "is_sorted", "description": "

Are the student's answers in ascending order?

", "definition": "assert(sort(interpreted_answer)=interpreted_answer,\n multiply_credit(0.5,\"Not in order\")\n )"}, {"name": "included", "description": "

Is each number in the expected answer present in the student's list the correct number of times?

", "definition": "map(\n let(\n num_student,len(filter(x=y,y,interpreted_answer)),\n num_expected,len(filter(x=y,y,expected_numbers)),\n switch(\n num_student=num_expected,\n true,\n num_studentHas every number been included the right number of times?

", "definition": "all(included)"}, {"name": "no_extras", "description": "

True if the student's list doesn't contain any numbers that aren't in the expected answer.

", "definition": "if(all(map(x in expected_numbers, x, interpreted_answer)),\n true\n ,\n incorrect(\"Your answer contains \"+extra_numbers[0]+\" but should not.\");\n false\n )"}, {"name": "interpreted_answer", "description": "A value representing the student's answer to this part.", "definition": "if(lower(studentAnswer) in [\"empty\",\"\u2205\"],[],\n map(\n if(settings[\"allowFractions\"],parsenumber_or_fraction(x,notationStyles), parsenumber(x,notationStyles))\n ,x\n ,bits\n )\n)"}, {"name": "mark", "description": "This is the main marking note. It should award credit and provide feedback based on the student's answer.", "definition": "if(studentanswer=\"\",fail(\"You have not entered an answer\"),false);\napply(valid_numbers);\napply(included);\napply(no_extras);\ncorrectif(all_included and no_extras)"}, {"name": "notationStyles", "description": "", "definition": "[\"en\"]"}, {"name": "isSet", "description": "

Should the answer be considered as a set, so the number of times an element occurs doesn't matter?

", "definition": "settings[\"isSet\"]"}, {"name": "extra_numbers", "description": "

Numbers included in the student's answer that are not in the expected list.

", "definition": "filter(not (x in expected_numbers),x,interpreted_answer)"}], "settings": [{"name": "correctAnswer", "label": "Correct answer", "help_url": "", "hint": "The list of numbers that the student should enter. The order does not matter.", "input_type": "code", "default_value": "", "evaluate": true}, {"name": "allowFractions", "label": "Allow the student to enter fractions?", "help_url": "", "hint": "", "input_type": "checkbox", "default_value": false}, {"name": "correctAnswerFractions", "label": "Display the correct answers as fractions?", "help_url": "", "hint": "", "input_type": "checkbox", "default_value": false}, {"name": "isSet", "label": "Is the answer a set?", "help_url": "", "hint": "If ticked, the number of times an element occurs doesn't matter, only whether it's included at all.", "input_type": "checkbox", "default_value": false}, {"name": "show_input_hint", "label": "Show the input hint?", "help_url": "", "hint": "", "input_type": "checkbox", "default_value": true}, {"name": "separator", "label": "Separator", "help_url": "", "hint": "The substring that should separate items in the student's list", "input_type": "string", "default_value": ",", "subvars": false}], "public_availability": "always", "published": true, "extensions": []}], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Kariane Ouellet", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/4505/"}], "tags": [], "metadata": {"description": "No description", "licence": "All rights reserved"}, "statement": "

The country of Genovia had its first case of coronavirus 12 days ago. They have been testing travellers and people with symptoms ever since and reported their number of positive cases every day:

\n

1, {day2}, {day3}, {day4}, {day5}, {day6},

\n

{day7}, {day8}, {day9}, {day10}, {day11}, {day12}.

\n

Using the data provided, answer the three questions below.

\n

", "advice": "

No solution.

", "rulesets": {}, "variables": {"day2": {"name": "day2", "group": "Ungrouped variables", "definition": "random(1..5)", "description": "", "templateType": "anything"}, "day3": {"name": "day3", "group": "Ungrouped variables", "definition": "random(2..6)", "description": "", "templateType": "anything"}, "day4": {"name": "day4", "group": "Ungrouped variables", "definition": "random(3..7)", "description": "", "templateType": "anything"}, "day5": {"name": "day5", "group": "Ungrouped variables", "definition": "random(5..10)", "description": "", "templateType": "anything"}, "day6": {"name": "day6", "group": "Ungrouped variables", "definition": "random(6..12)", "description": "", "templateType": "anything"}, "day7": {"name": "day7", "group": "Ungrouped variables", "definition": "random(8..15)", "description": "", "templateType": "anything"}, "day8": {"name": "day8", "group": "Ungrouped variables", "definition": "random(10..20)", "description": "", "templateType": "anything"}, "day9": {"name": "day9", "group": "Ungrouped variables", "definition": "random(12..25)", "description": "", "templateType": "anything"}, "day10": {"name": "day10", "group": "Ungrouped variables", "definition": "random(16..30)", "description": "", "templateType": "anything"}, "data": {"name": "data", "group": "Ungrouped variables", "definition": "[1,day2,day3,day4,day5,day6,day7,day8,day9,day10,day11,day12]", "description": "", "templateType": "anything"}, "mean": {"name": "mean", "group": "Ungrouped variables", "definition": "mean(data)", "description": "", "templateType": "anything"}, "median": {"name": "median", "group": "Ungrouped variables", "definition": "median(data)", "description": "", "templateType": "anything"}, "mode": {"name": "mode", "group": "Ungrouped variables", "definition": "mode(data)", "description": "", "templateType": "anything"}, "day11": {"name": "day11", "group": "Ungrouped variables", "definition": "day8", "description": "", "templateType": "anything"}, "day12": {"name": "day12", "group": "Ungrouped variables", "definition": "random(18..35)", "description": "", "templateType": "anything"}, "range": {"name": "range", "group": "Ungrouped variables", "definition": "range(data)", "description": "", "templateType": "anything"}, "sd": {"name": "sd", "group": "Ungrouped variables", "definition": "sqrt(var)", "description": "", "templateType": "anything"}, "var": {"name": "var", "group": "Ungrouped variables", "definition": "(sum([1,day2^2,day3^2,day4^2,day5^2,day6^2,day7^2,day8^2,day9^2,day10^2,day11^2,day12^2])-12*mean^2)/11", "description": "", "templateType": "anything"}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["day2", "day3", "day4", "day5", "day6", "day7", "day8", "day9", "day10", "day11", "day12", "data", "mean", "median", "mode", "range", "sd", "var"], "variable_groups": [], "functions": {}, "preamble": {"js": "", "css": ""}, "parts": [{"type": "1_n_2", "useCustomName": true, "customName": "Question 1", "marks": 0, "showCorrectAnswer": false, "showFeedbackIcon": false, "scripts": {}, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "adaptiveMarkingPenalty": 0, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "prompt": "

Is this the data of a sample or a population?

", "minMarks": 0, "maxMarks": 0, "shuffleChoices": true, "displayType": "radiogroup", "displayColumns": 0, "showCellAnswerState": false, "choices": ["Sample", "Population"], "matrix": ["2", 0], "distractors": ["", ""]}, {"type": "gapfill", "useCustomName": true, "customName": "Question 2", "marks": 0, "showCorrectAnswer": true, "showFeedbackIcon": true, "scripts": {}, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "adaptiveMarkingPenalty": 0, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "prompt": "

Calculate the measures of central tendency. Enter the numerical values and keep 2 decimal places.

\n

a) Mean: [[0]]

\n

b) Median: [[1]]

\n

c) Mode (could be more than one): [[2]]

", "gaps": [{"type": "numberentry", "useCustomName": false, "customName": "", "marks": "2", "showCorrectAnswer": false, "showFeedbackIcon": false, "scripts": {}, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "adaptiveMarkingPenalty": 0, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "minValue": "mean-0.02", "maxValue": "mean+0.02", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"type": "numberentry", "useCustomName": false, "customName": "", "marks": "2", "showCorrectAnswer": false, "showFeedbackIcon": false, "scripts": {}, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "adaptiveMarkingPenalty": 0, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "minValue": "median-0.02", "maxValue": "median+0.02", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"type": "list-of-numbers", "useCustomName": false, "customName": "", "marks": "2", "showCorrectAnswer": false, "showFeedbackIcon": false, "scripts": {}, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "adaptiveMarkingPenalty": 0, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "settings": {"correctAnswer": "mode", "allowFractions": false, "correctAnswerFractions": false}}], "sortAnswers": false}, {"type": "gapfill", "useCustomName": true, "customName": "Question 3", "marks": 0, "showCorrectAnswer": true, "showFeedbackIcon": true, "scripts": {}, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "adaptiveMarkingPenalty": 0, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "prompt": "

Calculate the measures of spread of the data. Keep 2 decimal places.

\n

a) Range: [[0]]

\n

b) Variance: [[1]]

\n

c) Standard Deviation: [[2]]

", "gaps": [{"type": "numberentry", "useCustomName": false, "customName": "", "marks": "2", "showCorrectAnswer": false, "showFeedbackIcon": false, "scripts": {}, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "adaptiveMarkingPenalty": 0, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "minValue": "range", "maxValue": "range", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"type": "numberentry", "useCustomName": false, "customName": "", "marks": "2", "showCorrectAnswer": false, "showFeedbackIcon": false, "scripts": {}, "variableReplacements": [{"variable": "mean", "part": "p1g0", "must_go_first": true}], "variableReplacementStrategy": "originalfirst", "adaptiveMarkingPenalty": 0, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "minValue": "var-0.3", "maxValue": "var+0.3", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"type": "numberentry", "useCustomName": false, "customName": "", "marks": "2", "showCorrectAnswer": false, "showFeedbackIcon": false, "scripts": {}, "variableReplacements": [{"variable": "var", "part": "p2g1", "must_go_first": false}], "variableReplacementStrategy": "originalfirst", "adaptiveMarkingPenalty": 0, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "minValue": "sd-0.1", "maxValue": "sd+0.1", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}], "sortAnswers": false}]}, {"name": "Using math symbols", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Kariane Ouellet", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/4505/"}], "tags": [], "metadata": {"description": "", "licence": "None specified"}, "statement": "

Write the following in exact value.

\n
    \n
  • To write a fraction, use \"/\"
  • \n
  • To write a square root, use \"sqrt()\"
  • \n
  • To write an exponent, use \"^\"
  • \n
  • To write a log: \"log(argument,base)\" (be careful not to switch them)
  • \n
  • To write infinity: \"infinity\"
  • \n
", "advice": "", "rulesets": {}, "variables": {}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": [], "variable_groups": [], "functions": {}, "preamble": {"js": "", "css": ""}, "parts": [{"type": "gapfill", "useCustomName": false, "customName": "", "marks": 0, "showCorrectAnswer": true, "showFeedbackIcon": true, "scripts": {}, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "adaptiveMarkingPenalty": 0, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "prompt": "

a) The positive solution of $x^2-2=0$ is: $x=$[[0]]

\n

b) The solution of $3x=1$ is: $x=$[[1]]

\n

c) Write the expression $\\sqrt x$ using exponents: [[2]]

\n

d) If $3^x=5$, then $x=$[[3]]

\n

e) Symbol infinity: [[4]]

\n

", "gaps": [{"type": "jme", "useCustomName": false, "customName": "", "marks": 1, "showCorrectAnswer": true, "showFeedbackIcon": true, "scripts": {}, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "adaptiveMarkingPenalty": 0, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "answer": "sqrt(2)", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": false, "valuegenerators": []}, {"type": "jme", "useCustomName": false, "customName": "", "marks": 1, "showCorrectAnswer": true, "showFeedbackIcon": true, "scripts": {}, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "adaptiveMarkingPenalty": 0, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "answer": "1/3", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": false, "valuegenerators": []}, {"type": "jme", "useCustomName": false, "customName": "", "marks": 1, "showCorrectAnswer": true, "showFeedbackIcon": true, "scripts": {}, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "adaptiveMarkingPenalty": 0, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "answer": "x^(1/2)", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": false, "valuegenerators": [{"name": "x", "value": ""}]}, {"type": "jme", "useCustomName": false, "customName": "", "marks": 1, "showCorrectAnswer": true, "showFeedbackIcon": true, "scripts": {}, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "adaptiveMarkingPenalty": 0, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "answer": "log(5,3)", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": false, "valuegenerators": []}, {"type": "jme", "useCustomName": false, "customName": "", "marks": 1, "showCorrectAnswer": true, "showFeedbackIcon": true, "scripts": {}, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "adaptiveMarkingPenalty": 0, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "answer": "infinity", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": false, "valuegenerators": []}], "sortAnswers": false}]}]}], "navigation": {"allowregen": false, "reverse": false, "browse": false, "allowsteps": true, "showfrontpage": true, "showresultspage": "never", "onleave": {"action": "warnifunattempted", "message": "

You have left a question unanswered. 

"}, "preventleave": true, "startpassword": ""}, "timing": {"allowPause": false, "timeout": {"action": "warn", "message": "

You are out of time!

"}, "timedwarning": {"action": "warn", "message": "

You have 5 minutes left.

"}}, "feedback": {"showactualmark": false, "showtotalmark": false, "showanswerstate": false, "allowrevealanswer": false, "advicethreshold": 0, "intro": "

Welcome the the first stats quiz! It's very short. 

\n
    \n
  • You have 25 minutes.
  • \n
  • There are 3 questions (with parts). The topics are measures of central tendency and measures of spread.
  • \n
  • Enter all of your answers and keep 2 decimal places. 
  • \n
  • Submit them as you go to make sure you don't carry mistakes. You can't change your answer once you've submitted it.
  • \n
\n

Write down on a sheet of paper the data you are given, along with your detailed calculations. Submit a picture on google classroom. 

\n

Let me know if you have any questions!

\n

Good luck!

", "feedbackmessages": []}, "contributors": [{"name": "Kariane Ouellet", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/4505/"}], "extensions": ["stats"], "custom_part_types": [{"source": {"pk": 2, "author": {"name": "Christian Lawson-Perfect", "pk": 7}, "edit_page": "/part_type/2/edit"}, "name": "List of numbers", "short_name": "list-of-numbers", "description": "

The answer is a comma-separated list of numbers.

\n

The list is marked correct if each number occurs the same number of times as in the expected answer, and no extra numbers are present.

\n

You can optionally treat the answer as a set, so the number of occurrences doesn't matter, only whether each number is included or not.

", "help_url": "", "input_widget": "string", "input_options": {"correctAnswer": "join(\n if(settings[\"correctAnswerFractions\"],\n map(let([a,b],rational_approximation(x), string(a/b)),x,settings[\"correctAnswer\"])\n ,\n settings[\"correctAnswer\"]\n ),\n settings[\"separator\"] + \" \"\n)", "hint": {"static": false, "value": "if(settings[\"show_input_hint\"],\n \"Enter a list of numbers separated by {settings['separator']}.\",\n \"\"\n)"}, "allowEmpty": {"static": true, "value": true}}, "can_be_gap": true, "can_be_step": true, "marking_script": "bits:\nlet(b,filter(x<>\"\",x,split(studentAnswer,settings[\"separator\"])),\n if(isSet,list(set(b)),b)\n)\n\nexpected_numbers:\nlet(l,settings[\"correctAnswer\"] as \"list\",\n if(isSet,list(set(l)),l)\n)\n\nvalid_numbers:\nif(all(map(not isnan(x),x,interpreted_answer)),\n true,\n let(index,filter(isnan(interpreted_answer[x]),x,0..len(interpreted_answer)-1)[0], wrong, bits[index],\n warn(wrong+\" is not a valid number\");\n fail(wrong+\" is not a valid number.\")\n )\n )\n\nis_sorted:\nassert(sort(interpreted_answer)=interpreted_answer,\n multiply_credit(0.5,\"Not in order\")\n )\n\nincluded:\nmap(\n let(\n num_student,len(filter(x=y,y,interpreted_answer)),\n num_expected,len(filter(x=y,y,expected_numbers)),\n switch(\n num_student=num_expected,\n true,\n num_studentThe separate items in the student's answer

", "definition": "let(b,filter(x<>\"\",x,split(studentAnswer,settings[\"separator\"])),\n if(isSet,list(set(b)),b)\n)"}, {"name": "expected_numbers", "description": "", "definition": "let(l,settings[\"correctAnswer\"] as \"list\",\n if(isSet,list(set(l)),l)\n)"}, {"name": "valid_numbers", "description": "

Is every number in the student's list valid?

", "definition": "if(all(map(not isnan(x),x,interpreted_answer)),\n true,\n let(index,filter(isnan(interpreted_answer[x]),x,0..len(interpreted_answer)-1)[0], wrong, bits[index],\n warn(wrong+\" is not a valid number\");\n fail(wrong+\" is not a valid number.\")\n )\n )"}, {"name": "is_sorted", "description": "

Are the student's answers in ascending order?

", "definition": "assert(sort(interpreted_answer)=interpreted_answer,\n multiply_credit(0.5,\"Not in order\")\n )"}, {"name": "included", "description": "

Is each number in the expected answer present in the student's list the correct number of times?

", "definition": "map(\n let(\n num_student,len(filter(x=y,y,interpreted_answer)),\n num_expected,len(filter(x=y,y,expected_numbers)),\n switch(\n num_student=num_expected,\n true,\n num_studentHas every number been included the right number of times?

", "definition": "all(included)"}, {"name": "no_extras", "description": "

True if the student's list doesn't contain any numbers that aren't in the expected answer.

", "definition": "if(all(map(x in expected_numbers, x, interpreted_answer)),\n true\n ,\n incorrect(\"Your answer contains \"+extra_numbers[0]+\" but should not.\");\n false\n )"}, {"name": "interpreted_answer", "description": "A value representing the student's answer to this part.", "definition": "if(lower(studentAnswer) in [\"empty\",\"\u2205\"],[],\n map(\n if(settings[\"allowFractions\"],parsenumber_or_fraction(x,notationStyles), parsenumber(x,notationStyles))\n ,x\n ,bits\n )\n)"}, {"name": "mark", "description": "This is the main marking note. It should award credit and provide feedback based on the student's answer.", "definition": "if(studentanswer=\"\",fail(\"You have not entered an answer\"),false);\napply(valid_numbers);\napply(included);\napply(no_extras);\ncorrectif(all_included and no_extras)"}, {"name": "notationStyles", "description": "", "definition": "[\"en\"]"}, {"name": "isSet", "description": "

Should the answer be considered as a set, so the number of times an element occurs doesn't matter?

", "definition": "settings[\"isSet\"]"}, {"name": "extra_numbers", "description": "

Numbers included in the student's answer that are not in the expected list.

", "definition": "filter(not (x in expected_numbers),x,interpreted_answer)"}], "settings": [{"name": "correctAnswer", "label": "Correct answer", "help_url": "", "hint": "The list of numbers that the student should enter. The order does not matter.", "input_type": "code", "default_value": "", "evaluate": true}, {"name": "allowFractions", "label": "Allow the student to enter fractions?", "help_url": "", "hint": "", "input_type": "checkbox", "default_value": false}, {"name": "correctAnswerFractions", "label": "Display the correct answers as fractions?", "help_url": "", "hint": "", "input_type": "checkbox", "default_value": false}, {"name": "isSet", "label": "Is the answer a set?", "help_url": "", "hint": "If ticked, the number of times an element occurs doesn't matter, only whether it's included at all.", "input_type": "checkbox", "default_value": false}, {"name": "show_input_hint", "label": "Show the input hint?", "help_url": "", "hint": "", "input_type": "checkbox", "default_value": true}, {"name": "separator", "label": "Separator", "help_url": "", "hint": "The substring that should separate items in the student's list", "input_type": "string", "default_value": ",", "subvars": false}], "public_availability": "always", "published": true, "extensions": []}], "resources": []}