// Numbas version: exam_results_page_options {"name": "Descriptive Stats (P): Mode", "extensions": ["stats"], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"functions": {}, "ungrouped_variables": [], "name": "Descriptive Stats (P): Mode", "tags": [], "advice": "

a)

\n

The mode is the value which appears the most often in the data set.

\n

It can help to put the values in order:

\n

{table([sort(show_values1)],[])}

\n

The mode of these numbers is $\\var{mode1}$.

\n

b)

\n

Similarly, it can help to first put the values in order:

\n

{table([sort(show_values2)],[])}

\n

The mode of these numbers is $\\var{mode2}$.

\n

", "rulesets": {}, "parts": [{"prompt": "

{table([show_values1],[])}

", "allowFractions": false, "variableReplacements": [], "maxValue": "mode1", "minValue": "mode1", "variableReplacementStrategy": "originalfirst", "correctAnswerFraction": false, "showCorrectAnswer": true, "scripts": {}, "marks": 1, "type": "numberentry", "showPrecisionHint": false}, {"prompt": "

{table([show_values2],[])}

", "allowFractions": false, "variableReplacements": [], "maxValue": "mode2", "minValue": "mode2", "variableReplacementStrategy": "originalfirst", "correctAnswerFraction": false, "showCorrectAnswer": true, "scripts": {}, "marks": 1, "type": "numberentry", "showPrecisionHint": false}], "statement": "

Find the mode of each list of numbers.

", "variable_groups": [{"variables": ["values1", "mode1", "show_values1"], "name": "Part a"}, {"variables": ["values2", "mode2", "show_values2"], "name": "Part b"}], "variablesTest": {"maxRuns": 100, "condition": ""}, "preamble": {"css": "", "js": ""}, "variables": {"values1": {"definition": "repeat(random(1..20),5)", "templateType": "anything", "group": "Part a", "name": "values1", "description": "

A random set of data

"}, "values2": {"definition": "repeat(random(1..20),8)", "templateType": "anything", "group": "Part b", "name": "values2", "description": ""}, "mode2": {"definition": "shuffle(mode(values2))[0]", "templateType": "anything", "group": "Part b", "name": "mode2", "description": ""}, "show_values1": {"definition": "shuffle(values1+[mode1])", "templateType": "anything", "group": "Part a", "name": "show_values1", "description": "

Values shown to the student.

\n

Make sure the mode is unique by picking one possible mode, and adding another copy of it to the list.

"}, "show_values2": {"definition": "shuffle(values2+[mode2])", "templateType": "anything", "group": "Part b", "name": "show_values2", "description": ""}, "mode1": {"definition": "shuffle(mode(values1))[0]", "templateType": "anything", "group": "Part a", "name": "mode1", "description": "

A mode of the random set of data. There will be more than one if two values appear the same (maximal) number of times

"}}, "metadata": {"notes": "", "description": "

Find the modes of two small samples.

", "licence": "Creative Commons Attribution 4.0 International"}, "type": "question", "showQuestionGroupNames": false, "question_groups": [{"name": "", "pickingStrategy": "all-ordered", "pickQuestions": 0, "questions": []}], "contributors": [{"name": "Christian Lawson-Perfect", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/7/"}, {"name": "Hayley Moore", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/495/"}]}]}], "contributors": [{"name": "Christian Lawson-Perfect", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/7/"}, {"name": "Hayley Moore", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/495/"}]}